filerepo: only trigger maybeUpgradeRow() on action=purge

Bug: T179760
Change-Id: I36ca7517702d0c2dfbcedd4d2c132cebdce7442c
This commit is contained in:
Aaron Schulz 2019-03-29 01:22:22 -07:00
parent fe79aa06b8
commit b814245d9f

View file

@ -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