From: Victor Vasiliev Date: Sat, 26 Jan 2008 18:45:54 +0000 (+0000) Subject: Invalidate file cache on image redirects deletion X-Git-Tag: 1.31.0-rc.0~49766 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=ae2b3bb9677e2a189f62032d038ce22b2826419a;p=lhc%2Fweb%2Fwiklou.git Invalidate file cache on image redirects deletion --- diff --git a/includes/Article.php b/includes/Article.php index cf05267d01..79b38e2c7f 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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(); + } } /** diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index c08a77701a..7d43ebd63e 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -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;