dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes LocalFile isMissing always returning true
[lhc/web/wiklou.git]
/
includes
/
filerepo
/
file
/
LocalFile.php
diff --git
a/includes/filerepo/file/LocalFile.php
b/includes/filerepo/file/LocalFile.php
index
9b9e748
..
aa04fae
100644
(file)
--- a/
includes/filerepo/file/LocalFile.php
+++ b/
includes/filerepo/file/LocalFile.php
@@
-634,7
+634,6
@@
class LocalFile extends File {
}
$this->fileExists = true;
}
$this->fileExists = true;
- $this->maybeUpgradeRow();
}
/**
}
/**
@@
-659,7
+658,7
@@
class LocalFile extends File {
/**
* Upgrade a row if it needs it
*/
/**
* Upgrade a row if it needs it
*/
- function maybeUpgradeRow() {
+
protected
function maybeUpgradeRow() {
global $wgUpdateCompatibleMetadata;
if ( wfReadOnly() || $this->upgrading ) {
global $wgUpdateCompatibleMetadata;
if ( wfReadOnly() || $this->upgrading ) {
@@
-797,11
+796,14
@@
class LocalFile extends File {
/** isVisible inherited */
/**
/** isVisible inherited */
/**
+ * Checks if this file exists in its parent repo, as referenced by its
+ * virtual URL.
+ *
* @return bool
*/
function isMissing() {
if ( $this->missing === null ) {
* @return bool
*/
function isMissing() {
if ( $this->missing === null ) {
-
list( $fileExists )
= $this->repo->fileExists( $this->getVirtualUrl() );
+
$fileExists
= $this->repo->fileExists( $this->getVirtualUrl() );
$this->missing = !$fileExists;
}
$this->missing = !$fileExists;
}
@@
-1028,6
+1030,7
@@
class LocalFile extends File {
*/
function purgeCache( $options = [] ) {
// Refresh metadata cache
*/
function purgeCache( $options = [] ) {
// Refresh metadata cache
+ $this->maybeUpgradeRow();
$this->purgeMetadataCache();
// Delete thumbnails
$this->purgeMetadataCache();
// Delete thumbnails