Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -179,10 +179,10 @@ |
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | | - * From parameters, construct a 'scale' array |
184 | | - * @param $params Array: |
| 183 | + * From parameters, construct a 'scale' array |
| 184 | + * @param $params Array: |
185 | 185 | * @return Array or Null: key-val array of 'width' and 'height', or null |
186 | | - */ |
| 186 | + */ |
187 | 187 | public function getScale( $params ) { |
188 | 188 | $p = $this->getModulePrefix(); |
189 | 189 | if ( $params['urlheight'] != -1 && $params['urlwidth'] == -1 ) { |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | $vals['size'] = intval( $file->getSize() ); |
232 | 232 | $vals['width'] = intval( $file->getWidth() ); |
233 | 233 | $vals['height'] = intval( $file->getHeight() ); |
234 | | - |
| 234 | + |
235 | 235 | $pageCount = $file->pageCount(); |
236 | 236 | if ( $pageCount !== false ) { |
237 | 237 | $vals['pagecount'] = $pageCount; |
— | — | @@ -266,10 +266,10 @@ |
267 | 267 | } |
268 | 268 | if ( isset( $prop['parsedcomment'] ) ) { |
269 | 269 | global $wgUser; |
270 | | - $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( |
| 270 | + $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( |
271 | 271 | $file->getDescription(), $file->getTitle() ); |
272 | 272 | } |
273 | | - |
| 273 | + |
274 | 274 | if ( isset( $prop['sha1'] ) ) { |
275 | 275 | $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 ); |
276 | 276 | } |
— | — | @@ -380,7 +380,7 @@ |
381 | 381 | |
382 | 382 | |
383 | 383 | /** |
384 | | - * Return the API documentation for the parameters. |
| 384 | + * Return the API documentation for the parameters. |
385 | 385 | * @return {Array} parameter documentation. |
386 | 386 | */ |
387 | 387 | public function getParamDescription() { |
— | — | @@ -398,7 +398,7 @@ |
399 | 399 | ' dimensions - Alias for size', |
400 | 400 | ' sha1 - Adds SHA-1 hash for the image', |
401 | 401 | ' mime - Adds MIME type of the image', |
402 | | - ' thumbmime - Adss MIME type of the image thumbnail (requires url)', |
| 402 | + ' thumbmime - Adds MIME type of the image thumbnail (requires url)', |
403 | 403 | ' metadata - Lists EXIF metadata for the version of the image', |
404 | 404 | ' archivename - Adds the file name of the archive version for non-latest versions', |
405 | 405 | ' bitdepth - Adds the bit depth of the version', |
Index: trunk/phase3/includes/api/ApiQueryStashImageInfo.php |
— | — | @@ -38,13 +38,13 @@ |
39 | 39 | $prop = array_flip( $params['prop'] ); |
40 | 40 | |
41 | 41 | $scale = $this->getScale( $params ); |
42 | | - |
| 42 | + |
43 | 43 | $result = $this->getResult(); |
44 | | - |
| 44 | + |
45 | 45 | try { |
46 | 46 | $stash = new UploadStash(); |
47 | | - |
48 | | - foreach ( $params['sessionkey'] as $sessionkey ) { |
| 47 | + |
| 48 | + foreach ( $params['sessionkey'] as $sessionkey ) { |
49 | 49 | $file = $stash->getFile( $sessionkey ); |
50 | 50 | $imageInfo = self::getInfo( $file, $prop, $result, $scale ); |
51 | 51 | $result->addValue( array( 'query', $this->getModuleName() ), null, $imageInfo ); |
— | — | @@ -57,8 +57,7 @@ |
58 | 58 | $this->dieUsage( "File not found: " . $e->getMessage(), "invalidsessiondata" ); |
59 | 59 | } catch ( UploadStashBadPathException $e ) { |
60 | 60 | $this->dieUsage( "Bad path: " . $e->getMessage(), "invalidsessiondata" ); |
61 | | - } |
62 | | - |
| 61 | + } |
63 | 62 | } |
64 | 63 | |
65 | 64 | /** |
— | — | @@ -81,7 +80,7 @@ |
82 | 81 | |
83 | 82 | public function getAllowedParams() { |
84 | 83 | return array( |
85 | | - 'sessionkey' => array( |
| 84 | + 'sessionkey' => array( |
86 | 85 | ApiBase::PARAM_ISMULTI => true, |
87 | 86 | ApiBase::PARAM_REQUIRED => true, |
88 | 87 | ApiBase::PARAM_DFLT => null |
— | — | @@ -117,7 +116,7 @@ |
118 | 117 | ' dimensions - Alias for size', |
119 | 118 | ' sha1 - Adds sha1 hash for the image', |
120 | 119 | ' mime - Adds MIME of the image', |
121 | | - ' thumbmime - Adss MIME of the image thumbnail (requires url)', |
| 120 | + ' thumbmime - Adds MIME of the image thumbnail (requires url)', |
122 | 121 | ' metadata - Lists EXIF metadata for the version of the image', |
123 | 122 | ' bitdepth - Adds the bit depth of the version', |
124 | 123 | ), |