Merge "Add a parser test for $wgNoFollowDomainExceptions functionality"
[lhc/web/wiklou.git] / includes / EditPage.php
index 8acd036..f2403fe 100644 (file)
@@ -3501,6 +3501,8 @@ HTML
                $cancelParams = [];
                if ( !$this->isConflict && $this->oldid > 0 ) {
                        $cancelParams['oldid'] = $this->oldid;
+               } elseif ( $this->getContextTitle()->isRedirect() ) {
+                       $cancelParams['redirect'] = 'no';
                }
                $attrs = [ 'id' => 'mw-editform-cancel' ];