From: Aaron Schulz Date: Fri, 29 Mar 2019 08:22:22 +0000 (-0700) Subject: filerepo: only trigger maybeUpgradeRow() on action=purge X-Git-Tag: 1.34.0-rc.0~2245^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=b814245d9f3bb8e2406fea880f9aedd514454c6c;p=lhc%2Fweb%2Fwiklou.git filerepo: only trigger maybeUpgradeRow() on action=purge Bug: T179760 Change-Id: I36ca7517702d0c2dfbcedd4d2c132cebdce7442c --- diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index 9b9e748c19..134a1045c1 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -634,7 +634,6 @@ class LocalFile extends File { } $this->fileExists = true; - $this->maybeUpgradeRow(); } /** @@ -659,7 +658,7 @@ class LocalFile extends File { /** * Upgrade a row if it needs it */ - function maybeUpgradeRow() { + protected function maybeUpgradeRow() { global $wgUpdateCompatibleMetadata; if ( wfReadOnly() || $this->upgrading ) { @@ -1028,6 +1027,7 @@ class LocalFile extends File { */ function purgeCache( $options = [] ) { // Refresh metadata cache + $this->maybeUpgradeRow(); $this->purgeMetadataCache(); // Delete thumbnails