X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Flibs%2Ffilebackend%2Ffsfile%2FTempFSFile.php;h=b993626fda3a2daf44a8c9ff64f31269957c4c4f;hb=11f73158fb70d8a6d6b931b0c73e5e74a8aa12b2;hp=fed6812f5beaef08ae0d92763be04d21e93a92fc;hpb=4cb9c1a24bde6e29c5e8f05c7cd1de54ffdd342a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/filebackend/fsfile/TempFSFile.php b/includes/libs/filebackend/fsfile/TempFSFile.php index fed6812f5b..b993626fda 100644 --- a/includes/libs/filebackend/fsfile/TempFSFile.php +++ b/includes/libs/filebackend/fsfile/TempFSFile.php @@ -61,10 +61,10 @@ class TempFSFile extends FSFile { if ( !is_string( $tmpDirectory ) ) { $tmpDirectory = self::getUsableTempDirectory(); } - $path = wfTempDir() . '/' . $prefix . $hex . $ext; - MediaWiki\suppressWarnings(); + $path = $tmpDirectory . '/' . $prefix . $hex . $ext; + Wikimedia\suppressWarnings(); $newFileHandle = fopen( $path, 'x' ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); if ( $newFileHandle ) { fclose( $newFileHandle ); $tmpFile = new self( $path ); @@ -119,9 +119,9 @@ class TempFSFile extends FSFile { */ public function purge() { $this->canDelete = false; // done - MediaWiki\suppressWarnings(); + Wikimedia\suppressWarnings(); $ok = unlink( $this->path ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); unset( self::$pathsCollect[$this->path] ); @@ -178,10 +178,10 @@ class TempFSFile extends FSFile { * This method should only be called internally */ public static function purgeAllOnShutdown() { - foreach ( self::$pathsCollect as $path ) { - MediaWiki\suppressWarnings(); + foreach ( self::$pathsCollect as $path => $unused ) { + Wikimedia\suppressWarnings(); unlink( $path ); - MediaWiki\restoreWarnings(); + Wikimedia\restoreWarnings(); } }