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)
/**
* 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() ) {
$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();
- }
}
/**
}
$wgMessageCache->replace( $this->mTitle->getDBkey(), $text );
}
+ $this->view();
}
/**