X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialLonelypages.php;h=ca3f4dae8ce48171f56ea28c238f32217346aa39;hb=3bb3c8b0ae092b2e667f6f33abfc98f9c205d53c;hp=ff76a4b47df073ae41f3307006c9423bf12d5dae;hpb=8eac2feedb7ee093d2c48504e1eb2b8a9dbc8452;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialLonelypages.php b/includes/specials/SpecialLonelypages.php index ff76a4b47d..ca3f4dae8c 100644 --- a/includes/specials/SpecialLonelypages.php +++ b/includes/specials/SpecialLonelypages.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A special page looking for articles with no article linking to them, * thus being lonely. @@ -52,7 +54,8 @@ class LonelyPagesPage extends PageQueryPage { $tables = [ 'page', 'pagelinks', 'templatelinks' ]; $conds = [ 'pl_namespace IS NULL', - 'page_namespace' => MWNamespace::getContentNamespaces(), + 'page_namespace' => MediaWikiServices::getInstance()->getNamespaceInfo()-> + getContentNamespaces(), 'page_is_redirect' => 0, 'tl_namespace IS NULL' ]; @@ -89,7 +92,9 @@ class LonelyPagesPage extends PageQueryPage { function getOrderFields() { // For some crazy reason ordering by a constant // causes a filesort in MySQL 5 - if ( count( MWNamespace::getContentNamespaces() ) > 1 ) { + if ( count( MediaWikiServices::getInstance()->getNamespaceInfo()-> + getContentNamespaces() ) > 1 + ) { return [ 'page_namespace', 'page_title' ]; } else { return [ 'page_title' ];