X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fpage%2FWikiFilePage.php;h=c478550d0b9ea484341ace716e7e805fee528972;hb=740fcb4c58746d3b797bb2fa218c6edb40daeed7;hp=0dc28bd5d19188c71ef42a98489e3135f4553d4e;hpb=500889f19005b4aed93c5b6eaafd35689fce7dcd;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/page/WikiFilePage.php b/includes/page/WikiFilePage.php index 0dc28bd5d1..c478550d0b 100644 --- a/includes/page/WikiFilePage.php +++ b/includes/page/WikiFilePage.php @@ -162,12 +162,9 @@ class WikiFilePage extends WikiPage { 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' ) ); @@ -183,7 +180,8 @@ class WikiFilePage extends WikiPage { // Purge redirect cache $this->mRepo->invalidateImageRedirect( $this->mTitle ); } - return parent::doPurge(); + + return parent::doPurge( $flags ); } /**