From: Rob Church Date: Tue, 26 Jun 2007 21:24:23 +0000 (+0000) Subject: Drop the `redirect=no` thing for non-redirects, per Brion. Seems like a waste of... X-Git-Tag: 1.31.0-rc.0~52381 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=9245969b82ad346f730a8ffd1092d593fc963ace;p=lhc%2Fweb%2Fwiklou.git Drop the `redirect=no` thing for non-redirects, per Brion. Seems like a waste of time and a needless load of the page record and text to me, but he's the boss... --- diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 8ec5fd438d..f34931167e 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -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();