Merge "Maintenance: detect missing parent::__construct()"
[lhc/web/wiklou.git] / includes / WikiFilePage.php
index fa23072..fe1ff88 100644 (file)
@@ -107,7 +107,7 @@ class WikiFilePage extends WikiPage {
        /**
         * @return bool
         */
-       public function isRedirect( ) {
+       public function isRedirect() {
                $this->loadFile();
                if ( $this->mFile->isLocal() ) {
                        return parent::isRedirect();
@@ -183,6 +183,10 @@ class WikiFilePage extends WikiPage {
                        // to be updated (in case the cached information is wrong)
                        $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
                }
+               if ( $this->mRepo ) {
+                       // Purge redirect cache
+                       $this->mRepo->invalidateImageRedirect( $this->mTitle );
+               }
                return parent::doPurge();
        }
 }