r39619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39618‎ | r39619 | r39620 >
Date:22:21, 18 August 2008
Author:demon
Status:old
Tags:
Comment:
(bug 13689) Page output can be suppressed on Article::purge() by passing bool false to it. Default (ie: nearly 100+% of the time) is true.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1037,8 +1037,9 @@
10381038
10391039 /**
10401040 * Handle action=purge
 1041+ * @param bool $showPage Show the page after purging?
10411042 */
1042 - function purge() {
 1043+ function purge( $showPage = true ) {
10431044 global $wgUser, $wgRequest, $wgOut;
10441045
10451046 if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) {
@@ -1058,6 +1059,10 @@
10591060 $wgOut->setRobotPolicy( 'noindex,nofollow' );
10601061 $wgOut->addHTML( $msg );
10611062 }
 1063+ // Show the page post-purge? 99.99% of the time yes, but sometimes no.
 1064+ if ( $showPage ) {
 1065+ $this->view();
 1066+ }
10621067 }
10631068
10641069 /**
@@ -1086,7 +1091,6 @@
10871092 }
10881093 $wgMessageCache->replace( $this->mTitle->getDBkey(), $text );
10891094 }
1090 - $this->view();
10911095 }
10921096
10931097 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r39654Reverting r39619 "(bug 13689) Page output can be suppressed on Article::purge...brion18:58, 19 August 2008

Status & tagging log