Author: gm8080
Description:
This is low priority. I have already fixed this on my wiki.
Basically what I am suggesting is to add a new parameter to functions purge and doPurge in class Article in Article.php.
The problem is:
By default, the purge function outputs the article text to the page, because it was designed to be called directly on the page it's purging.
But, if one wants to purge certain pages from an extension using $articleobj->purge(), it isn't possible with the current set up without adding to the output.
Technically, someone could just use the MessageCache directly, but what if someone changes any code in the MessageCache? It would break extensions relying on this. Article::Purge() is a much better way to go for extensions.
This is what needs to be changed:
at the purge function definition:
function purge($show=true) {
and then at the "doPurge()" call inside the first IF:
$this->doPurge($show);
and then at the "} else {" where it adds the confirmation button:
} elseif($show) {
and then at the doPurge definition:
function doPurge($show=true) {
and then at the "view()" call at the end of doPurge:
if($show) $this->view();
Version: 1.12.x
Severity: enhancement