* Don't make logged in users go through the action=purge clickthrough
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 21 Nov 2005 17:08:11 +0000 (17:08 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 21 Nov 2005 17:08:11 +0000 (17:08 +0000)
includes/Article.php

index 316d73b..35a23f5 100644 (file)
@@ -922,9 +922,9 @@ class Article {
        }
        
        function purge() {
-               global $wgRequest, $wgOut, $wgUseSquid;
+               global $wgUser, $wgRequest, $wgOut, $wgUseSquid;
 
-               if ( $wgRequest->wasPosted() ) {
+               if ( $wgUser->isLoggedIn() || $wgRequest->wasPosted() ) {
                        // Invalidate the cache
                        $this->mTitle->invalidateCache();
 
@@ -2176,7 +2176,6 @@ class Article {
                global $wgDeferredUpdateList, $wgDBname, $wgMemc;
                global $wgMessageCache, $wgUser, $wgUseEnotif;
 
-               
                if ( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', &$this ) ) {
                        wfSeedRandom();
                        if ( 0 == mt_rand( 0, 999 ) ) {