From: Brion Vibber Date: Tue, 19 Aug 2008 18:58:50 +0000 (+0000) Subject: Reverting r39619 "(bug 13689) Page output can be suppressed on Article::purge() by... X-Git-Tag: 1.31.0-rc.0~45793 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=5667e45446ecb6941dc5ec4bc6b2e28e7b4d0d7f;p=lhc%2Fweb%2Fwiklou.git 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) --- diff --git a/includes/Article.php b/includes/Article.php index 3a2de3864e..7e2b6b7c1d 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1037,9 +1037,8 @@ class Article { /** * Handle action=purge - * @param bool $showPage Show the page after purging? */ - function purge( $showPage = true ) { + function purge() { global $wgUser, $wgRequest, $wgOut; if ( $wgUser->isAllowed( 'purge' ) || $wgRequest->wasPosted() ) { @@ -1059,10 +1058,6 @@ 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(); - } } /** @@ -1091,6 +1086,7 @@ class Article { } $wgMessageCache->replace( $this->mTitle->getDBkey(), $text ); } + $this->view(); } /**