$params = $this->extractRequestParams();
$title = Title::newFromText( $params['title'] );
- if ( !$title || $title->getNamespace() < 0 ) {
+ if ( !$title || $title->isExternal() || !$title->canExist() ) {
$this->dieUsageMsg( array( 'invalidtitle', $params['title'] ) );
}
$res = array( 'title' => $title->getPrefixedText() );
- // Currently unnecessary, code to act as a safeguard against any change in current behaviour of uselang
+ // Currently unnecessary, code to act as a safeguard against any change in current behavior of uselang
// Copy from ApiParse
$oldLang = null;
if ( isset( $params['uselang'] ) && $params['uselang'] != $this->getContext()->getLanguage()->getCode() ) {