Merge "Fixed E_STRICT notices in PostgresUpdater::renameIndex()."
[lhc/web/wiklou.git] / includes / media / MediaHandler.php
index ab8fb06..fb305db 100644 (file)
@@ -135,9 +135,9 @@ abstract class MediaHandler {
        */
        static function getMetadataVersion () {
                $version = Array( '2' ); // core metadata version
-               wfRunHooks('GetMetadataVersion', Array(&$version));
+               wfRunHooks( 'GetMetadataVersion', Array( &$version ) );
                return implode( ';', $version);
-        }
+       }
 
        /**
        * Convert metadata version.
@@ -243,6 +243,15 @@ abstract class MediaHandler {
                return array( $ext, $mime );
        }
 
+       /**
+        * Get useful response headers for GET/HEAD requests for a file with the given metadata
+        * @param $metadata mixed Result of the getMetadata() function of this handler for a file
+        * @return Array
+        */
+       public function getStreamHeaders( $metadata ) {
+               return array();
+       }
+
        /**
         * True if the handled types can be transformed
         * @return bool
@@ -269,6 +278,19 @@ abstract class MediaHandler {
         * @return bool
         */
        function isVectorized( $file ) { return false; }
+       /**
+        * The material is an image, and is animated.
+        * In particular, video material need not return true.
+        * @note Before 1.20, this was a method of ImageHandler only
+        * @return bool
+        */
+       function isAnimatedImage( $file ) { return false; }
+       /**
+        * If the material is animated, we can animate the thumbnail
+        * @since 1.20
+        * @return bool If material is not animated, handler may return any value.
+        */
+       function canAnimateThumbnail( $file ) { return true; }
        /**
         * False if the handler is disabled for all files
         * @return bool
@@ -343,7 +365,7 @@ abstract class MediaHandler {
         * @return array for use displaying metadata.
         */
        function formatMetadataHelper( $metadataArray ) {
-                $result = array(
+               $result = array(
                        'visible' => array(),
                        'collapsed' => array()
                );