r107348 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107347‎ | r107348 | r107349 >
Date:00:28, 27 December 2011
Author:mah
Status:ok
Tags:
Comment:
w/s
Modified paths:
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/filerepo/file/File.php (modified) (history)
  • /trunk/phase3/includes/media/Bitmap.php (modified) (history)
  • /trunk/phase3/includes/media/ExifBitmap.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/filerepo/file/File.php
@@ -35,7 +35,7 @@
3636 const RENDER_NOW = 1;
3737 /**
3838 * Force rendering even if thumbnail already exist and using RENDER_NOW
39 - * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE
 39+ * I.e. you have to pass both flags: File::RENDER_NOW | File::RENDER_FORCE
4040 */
4141 const RENDER_FORCE = 2;
4242
@@ -99,7 +99,7 @@
100100
101101 /**
102102 * Call this constructor from child classes.
103 - *
 103+ *
104104 * Both $title and $repo are optional, though some functions
105105 * may return false or throw exceptions if they are not set.
106106 * Most subclasses will want to call assertRepoDefined() here.
@@ -335,7 +335,7 @@
336336 * Get an FS copy or original of this file and return the path.
337337 * Returns false on failure. Callers must not alter the file.
338338 * Temporary files are cleared automatically.
339 - *
 339+ *
340340 * @return string|false
341341 */
342342 public function getLocalRefPath() {
@@ -775,7 +775,7 @@
776776 return $this->handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
777777 }
778778 } elseif ( $flags & self::RENDER_FORCE ) {
779 - wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" );
 779+ wfDebug( __METHOD__ . " forcing rendering per flag File::RENDER_FORCE\n" );
780780 }
781781
782782 // Create a temp FS file with the same extension
Index: trunk/phase3/includes/media/Bitmap.php
@@ -45,9 +45,9 @@
4646 wfRunHooks( 'BitmapHandlerCheckImageArea', array( $image, &$params, &$checkImageAreaHookResult ) );
4747 if ( is_null( $checkImageAreaHookResult ) ) {
4848 global $wgMaxImageArea;
49 -
 49+
5050 if ( $srcWidth * $srcHeight > $wgMaxImageArea &&
51 - !( $image->getMimeType() == 'image/jpeg' &&
 51+ !( $image->getMimeType() == 'image/jpeg' &&
5252 self::getScalerType( false, false ) == 'im' ) ) {
5353 # Only ImageMagick can efficiently downsize jpg images without loading
5454 # the entire file in memory
@@ -56,7 +56,7 @@
5757 } else {
5858 return $checkImageAreaHookResult;
5959 }
60 -
 60+
6161 return true;
6262 }
6363
@@ -89,10 +89,10 @@
9090 /**
9191 * Function that returns the number of pixels to be thumbnailed.
9292 * Intended for animated GIFs to multiply by the number of frames.
93 - *
 93+ *
9494 * @param File $image
9595 * @return int
96 - */
 96+ */
9797 function getImageArea( $image ) {
9898 return $image->getWidth() * $image->getHeight();
9999 }
@@ -132,7 +132,7 @@
133133
134134 # Determine scaler type
135135 $scaler = self::getScalerType( $dstPath );
136 -
 136+
137137 wfDebug( __METHOD__ . ": creating {$scalerParams['physicalDimensions']} thumbnail at $dstPath using scaler $scaler\n" );
138138
139139 if ( !$image->mustRender() &&
Index: trunk/phase3/includes/media/ExifBitmap.php
@@ -34,8 +34,8 @@
3535
3636 // Treat Software as a special case because in can contain
3737 // an array of (SoftwareName, Version).
38 - if (isset( $metadata['Software'] )
39 - && is_array( $metadata['Software'] )
 38+ if (isset( $metadata['Software'] )
 39+ && is_array( $metadata['Software'] )
4040 && is_array( $metadata['Software'][0])
4141 && isset( $metadata['Software'][0][0] )
4242 && isset( $metadata['Software'][0][1])
@@ -136,7 +136,7 @@
137137 function getImageSize( $image, $path ) {
138138 global $wgEnableAutoRotation;
139139 $gis = parent::getImageSize( $image, $path );
140 -
 140+
141141 // Don't just call $image->getMetadata(); FSFile::getPropsFromPath() calls us with a bogus object.
142142 // This may mean we read EXIF data twice on initial upload.
143143 if ( $wgEnableAutoRotation ) {
@@ -171,7 +171,7 @@
172172 if ( !$wgEnableAutoRotation ) {
173173 return 0;
174174 }
175 -
 175+
176176 $data = $file->getMetadata();
177177 return $this->getRotationForExif( $data );
178178 }
Index: trunk/phase3/includes/DefaultSettings.php
@@ -2490,13 +2490,13 @@
24912491 $wgBetterDirectionality = true;
24922492
24932493 /**
2494 - * Some web hosts attempt to rewrite all responses with a 404 (not found)
 2494+ * Some web hosts attempt to rewrite all responses with a 404 (not found)
24952495 * status code, mangling or hiding MediaWiki's output. If you are using such a
2496 - * host, you should start looking for a better one. While you're doing that,
 2496+ * host, you should start looking for a better one. While you're doing that,
24972497 * set this to false to convert some of MediaWiki's 404 responses to 200 so
24982498 * that the generated error pages can be seen.
24992499 *
2500 - * In cases where for technical reasons it is more important for MediaWiki to
 2500+ * In cases where for technical reasons it is more important for MediaWiki to
25012501 * send the correct status code than for the body to be transmitted intact,
25022502 * this configuration variable is ignored.
25032503 */
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -1947,7 +1947,7 @@
19481948 'http-invalid-scheme' => 'The message appears in the Mediawiki code as follows:
19491949
19501950 if ( $this->parsedUrl[\'scheme\'] != \'http\' ) {
1951 - $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] );
 1951+ $this->status->fatal( \'http-invalid-scheme\', $this->parsedUrl[\'scheme\'] );
19521952 }
19531953
19541954 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.
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -4662,7 +4662,7 @@
46634663 'newuserlog-byemail' => 'password sent by e-mail',
46644664
46654665 # Feedback
4666 -'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug].
 4666+'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug].
46674667 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.',
46684668 'feedback-subject' => 'Subject:',
46694669 'feedback-message' => 'Message:',

Status & tagging log