r23438 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23437‎ | r23438 | r23439 >
Date:21:24, 26 June 2007
Author:robchurch
Status:old
Tags:
Comment:
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...
Modified paths:
  • /trunk/phase3/includes/ProtectionForm.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ProtectionForm.php
@@ -76,11 +76,12 @@
7777 }
7878
7979 function execute() {
80 - global $wgRequest;
 80+ global $wgRequest, $wgOut;
8181 if( $wgRequest->wasPosted() ) {
8282 if( $this->save() ) {
83 - global $wgOut;
84 - $wgOut->redirect( $this->mTitle->getFullUrl( 'redirect=no' ) );
 83+ $article = new Article( $this->mTitle );
 84+ $q = $article->isRedirect() ? 'redirect=no' : '';
 85+ $wgOut->redirect( $this->mTitle->getFullUrl( $q ) );
8586 }
8687 } else {
8788 $this->show();

Follow-up revisions

RevisionCommit summaryAuthorDate
r23581Merged revisions 23406-23580 via svnmerge from...david04:50, 30 June 2007

Status & tagging log