Merge "Add UserMailerTransformX and UserMailerSplitTo hooks"
[lhc/web/wiklou.git] / includes / page / WikiFilePage.php
index 34f15c3..c508abe 100644 (file)
@@ -40,12 +40,6 @@ class WikiFilePage extends WikiPage {
                $this->mRepo = null;
        }
 
-       public function getActionOverrides() {
-               $overrides = parent::getActionOverrides();
-               $overrides['revert'] = 'RevertFileAction';
-               return $overrides;
-       }
-
        /**
         * @param File $file
         */
@@ -175,8 +169,7 @@ class WikiFilePage extends WikiPage {
                $this->loadFile();
                if ( $this->mFile->exists() ) {
                        wfDebug( 'ImagePage::doPurge purging ' . $this->mFile->getName() . "\n" );
-                       $update = new HTMLCacheUpdate( $this->mTitle, 'imagelinks' );
-                       $update->doUpdate();
+                       DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, 'imagelinks' ) );
                        $this->mFile->upgradeRow();
                        $this->mFile->purgeCache( array( 'forThumbRefresh' => true ) );
                } else {
@@ -207,7 +200,7 @@ class WikiFilePage extends WikiPage {
                $title = $this->mTitle;
                $file = $this->mFile;
 
-               if ( ! $file instanceof LocalFile ) {
+               if ( !$file instanceof LocalFile ) {
                        wfDebug( __CLASS__ . '::' . __METHOD__ . " is not supported for this file\n" );
                        return TitleArray::newFromResult( new FakeResultWrapper( array() ) );
                }