X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUncategorizedpages.php;h=ab83af1c9297c0cbf019da86711b76edbdb6bfc1;hp=30b33cc6973222eefc9d563d10e5b906d06b6a2a;hb=dfec83932fd38a9086eb5a2e212889ad00f35b0e;hpb=96906168cac0e9a7748511b48c369cf22c8406d5 diff --git a/includes/specials/SpecialUncategorizedpages.php b/includes/specials/SpecialUncategorizedpages.php index 30b33cc697..ab83af1c92 100644 --- a/includes/specials/SpecialUncategorizedpages.php +++ b/includes/specials/SpecialUncategorizedpages.php @@ -21,6 +21,8 @@ * @ingroup SpecialPage */ +use MediaWiki\MediaWikiServices; + /** * A special page looking for page without any category. * @@ -28,6 +30,7 @@ * @todo FIXME: Make $requestedNamespace selectable, unify all subclasses into one */ class UncategorizedPagesPage extends PageQueryPage { + /** @var int|false */ protected $requestedNamespace = false; function __construct( $name = 'Uncategorizedpages' ) { @@ -60,7 +63,8 @@ class UncategorizedPagesPage extends PageQueryPage { 'cl_from IS NULL', 'page_namespace' => $this->requestedNamespace !== false ? $this->requestedNamespace - : MWNamespace::getContentNamespaces(), + : MediaWikiServices::getInstance()->getNamespaceInfo()-> + getContentNamespaces(), 'page_is_redirect' => 0 ], 'join_conds' => [ @@ -72,7 +76,10 @@ class UncategorizedPagesPage extends PageQueryPage { function getOrderFields() { // For some crazy reason ordering by a constant // causes a filesort - if ( $this->requestedNamespace === false && count( MWNamespace::getContentNamespaces() ) > 1 ) { + if ( $this->requestedNamespace === false && + count( MediaWikiServices::getInstance()->getNamespaceInfo()-> + getContentNamespaces() ) > 1 + ) { return [ 'page_namespace', 'page_title' ]; }