From: Jan Gerber Date: Mon, 26 Nov 2012 11:42:09 +0000 (+0000) Subject: Bug 42445: Fix file revert with local repo X-Git-Tag: 1.31.0-rc.0~21517 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=8199d6121aeadb4a6c9c6975b804e3e55e112fd5;p=lhc%2Fweb%2Fwiklou.git 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 --- 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' ); }