X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fupload%2FUploadStash.php;h=b7160b3ba83dc155160b2e3cd85ff05fcca586c6;hb=3649eb7db23edd9a9fa302994e9e916c59288dab;hp=c171ded7da02abc554456fe4a9de6671c95b9b5a;hpb=a00cef7d9f71fa2f53e683b7630d9ce90915d6be;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadStash.php b/includes/upload/UploadStash.php index c171ded7da..b7160b3ba8 100644 --- a/includes/upload/UploadStash.php +++ b/includes/upload/UploadStash.php @@ -207,7 +207,9 @@ class UploadStash { wfDebug( __METHOD__ . " tried to stash file at '$path', but it doesn't exist\n" ); throw new UploadStashBadPathException( "path doesn't exist" ); } - $fileProps = FSFile::getPropsFromPath( $path ); + + $mwProps = new MWFileProps( MimeMagic::singleton() ); + $fileProps = $mwProps->getPropsFromPath( $path, true ); wfDebug( __METHOD__ . " stashing file at '$path'\n" ); // we will be initializing from some tmpnam files that don't have extensions. @@ -499,10 +501,10 @@ class UploadStash { * Helper function: do the actual database query to fetch file metadata. * * @param string $key - * @param int $readFromDB Constant (default: DB_SLAVE) + * @param int $readFromDB Constant (default: DB_REPLICA) * @return bool */ - protected function fetchFileMetadata( $key, $readFromDB = DB_SLAVE ) { + protected function fetchFileMetadata( $key, $readFromDB = DB_REPLICA ) { // populate $fileMetadata[$key] $dbr = null; if ( $readFromDB === DB_MASTER ) {