media: Mark ImageHandler::getScriptParams() as protected
[lhc/web/wiklou.git] / includes / media / JpegHandler.php
index 287c198..4bcb53d 100644 (file)
@@ -34,7 +34,7 @@ class JpegHandler extends ExifBitmapHandler {
        const SRGB_EXIF_COLOR_SPACE = 'sRGB';
        const SRGB_ICC_PROFILE_DESCRIPTION = 'sRGB IEC61966-2.1';
 
-       function normaliseParams( $image, &$params ) {
+       public function normaliseParams( $image, &$params ) {
                if ( !parent::normaliseParams( $image, $params ) ) {
                        return false;
                }
@@ -90,7 +90,7 @@ class JpegHandler extends ExifBitmapHandler {
                return $res;
        }
 
-       function getScriptParams( $params ) {
+       protected function getScriptParams( $params ) {
                $res = parent::getScriptParams( $params );
                if ( isset( $params['quality'] ) ) {
                        $res['quality'] = $params['quality'];
@@ -98,7 +98,7 @@ class JpegHandler extends ExifBitmapHandler {
                return $res;
        }
 
-       function getMetadata( $image, $filename ) {
+       public function getMetadata( $image, $filename ) {
                try {
                        $meta = BitmapMetadataHandler::Jpeg( $filename );
                        if ( !is_array( $meta ) ) {
@@ -232,7 +232,7 @@ class JpegHandler extends ExifBitmapHandler {
         * @return bool
         */
        public function swapICCProfile( $filepath, array $colorSpaces,
-                                                                       array $oldProfileStrings, $profileFilepath
+               array $oldProfileStrings, $profileFilepath
        ) {
                global $wgExiftool;
 
@@ -259,13 +259,13 @@ class JpegHandler extends ExifBitmapHandler {
 
                // Make a regex out of the source data to match it to an array of color
                // spaces in a case-insensitive way
-               $colorSpaceRegex = '/'.preg_quote( $data[0], '/' ).'/i';
+               $colorSpaceRegex = '/' . preg_quote( $data[0], '/' ) . '/i';
                if ( empty( preg_grep( $colorSpaceRegex, $colorSpaces ) ) ) {
                        // We can't establish that this file matches the color space, don't process it
                        return false;
                }
 
-               $profileRegex = '/'.preg_quote( $data[1], '/' ).'/i';
+               $profileRegex = '/' . preg_quote( $data[1], '/' ) . '/i';
                if ( empty( preg_grep( $profileRegex, $oldProfileStrings ) ) ) {
                        // We can't establish that this file has the expected ICC profile, don't process it
                        return false;