Remove useless title parameter in CategoryPager
[lhc/web/wiklou.git] / includes / EditPage.php
index 05fa366..e070ca3 100644 (file)
@@ -498,6 +498,9 @@ class EditPage {
                $this->enableApiEditOverride = $enableOverride;
        }
 
+       /**
+        * @deprecated since 1.29, call edit directly
+        */
        function submit() {
                $this->edit();
        }
@@ -1621,15 +1624,7 @@ class EditPage {
         */
        protected function runPostMergeFilters( Content $content, Status $status, User $user ) {
                // Run old style post-section-merge edit filter
-               if ( !ContentHandler::runLegacyHooks( 'EditFilterMerged',
-                       [ $this, $content, &$this->hookError, $this->summary ],
-                       '1.21'
-               ) ) {
-                       # Error messages etc. could be handled within the hook...
-                       $status->fatal( 'hookaborted' );
-                       $status->value = self::AS_HOOK_ERROR;
-                       return false;
-               } elseif ( $this->hookError != '' ) {
+               if ( $this->hookError != '' ) {
                        # ...or the hook could be expecting us to produce an error
                        $status->fatal( 'hookaborted' );
                        $status->value = self::AS_HOOK_ERROR_EXPECTED;
@@ -3581,6 +3576,7 @@ HTML
         */
        public function getCancelLink() {
                $cancelParams = [];
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                if ( !$this->isConflict && $this->oldid > 0 ) {
                        $cancelParams['oldid'] = $this->oldid;
                } elseif ( $this->getContextTitle()->isRedirect() ) {
@@ -3588,9 +3584,9 @@ HTML
                }
                $attrs = [ 'id' => 'mw-editform-cancel' ];
 
-               return Linker::linkKnown(
+               return $linkRenderer->makeKnownLink(
                        $this->getContextTitle(),
-                       $this->context->msg( 'cancel' )->parse(),
+                       new HtmlArmor( $this->context->msg( 'cancel' )->parse() ),
                        Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ),
                        $cancelParams
                );
@@ -3779,7 +3775,6 @@ HTML
                        }
 
                        $hook_args = [ $this, &$content ];
-                       ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args, '1.25' );
                        Hooks::run( 'EditPageGetPreviewContent', $hook_args );
 
                        $parserResult = $this->doPreviewParse( $content );