Revert "merged master"
[lhc/web/wiklou.git] / includes / media / MediaTransformOutput.php
index cee5bbf..00d12bb 100644 (file)
@@ -157,14 +157,7 @@ abstract class MediaTransformOutput {
         * @return Bool success
         */
        public function streamFile( $headers = array() ) {
-               if ( !$this->path ) {
-                       return false;
-               } elseif ( FileBackend::isStoragePath( $this->path ) ) {
-                       $be = $this->file->getRepo()->getBackend();
-                       return $be->streamFile( array( 'src' => $this->path, 'headers' => $headers ) )->isOK();
-               } else { // FS-file
-                       return StreamFile::stream( $this->getLocalCopyPath(), $headers );
-               }
+               return $this->path && StreamFile::stream( $this->getLocalCopyPath(), $headers );
        }
 
        /**
@@ -366,6 +359,6 @@ class TransformParameterError extends MediaTransformError {
                parent::__construct( 'thumbnail_error',
                        max( isset( $params['width']  ) ? $params['width']  : 0, 120 ),
                        max( isset( $params['height'] ) ? $params['height'] : 0, 120 ),
-                       wfMessage( 'thumbnail_invalid_params' )->text() );
+                       wfMsg( 'thumbnail_invalid_params' ) );
        }
 }