filerepo: only trigger maybeUpgradeRow() on action=purge
Bug: T179760 Change-Id: I36ca7517702d0c2dfbcedd4d2c132cebdce7442c
This commit is contained in:
parent
fe79aa06b8
commit
b814245d9f
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue