Per CR on r68482, fix adss to add
authorSam Reed <reedy@users.mediawiki.org>
Thu, 30 Dec 2010 00:56:30 +0000 (00:56 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Thu, 30 Dec 2010 00:56:30 +0000 (00:56 +0000)
Also remove trailing whitespace in files

includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryStashImageInfo.php

index f951855..02def1a 100644 (file)
@@ -179,10 +179,10 @@ class ApiQueryImageInfo extends ApiQueryBase {
        }
 
        /**
-        * From parameters, construct a 'scale' array 
-        * @param $params Array: 
+        * From parameters, construct a 'scale' array
+        * @param $params Array:
         * @return Array or Null: key-val array of 'width' and 'height', or null
-        */     
+        */
        public function getScale( $params ) {
                $p = $this->getModulePrefix();
                if ( $params['urlheight'] != -1 && $params['urlwidth'] == -1 ) {
@@ -230,7 +230,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                        $vals['size'] = intval( $file->getSize() );
                        $vals['width'] = intval( $file->getWidth() );
                        $vals['height'] = intval( $file->getHeight() );
-                       
+
                        $pageCount = $file->pageCount();
                        if ( $pageCount !== false ) {
                                $vals['pagecount'] = $pageCount;
@@ -266,10 +266,10 @@ class ApiQueryImageInfo extends ApiQueryBase {
                }
                if ( isset( $prop['parsedcomment'] ) ) {
                        global $wgUser;
-                       $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( 
+                       $vals['parsedcomment'] = $wgUser->getSkin()->formatComment(
                                        $file->getDescription(), $file->getTitle() );
                }
-               
+
                if ( isset( $prop['sha1'] ) ) {
                        $vals['sha1'] = wfBaseConvert( $file->getSha1(), 36, 16, 40 );
                }
@@ -380,7 +380,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
 
 
        /**
-        * Return the API documentation for the parameters. 
+        * Return the API documentation for the parameters.
         * @return {Array} parameter documentation.
         */
        public function getParamDescription() {
@@ -398,7 +398,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                ' dimensions    - Alias for size',
                                ' sha1          - Adds SHA-1 hash for the image',
                                ' mime          - Adds MIME type of the image',
-                               ' thumbmime     - Adss MIME type of the image thumbnail (requires url)',
+                               ' thumbmime     - Adds MIME type of the image thumbnail (requires url)',
                                ' metadata      - Lists EXIF metadata for the version of the image',
                                ' archivename   - Adds the file name of the archive version for non-latest versions',
                                ' bitdepth      - Adds the bit depth of the version',
index ff09a63..73bad15 100644 (file)
@@ -38,13 +38,13 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
                $prop = array_flip( $params['prop'] );
 
                $scale = $this->getScale( $params );
-               
+
                $result = $this->getResult();
-               
+
                try {
                        $stash = new UploadStash();
-               
-                       foreach ( $params['sessionkey'] as $sessionkey ) {      
+
+                       foreach ( $params['sessionkey'] as $sessionkey ) {
                                $file = $stash->getFile( $sessionkey );
                                $imageInfo = self::getInfo( $file, $prop, $result, $scale );
                                $result->addValue( array( 'query', $this->getModuleName() ), null, $imageInfo );
@@ -57,8 +57,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
                        $this->dieUsage( "File not found: " . $e->getMessage(), "invalidsessiondata" );
                } catch ( UploadStashBadPathException $e ) {
                        $this->dieUsage( "Bad path: " . $e->getMessage(), "invalidsessiondata" );
-               }       
-
+               }
        }
 
        /**
@@ -81,7 +80,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
 
        public function getAllowedParams() {
                return array(
-                       'sessionkey' => array( 
+                       'sessionkey' => array(
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_REQUIRED => true,
                                ApiBase::PARAM_DFLT => null
@@ -117,7 +116,7 @@ class ApiQueryStashImageInfo extends ApiQueryImageInfo {
                                ' dimensions   - Alias for size',
                                ' sha1         - Adds sha1 hash for the image',
                                ' mime         - Adds MIME of the image',
-                               ' thumbmime    - Adss MIME of the image thumbnail (requires url)',
+                               ' thumbmime    - Adds MIME of the image thumbnail (requires url)',
                                ' metadata     - Lists EXIF metadata for the version of the image',
                                ' bitdepth     - Adds the bit depth of the version',
                        ),