From e6e0baefe4ab547500cf6ba311d2e35d57914e1e Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Tue, 27 Dec 2011 00:28:23 +0000 Subject: [PATCH] w/s --- includes/DefaultSettings.php | 6 +++--- includes/filerepo/file/File.php | 8 ++++---- includes/media/Bitmap.php | 12 ++++++------ includes/media/ExifBitmap.php | 8 ++++---- languages/messages/MessagesEn.php | 2 +- languages/messages/MessagesQqq.php | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 9c9ce468e4..bd12a040c7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2490,13 +2490,13 @@ $wgEdititis = false; $wgBetterDirectionality = true; /** - * Some web hosts attempt to rewrite all responses with a 404 (not found) + * Some web hosts attempt to rewrite all responses with a 404 (not found) * status code, mangling or hiding MediaWiki's output. If you are using such a - * host, you should start looking for a better one. While you're doing that, + * host, you should start looking for a better one. While you're doing that, * set this to false to convert some of MediaWiki's 404 responses to 200 so * that the generated error pages can be seen. * - * In cases where for technical reasons it is more important for MediaWiki to + * In cases where for technical reasons it is more important for MediaWiki to * send the correct status code than for the body to be transmitted intact, * this configuration variable is ignored. */ diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index 4cf15f04a3..04fa2f463a 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -35,7 +35,7 @@ abstract class File { const RENDER_NOW = 1; /** * Force rendering even if thumbnail already exist and using RENDER_NOW - * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE + * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE */ const RENDER_FORCE = 2; @@ -99,7 +99,7 @@ abstract class File { /** * Call this constructor from child classes. - * + * * Both $title and $repo are optional, though some functions * may return false or throw exceptions if they are not set. * Most subclasses will want to call assertRepoDefined() here. @@ -335,7 +335,7 @@ abstract class File { * Get an FS copy or original of this file and return the path. * Returns false on failure. Callers must not alter the file. * Temporary files are cleared automatically. - * + * * @return string|false */ public function getLocalRefPath() { @@ -775,7 +775,7 @@ abstract class File { return $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params ); } } elseif ( $flags & self::RENDER_FORCE ) { - wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" ); + wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" ); } // Create a temp FS file with the same extension diff --git a/includes/media/Bitmap.php b/includes/media/Bitmap.php index fa9067d8c9..0a4c55f3c6 100644 --- a/includes/media/Bitmap.php +++ b/includes/media/Bitmap.php @@ -45,9 +45,9 @@ class BitmapHandler extends ImageHandler { wfRunHooks( 'BitmapHandlerCheckImageArea', array( $image, &$params, &$checkImageAreaHookResult ) ); if ( is_null( $checkImageAreaHookResult ) ) { global $wgMaxImageArea; - + if ( $srcWidth * $srcHeight > $wgMaxImageArea && - !( $image->getMimeType() == 'image/jpeg' && + !( $image->getMimeType() == 'image/jpeg' && self::getScalerType( false, false ) == 'im' ) ) { # Only ImageMagick can efficiently downsize jpg images without loading # the entire file in memory @@ -56,7 +56,7 @@ class BitmapHandler extends ImageHandler { } else { return $checkImageAreaHookResult; } - + return true; } @@ -89,10 +89,10 @@ class BitmapHandler extends ImageHandler { /** * Function that returns the number of pixels to be thumbnailed. * Intended for animated GIFs to multiply by the number of frames. - * + * * @param File $image * @return int - */ + */ function getImageArea( $image ) { return $image->getWidth() * $image->getHeight(); } @@ -132,7 +132,7 @@ class BitmapHandler extends ImageHandler { # Determine scaler type $scaler = self::getScalerType( $dstPath ); - + wfDebug( __METHOD__ . ": creating {$scalerParams['physicalDimensions']} thumbnail at $dstPath using scaler $scaler\n" ); if ( !$image->mustRender() && diff --git a/includes/media/ExifBitmap.php b/includes/media/ExifBitmap.php index 1b0ab78a53..7b9867f7e3 100644 --- a/includes/media/ExifBitmap.php +++ b/includes/media/ExifBitmap.php @@ -34,8 +34,8 @@ class ExifBitmapHandler extends BitmapHandler { // Treat Software as a special case because in can contain // an array of (SoftwareName, Version). - if (isset( $metadata['Software'] ) - && is_array( $metadata['Software'] ) + if (isset( $metadata['Software'] ) + && is_array( $metadata['Software'] ) && is_array( $metadata['Software'][0]) && isset( $metadata['Software'][0][0] ) && isset( $metadata['Software'][0][1]) @@ -136,7 +136,7 @@ class ExifBitmapHandler extends BitmapHandler { function getImageSize( $image, $path ) { global $wgEnableAutoRotation; $gis = parent::getImageSize( $image, $path ); - + // Don't just call $image->getMetadata(); FSFile::getPropsFromPath() calls us with a bogus object. // This may mean we read EXIF data twice on initial upload. if ( $wgEnableAutoRotation ) { @@ -171,7 +171,7 @@ class ExifBitmapHandler extends BitmapHandler { if ( !$wgEnableAutoRotation ) { return 0; } - + $data = $file->getMetadata(); return $this->getRotationForExif( $data ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index eb5dad7190..12ebe7e56a 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -4662,7 +4662,7 @@ This site is experiencing technical difficulties.', 'newuserlog-byemail' => 'password sent by e-mail', # Feedback -'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug]. +'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug]. Otherwise, you can use the easy form below. Your comment will be added to the page "[$3 $2]", along with your username and what browser you are using.', 'feedback-subject' => 'Subject:', 'feedback-message' => 'Message:', diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 8d7caec9b9..b054884455 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -1947,7 +1947,7 @@ Used on [[Special:UploadWizard]].', 'http-invalid-scheme' => 'The message appears in the Mediawiki code as follows: if ( $this->parsedUrl[\'scheme\'] != \'http\' ) { - $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] ); + $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] ); } Siebrand think this has to do with allowing MediaWiki to fetch remote URLs, and in that not allowing anything but "http://" request. So if this for example is "irc://" or "https://", $1 would be "irc" or "https" respectively. -- 2.20.1