X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ffilerepo%2FFileRepo.php;h=1a6c8180ef6c8db73e5343ec4f17e1a2a948be68;hb=5e8896ce39894b9c705a291525c6735a576b6b1c;hp=b8b1cf6a17ad363a802135cc4e9d5ff012f353cd;hpb=1616135fd54118cb016f62dd871e8848d22ae2fe;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index b8b1cf6a17..1a6c8180ef 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -825,7 +825,7 @@ class FileRepo { $status = $this->storeBatch( [ [ $srcPath, $dstZone, $dstRel ] ], $flags ); if ( $status->successCount == 0 ) { - $status->ok = false; + $status->setOK( false ); } return $status; @@ -1166,7 +1166,7 @@ class FileRepo { $status = $this->publishBatch( [ [ $src, $dstRel, $archiveRel, $options ] ], $flags ); if ( $status->successCount == 0 ) { - $status->ok = false; + $status->setOK( false ); } if ( isset( $status->value[0] ) ) { $status->value = $status->value[0]; @@ -1539,9 +1539,15 @@ class FileRepo { * @return array */ public function getFileProps( $virtualUrl ) { - $path = $this->resolveToStoragePath( $virtualUrl ); + $fsFile = $this->getLocalReference( $virtualUrl ); + $mwProps = new MWFileProps( MimeMagic::singleton() ); + if ( $fsFile ) { + $props = $mwProps->getPropsFromPath( $fsFile->getPath(), true ); + } else { + $props = $mwProps->newPlaceholderProps(); + } - return $this->backend->getFileProps( [ 'src' => $path ] ); + return $props; } /**