r74328 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74327‎ | r74328 | r74329 >
Date:22:31, 5 October 2010
Author:neilk
Status:ok
Tags:
Comment:
remove changes -- will obtain imageinfo for stashed uploads in a different way. It's already wrong for this function to be calling another API calldiff includes/upload/UploadBase.php ../trunk/includes/upload/UploadBase.php > /tmp/uploadbase.diff
Modified paths:
  • /branches/uploadwizard/phase3/includes/upload/UploadBase.php (modified) (history)

Diff [purge]

Index: branches/uploadwizard/phase3/includes/upload/UploadBase.php
@@ -1200,30 +1200,20 @@
12011201 /**
12021202 * Gets image info about the file just uploaded.
12031203 *
1204 - * @param {ApiResult}
1205 - * @return {Array} image info
1206 - */
1207 - public function getImageInfo( $result ) {
1208 - return $this->getImageInfoForFile( $this->getLocalFile(), $result );
1209 - }
1210 -
1211 - /**
1212 - * Gets image info about any file object (useful for some API functions which return information
1213 - * about several files (such as the original and a thumbnail).
1214 - *
12151204 * Also has the effect of setting metadata to be an 'indexed tag name' in returned API result if
12161205 * 'metadata' was requested. Oddly, we have to pass the "result" object down just so it can do that
12171206 * with the appropriate format, presumably.
12181207 *
1219 - * @param {File} file object
12201208 * @param {ApiResult}
12211209 * @return {Array} image info
12221210 */
1223 - protected function getImageInfoForFile( $file, $result ) {
 1211+ public function getImageInfo( $result ) {
 1212+ $file = $this->getLocalFile();
12241213 $imParam = ApiQueryImageInfo::getPropertyNames();
12251214 return ApiQueryImageInfo::getInfo( $file, array_flip( $imParam ), $result );
12261215 }
12271216
 1217+
12281218 public function convertVerifyErrorToStatus( $error ) {
12291219 $code = $error['status'];
12301220 unset( $code['status'] );

Status & tagging log