Drop the `redirect=no` thing for non-redirects, per Brion. Seems like a waste of...
authorRob Church <robchurch@users.mediawiki.org>
Tue, 26 Jun 2007 21:24:23 +0000 (21:24 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 26 Jun 2007 21:24:23 +0000 (21:24 +0000)
includes/ProtectionForm.php

index 8ec5fd4..f349311 100644 (file)
@@ -76,11 +76,12 @@ class ProtectionForm {
        }
        
        function execute() {
-               global $wgRequest;
+               global $wgRequest, $wgOut;
                if( $wgRequest->wasPosted() ) {
                        if( $this->save() ) {
-                               global $wgOut;
-                               $wgOut->redirect( $this->mTitle->getFullUrl( 'redirect=no' ) );
+                               $article = new Article( $this->mTitle );
+                               $q = $article->isRedirect() ? 'redirect=no' : '';
+                               $wgOut->redirect( $this->mTitle->getFullUrl( $q ) );
                        }
                } else {
                        $this->show();