From 9245969b82ad346f730a8ffd1092d593fc963ace Mon Sep 17 00:00:00 2001 From: Rob Church Date: Tue, 26 Jun 2007 21:24:23 +0000 Subject: [PATCH] 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... --- includes/ProtectionForm.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(); -- 2.20.1