X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fmedia%2FMediaHandler.php;h=bad1468fe77d2c5d9cec91b1ca4f97ab3d1845ab;hb=6da98ee84b844c9fba0d6c7fa76d8fc50bf2abbc;hp=33aed34f4f7229d603cb587e63d647a2c45478ad;hpb=4e90d55fdc9d31d93e24cf05687eb7d180806f44;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 33aed34f4f..bad1468fe7 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -180,10 +180,10 @@ abstract class MediaHandler { function convertMetadataVersion( $metadata, $version = 1 ) { if ( !is_array( $metadata ) ) { - //unserialize to keep return parameter consistent. - wfSuppressWarnings(); + // unserialize to keep return parameter consistent. + MediaWiki\suppressWarnings(); $ret = unserialize( $metadata ); - wfRestoreWarnings(); + MediaWiki\restoreWarnings(); return $ret; } @@ -373,7 +373,7 @@ abstract class MediaHandler { * @param File $file * @return bool */ - function pageCount( $file ) { + function pageCount( File $file ) { return false; } @@ -434,7 +434,7 @@ abstract class MediaHandler { * @param int $page What page to get dimensions of * @return array|bool */ - function getPageDimensions( $image, $page ) { + function getPageDimensions( File $image, $page ) { $gis = $this->getImageSize( $image, $image->getLocalRefPath() ); if ( $gis ) { return array( @@ -454,7 +454,7 @@ abstract class MediaHandler { * @return bool|string Page text or false when no text found or if * unsupported. */ - function getPageText( $image, $page ) { + function getPageText( File $image, $page ) { return false; } @@ -866,14 +866,21 @@ abstract class MediaHandler { * Gets configuration for the file warning message. Return value of * the following structure: * array( - * 'module' => 'example.filewarning.messages', // Required, module with messages loaded for the client - * 'messages' => array( // Required, array of names of messages - * 'main' => 'example-filewarning-main', // Required, main warning message - * 'header' => 'example-filewarning-header', // Optional, header for warning dialog - * 'footer' => 'example-filewarning-footer', // Optional, footer for warning dialog - * 'info' => 'example-filewarning-info', // Optional, text for more-information link (see below) + * // Required, module with messages loaded for the client + * 'module' => 'example.filewarning.messages', + * // Required, array of names of messages + * 'messages' => array( + * // Required, main warning message + * 'main' => 'example-filewarning-main', + * // Optional, header for warning dialog + * 'header' => 'example-filewarning-header', + * // Optional, footer for warning dialog + * 'footer' => 'example-filewarning-footer', + * // Optional, text for more-information link (see below) + * 'info' => 'example-filewarning-info', * ), - * 'link' => 'http://example.com', // Optional, link for more information + * // Optional, link for more information + * 'link' => 'http://example.com', * ) * * Returns null if no warning is necessary.