dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mass conversion to NamespaceInfo
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiPageSet.php
diff --git
a/includes/api/ApiPageSet.php
b/includes/api/ApiPageSet.php
index
b321c7d
..
64c6f45
100644
(file)
--- a/
includes/api/ApiPageSet.php
+++ b/
includes/api/ApiPageSet.php
@@
-866,6
+866,8
@@
class ApiPageSet extends ApiBase {
ApiBase::dieDebug( __METHOD__, 'Missing $processTitles parameter when $remaining is provided' );
}
ApiBase::dieDebug( __METHOD__, 'Missing $processTitles parameter when $remaining is provided' );
}
+ $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+
$usernames = [];
if ( $res ) {
foreach ( $res as $row ) {
$usernames = [];
if ( $res ) {
foreach ( $res as $row ) {
@@
-884,7
+886,7
@@
class ApiPageSet extends ApiBase {
$this->processDbRow( $row );
// Need gender information
$this->processDbRow( $row );
// Need gender information
- if (
MWNamespace::
hasGenderDistinction( $row->page_namespace ) ) {
+ if (
$nsInfo->
hasGenderDistinction( $row->page_namespace ) ) {
$usernames[] = $row->page_title;
}
}
$usernames[] = $row->page_title;
}
}
@@
-907,7
+909,7
@@
class ApiPageSet extends ApiBase {
$this->mTitles[] = $title;
// need gender information
$this->mTitles[] = $title;
// need gender information
- if (
MWNamespace::
hasGenderDistinction( $ns ) ) {
+ if (
$nsInfo->
hasGenderDistinction( $ns ) ) {
$usernames[] = $dbkey;
}
}
$usernames[] = $dbkey;
}
}
@@
-1249,7
+1251,10
@@
class ApiPageSet extends ApiBase {
}
// Need gender information
}
// Need gender information
- if ( MWNamespace::hasGenderDistinction( $titleObj->getNamespace() ) ) {
+ if (
+ MediaWikiServices::getInstance()->getNamespaceInfo()->
+ hasGenderDistinction( $titleObj->getNamespace() )
+ ) {
$usernames[] = $titleObj->getText();
}
}
$usernames[] = $titleObj->getText();
}
}