From: Chad Horohoe Date: Mon, 18 Aug 2008 22:21:13 +0000 (+0000) Subject: (bug 13689) Page output can be suppressed on Article::purge() by passing bool false... X-Git-Tag: 1.31.0-rc.0~45811 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/modifier.php?a=commitdiff_plain;h=faaca125b1c2977b16065d88d3b6cc0d2b04600b;p=lhc%2Fweb%2Fwiklou.git (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. --- diff --git a/includes/Article.php b/includes/Article.php index 7e2b6b7c1d..3a2de3864e 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1037,8 +1037,9 @@ class Article { /** * Handle action=purge + * @param bool $showPage Show the page after purging? */ - function purge() { + function purge( $showPage = true ) { global $wgUser, $wgRequest, $wgOut; if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) { @@ -1058,6 +1059,10 @@ class Article { $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->addHTML( $msg ); } + // Show the page post-purge? 99.99% of the time yes, but sometimes no. + if ( $showPage ) { + $this->view(); + } } /** @@ -1086,7 +1091,6 @@ class Article { } $wgMessageCache->replace( $this->mTitle->getDBkey(), $text ); } - $this->view(); } /**