Mass conversion to NamespaceInfo
[lhc/web/wiklou.git] / includes / EditPage.php
index 6990934..2d5b9e2 100644 (file)
@@ -637,13 +637,6 @@ class EditPage {
                                                $this->context->getUser()->spreadAnyEditBlock();
                                        } );
                                }
-
-                               $config = $this->context->getConfig();
-                               if ( $config->get( 'EnableBlockNoticeStats' ) ) {
-                                       $wiki = $config->get( 'DBname' );
-                                       $statsd = MediaWikiServices::getInstance()->getStatsdDataFactory();
-                                       $statsd->increment( 'BlockNotices.' . $wiki . '.WikitextEditor.shown' );
-                               }
                        }
                        $this->displayPermissionsError( $permErrors );
 
@@ -2616,7 +2609,8 @@ ERROR;
                                LogEventsList::showLogExtract(
                                        $out,
                                        'block',
-                                       MWNamespace::getCanonicalName( NS_USER ) . ':' . $block->getTarget(),
+                                       MediaWikiServices::getInstance()->getNamespaceInfo()->
+                                               getCanonicalName( NS_USER ) . ':' . $block->getTarget(),
                                        '',
                                        [
                                                'lim' => 1,
@@ -4458,7 +4452,9 @@ ERROR;
        protected function addPageProtectionWarningHeaders() {
                $out = $this->context->getOutput();
                if ( $this->mTitle->isProtected( 'edit' ) &&
-                       MWNamespace::getRestrictionLevels( $this->mTitle->getNamespace() ) !== [ '' ]
+                       MediaWikiServices::getInstance()->getNamespaceInfo()->getRestrictionLevels(
+                               $this->mTitle->getNamespace()
+                       ) !== [ '' ]
                ) {
                        # Is the title semi-protected?
                        if ( $this->mTitle->isSemiProtected() ) {