Invalidate file cache on image redirects deletion
authorVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sat, 26 Jan 2008 18:45:54 +0000 (18:45 +0000)
committerVictor Vasiliev <vasilievvv@users.mediawiki.org>
Sat, 26 Jan 2008 18:45:54 +0000 (18:45 +0000)
includes/Article.php
includes/SpecialUndelete.php

index cf05267..79b38e2 100644 (file)
@@ -2960,6 +2960,10 @@ class Article {
                if( $title->getNamespace() == NS_MEDIAWIKI) {
                        $wgMessageCache->replace( $title->getDBkey(), false );
                }
+               if( $title->getNamespace() == NS_IMAGE ) {
+                       $update = new HTMLCacheUpdate( $title, 'imagelinks' );
+                       $update->doUpdate();
+               }
        }
 
        /**
index c08a777..7d43ebd 100644 (file)
@@ -499,6 +499,11 @@ class PageArchive {
                                wfRunHooks( 'ArticleUndelete', array( &$this->title, false ) );
                                Article::onArticleEdit( $this->title );
                        }
+
+                       if( $this->title->getNamespace() == NS_IMAGE ) {
+                               $update = new HTMLCacheUpdate( $this->title, 'imagelinks' );
+                               $update->doUpdate();
+                       }
                } else {
                        // Revision couldn't be created. This is very weird
                        return self::UNDELETE_UNKNOWNERR;