return $this->mDupes;
}
- /**
- * Override handling of action=purge
- * @return bool
- */
- public function doPurge() {
+ public function doPurge( $flags = self::PURGE_ALL ) {
$this->loadFile();
+
if ( $this->mFile->exists() ) {
wfDebug( 'ImagePage::doPurge purging ' . $this->mFile->getName() . "\n" );
DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, 'imagelinks' ) );
// Purge redirect cache
$this->mRepo->invalidateImageRedirect( $this->mTitle );
}
- return parent::doPurge();
+
+ return parent::doPurge( $flags );
}
/**
/** @var LocalRepo $repo */
$repo = $file->getRepo();
- $dbr = $repo->getSlaveDB();
+ $dbr = $repo->getReplicaDB();
$res = $dbr->select(
[ 'page', 'categorylinks' ],
return TitleArray::newFromResult( $res );
}
+
+ /**
+ * @since 1.28
+ * @return string
+ */
+ public function getWikiDisplayName() {
+ return $this->getFile()->getRepo()->getDisplayName();
+ }
+
+ /**
+ * @since 1.28
+ * @return string
+ */
+ public function getSourceURL() {
+ return $this->getFile()->getDescriptionUrl();
+ }
}