EditPage: Do not resolve redirect on cancel button
authorFomafix <fomafix@googlemail.com>
Sat, 28 May 2016 20:21:07 +0000 (20:21 +0000)
committer[[mw:User:Fomafix]] <gerritpatchuploader@gmail.com>
Sat, 28 May 2016 20:21:07 +0000 (20:21 +0000)
Change-Id: I9343c7e97cee7fa6550b186e6a6ffbf3438060a4

includes/EditPage.php

index 8acd036..f2403fe 100644 (file)
@@ -3501,6 +3501,8 @@ HTML
                $cancelParams = [];
                if ( !$this->isConflict && $this->oldid > 0 ) {
                        $cancelParams['oldid'] = $this->oldid;
                $cancelParams = [];
                if ( !$this->isConflict && $this->oldid > 0 ) {
                        $cancelParams['oldid'] = $this->oldid;
+               } elseif ( $this->getContextTitle()->isRedirect() ) {
+                       $cancelParams['redirect'] = 'no';
                }
                $attrs = [ 'id' => 'mw-editform-cancel' ];
 
                }
                $attrs = [ 'id' => 'mw-editform-cancel' ];