r39654 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39653‎ | r39654 | r39655 >
Date:18:58, 19 August 2008
Author:brion
Status:old
Tags:
Comment:
Reverting r39619 "(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."

Article::purge() is a UI action entry point, not a backend method. Backend-only parameters aren't appropriate here; instead a method suitable for backend usage should be created (and/or in an ideal world, we should finish splitting Article backend stuff from UI frontend as separate classes)
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1037,9 +1037,8 @@
10381038
10391039 /**
10401040 * Handle action=purge
1041 - * @param bool $showPage Show the page after purging?
10421041 */
1043 - function purge( $showPage = true ) {
 1042+ function purge() {
10441043 global $wgUser, $wgRequest, $wgOut;
10451044
10461045 if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) {
@@ -1059,10 +1058,6 @@
10601059 $wgOut->setRobotPolicy( 'noindex,nofollow' );
10611060 $wgOut->addHTML( $msg );
10621061 }
1063 - // Show the page post-purge? 99.99% of the time yes, but sometimes no.
1064 - if ( $showPage ) {
1065 - $this->view();
1066 - }
10671062 }
10681063
10691064 /**
@@ -1091,6 +1086,7 @@
10921087 }
10931088 $wgMessageCache->replace( $this->mTitle->getDBkey(), $text );
10941089 }
 1090+ $this->view();
10951091 }
10961092
10971093 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r39619(bug 13689) Page output can be suppressed on Article::purge() by passing bool...demon22:21, 18 August 2008

Status & tagging log