X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialUncategorizedpages.php;h=0b7da7bf8a22c8f1611e7e2304b9634f2ea98c29;hb=4147bd819b1cf869699d60446425831365ea26b2;hp=30b33cc6973222eefc9d563d10e5b906d06b6a2a;hpb=9ba3fca2d8adc56787c8efc32c41424cb212e387;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialUncategorizedpages.php b/includes/specials/SpecialUncategorizedpages.php index 30b33cc697..0b7da7bf8a 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,10 +30,12 @@ * @todo FIXME: Make $requestedNamespace selectable, unify all subclasses into one */ class UncategorizedPagesPage extends PageQueryPage { + /** @var int|false */ protected $requestedNamespace = false; function __construct( $name = 'Uncategorizedpages' ) { parent::__construct( $name ); + $this->addHelpLink( 'Help:Categories' ); } function sortDescending() { @@ -60,7 +64,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 +77,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' ]; }