purging on revert
authorGabriel Wicke <gwicke@users.mediawiki.org>
Tue, 3 Feb 2004 01:48:16 +0000 (01:48 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Tue, 3 Feb 2004 01:48:16 +0000 (01:48 +0000)
includes/Article.php

index 3f57d9e..883bcaa 100644 (file)
@@ -941,6 +941,7 @@ class Article {
        function rollback()
        {
                global $wgUser, $wgLang, $wgOut, $from;
+               global $wgUseSquid, $wgInternalServer;
 
                if ( ! $wgUser->isSysop() ) {
                        $wgOut->sysopRequired();
@@ -1015,6 +1016,14 @@ class Article {
                $wgOut->addHTML( "<h2>" . $newcomment . "</h2>\n<hr>\n" );
                $this->updateArticle( Article::getRevisionText( $s ), $newcomment, 1, $this->mTitle->userIsWatching(), "", $bot );
                
+               # Squid purging 
+               if ( $wgUseSquid ) {
+                       $urlArr = Array( 
+                               $wgInternalServer.wfLocalUrl( $this->mTitle->getPrefixedURL())
+                       );                      
+                       wfPurgeSquidServers($urlArr);
+               }
+               
                Article::onArticleEdit( $this->mTitle );
                $wgOut->returnToMain( false );
        }