From 8199d6121aeadb4a6c9c6975b804e3e55e112fd5 Mon Sep 17 00:00:00 2001 From: Jan Gerber Date: Mon, 26 Nov 2012 11:42:09 +0000 Subject: [PATCH] Bug 42445: Fix file revert with local repo reverting a file a virtual url is passed to upload without props, get props from backend, virutal urls are not local files. Change-Id: I1d56a6237e1d2af9941f29e4ba3f0262817b0e8d --- includes/filerepo/file/LocalFile.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php index c2c17f5713..da1e1fa4bd 100644 --- a/includes/filerepo/file/LocalFile.php +++ b/includes/filerepo/file/LocalFile.php @@ -974,9 +974,13 @@ class LocalFile extends File { if ( !$props ) { wfProfileIn( __METHOD__ . '-getProps' ); - $props = FileBackend::isStoragePath( $srcPath ) - ? $this->repo->getFileProps( $srcPath ) - : FSFile::getPropsFromPath( $srcPath ); + if ( $this->repo->isVirtualUrl( $srcPath ) + || FileBackend::isStoragePath( $srcPath ) ) + { + $props = $this->repo->getFileProps( $srcPath ); + } else { + $props = FSFile::getPropsFromPath( $srcPath ); + } wfProfileOut( __METHOD__ . '-getProps' ); } -- 2.20.1