Minor bugfix to IP::prettifyIP.
[lhc/web/wiklou.git] / includes / WikiFilePage.php
index 0114cce..fe1ff88 100644 (file)
@@ -42,7 +42,7 @@ class WikiFilePage extends WikiPage {
 
        public function getActionOverrides() {
                $overrides = parent::getActionOverrides();
-               $overrides[ 'revert' ] = 'RevertFileAction';
+               $overrides['revert'] = 'RevertFileAction';
                return $overrides;
        }
 
@@ -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();
        }
 }