Make Swift backend respect Content-Type in create/store
[lhc/web/wiklou.git] / includes / filebackend / MemoryFileBackend.php
index 7c2f825..2879ddd 100644 (file)
@@ -35,6 +35,10 @@ class MemoryFileBackend extends FileBackendStore {
        /** @var array Map of (file path => (data,mtime) */
        protected $files = array();
 
+       public function getFeatures() {
+               return self::ATTR_UNICODE_PATHS;
+       }
+
        public function isPathUsableInternal( $storagePath ) {
                return true;
        }
@@ -67,9 +71,9 @@ class MemoryFileBackend extends FileBackendStore {
                        return $status;
                }
 
-               wfSuppressWarnings();
+               MediaWiki\suppressWarnings();
                $data = file_get_contents( $params['src'] );
-               wfRestoreWarnings();
+               MediaWiki\restoreWarnings();
                if ( $data === false ) { // source doesn't exist?
                        $status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );