ApiBase::dieDebug( __METHOD__, 'Missing $processTitles parameter when $remaining is provided' );
}
+ $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+
$usernames = [];
if ( $res ) {
foreach ( $res as $row ) {
$this->processDbRow( $row );
// Need gender information
- if ( MWNamespace::hasGenderDistinction( $row->page_namespace ) ) {
+ if ( $nsInfo->hasGenderDistinction( $row->page_namespace ) ) {
$usernames[] = $row->page_title;
}
}
$this->mTitles[] = $title;
// need gender information
- if ( MWNamespace::hasGenderDistinction( $ns ) ) {
+ if ( $nsInfo->hasGenderDistinction( $ns ) ) {
$usernames[] = $dbkey;
}
}
}
// Need gender information
- if ( MWNamespace::hasGenderDistinction( $titleObj->getNamespace() ) ) {
+ if (
+ MediaWikiServices::getInstance()->getNamespaceInfo()->
+ hasGenderDistinction( $titleObj->getNamespace() )
+ ) {
$usernames[] = $titleObj->getText();
}
}
$data[$toPageId],
$this->mGeneratorData[$fromNs][$fromDBkey]
);
- if ( $result instanceof ApiResult ) {
- if ( !$result->addValue( $path, $toPageId, $data[$toPageId], ApiResult::OVERRIDE ) ) {
- return false;
- }
+ if ( $result instanceof ApiResult &&
+ !$result->addValue( $path, $toPageId, $data[$toPageId], ApiResult::OVERRIDE )
+ ) {
+ return false;
}
}
}