From faaca125b1c2977b16065d88d3b6cc0d2b04600b Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Mon, 18 Aug 2008 22:21:13 +0000 Subject: [PATCH] (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. --- includes/Article.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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(); } /** -- 2.20.1