From: Aaron Schulz Date: Wed, 4 May 2016 17:56:23 +0000 (-0700) Subject: Remove upgradeRow() call from ?action=purge X-Git-Tag: 1.31.0-rc.0~7066^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=9120ee007ae32239c1007e9410c81b9e7df18edd;p=lhc%2Fweb%2Fwiklou.git Remove upgradeRow() call from ?action=purge This is overkill and can cause excess lock contention on larger files. Purges are typically used to fix thumbnails or CDN, not metadata. Scripts can always be run to fix any real breakage. Bug: T132921 Change-Id: Ieecf1c015735b7219ca51c87951b59c453cf588f --- diff --git a/includes/page/WikiFilePage.php b/includes/page/WikiFilePage.php index a6b991588d..0dc28bd5d1 100644 --- a/includes/page/WikiFilePage.php +++ b/includes/page/WikiFilePage.php @@ -26,12 +26,13 @@ * @ingroup Media */ class WikiFilePage extends WikiPage { - /** - * @var File - */ + /** @var File */ protected $mFile = false; + /** @var LocalRepo */ protected $mRepo = null; + /** @var bool */ protected $mFileLoaded = false; + /** @var array */ protected $mDupes = null; public function __construct( $title ) { @@ -170,7 +171,6 @@ class WikiFilePage extends WikiPage { if ( $this->mFile->exists() ) { wfDebug( 'ImagePage::doPurge purging ' . $this->mFile->getName() . "\n" ); DeferredUpdates::addUpdate( new HTMLCacheUpdate( $this->mTitle, 'imagelinks' ) ); - $this->mFile->upgradeRow(); $this->mFile->purgeCache( [ 'forThumbRefresh' => true ] ); } else { wfDebug( 'ImagePage::doPurge no image for '