* Added a hook (ArticlePurge) to Article::purge() to override whether or not
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 31 Dec 2005 01:23:33 +0000 (01:23 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Sat, 31 Dec 2005 01:23:33 +0000 (01:23 +0000)
  anonymous users have to go through a confirmation to purge their cache

includes/Article.php

index 5a667b6..2945a2a 100644 (file)
@@ -975,7 +975,7 @@ class Article {
        function purge() {
                global $wgUser, $wgRequest, $wgOut, $wgUseSquid;
 
-               if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() ) {
+               if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() || ! wfRunHooks( 'ArticlePurge', array( &$this ) ) ) {
                        // Invalidate the cache
                        $this->mTitle->invalidateCache();