purge file cache on save
authorRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 17 Jul 2005 19:48:03 +0000 (19:48 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 17 Jul 2005 19:48:03 +0000 (19:48 +0000)
includes/Article.php

index e3ac744..9a26a2e 100644 (file)
@@ -1127,7 +1127,7 @@ class Article {
        function updateArticle( $text, $summary, $minor, $watchthis, $forceBot = false, $sectionanchor = '' ) {
                global $wgOut, $wgUser;
                global $wgDBtransactions, $wgMwRedir;
-               global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList;
+               global $wgUseSquid, $wgInternalServer, $wgPostCommitUpdateList, $wgUseFileCache;
 
                $fname = 'Article::updateArticle';
                $good = true;
@@ -1232,6 +1232,12 @@ class Article {
                                array_push( $wgPostCommitUpdateList, $u );
                        }
 
+                       # File cache    
+                       if ( $wgUseFileCache ) {
+                               $cm = new CacheManager($this->mTitle);
+                               @unlink($cm->fileCacheName());
+                       }
+
                        $this->showArticle( $text, wfMsg( 'updated' ), $sectionanchor, $isminor, $now, $summary, $lastRevision );
                }
                return $good;