Merge "Fix AbstractBlock param types in documentation"
[lhc/web/wiklou.git] / includes / EditPage.php
index 1d9ff05..7908fcc 100644 (file)
@@ -2609,7 +2609,8 @@ ERROR;
                                LogEventsList::showLogExtract(
                                        $out,
                                        'block',
-                                       MWNamespace::getCanonicalName( NS_USER ) . ':' . $block->getTarget(),
+                                       MediaWikiServices::getInstance()->getNamespaceInfo()->
+                                               getCanonicalName( NS_USER ) . ':' . $block->getTarget(),
                                        '',
                                        [
                                                'lim' => 1,
@@ -2933,7 +2934,7 @@ ERROR;
                }
 
                if ( !$this->mTitle->isUserConfigPage() ) {
-                       $out->addHTML( self::getEditToolbar( $this->mTitle ) );
+                       $out->addHTML( self::getEditToolbar() );
                }
 
                if ( $this->blankArticle ) {
@@ -4100,10 +4101,9 @@ ERROR;
        /**
         * Allow extensions to provide a toolbar.
         *
-        * @param Title|null $title Title object for the page being edited (optional)
         * @return string|null
         */
-       public static function getEditToolbar( $title = null ) {
+       public static function getEditToolbar() {
                $startingToolbar = '<div id="toolbar"></div>';
                $toolbar = $startingToolbar;
 
@@ -4359,33 +4359,6 @@ ERROR;
                $out->addReturnTo( $this->getContextTitle(), [ 'action' => 'edit' ] );
        }
 
-       /**
-        * Filter an input field through a Unicode de-armoring process if it
-        * came from an old browser with known broken Unicode editing issues.
-        *
-        * @deprecated since 1.30, does nothing
-        *
-        * @param WebRequest $request
-        * @param string $field
-        * @return string
-        */
-       protected function safeUnicodeInput( $request, $field ) {
-               return rtrim( $request->getText( $field ) );
-       }
-
-       /**
-        * Filter an output field through a Unicode armoring process if it is
-        * going to an old browser with known broken Unicode editing issues.
-        *
-        * @deprecated since 1.30, does nothing
-        *
-        * @param string $text
-        * @return string
-        */
-       protected function safeUnicodeOutput( $text ) {
-               return $text;
-       }
-
        /**
         * @since 1.29
         */
@@ -4451,7 +4424,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() ) {