summaryrefslogtreecommitdiff
path: root/includes/WikiFilePage.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/WikiFilePage.php')
-rw-r--r--includes/WikiFilePage.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/includes/WikiFilePage.php b/includes/WikiFilePage.php
index 9fb1522d..fe1ff88a 100644
--- a/includes/WikiFilePage.php
+++ b/includes/WikiFilePage.php
@@ -41,7 +41,9 @@ class WikiFilePage extends WikiPage {
}
public function getActionOverrides() {
- return array( 'revert' => 'RevertFileAction' );
+ $overrides = parent::getActionOverrides();
+ $overrides['revert'] = 'RevertFileAction';
+ return $overrides;
}
/**
@@ -103,13 +105,12 @@ class WikiFilePage extends WikiPage {
}
/**
- * @param bool $text
* @return bool
*/
- public function isRedirect( $text = false ) {
+ public function isRedirect() {
$this->loadFile();
if ( $this->mFile->isLocal() ) {
- return parent::isRedirect( $text );
+ return parent::isRedirect();
}
return (bool)$this->mFile->getRedirected();
@@ -182,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();
}
}