Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / includes / specials / SpecialUncategorizedpages.php
index 30b33cc..ab83af1 100644 (file)
@@ -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' ];
                }