Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -237,13 +237,13 @@ |
238 | 238 | $warnings = $this->mUpload->checkWarnings(); |
239 | 239 | if( $warnings ) { |
240 | 240 | $this->getResult()->setIndexedTagName( $warnings, 'warning' ); |
241 | | - //also add index to duplicate: |
| 241 | + //also add index to duplicate: |
242 | 242 | if(isset($warnings['duplicate'])) |
243 | 243 | $this->getResult()->setIndexedTagName( $warnings['duplicate'], 'duplicate'); |
244 | | - |
| 244 | + |
245 | 245 | if(isset($warnings['exists'])) |
246 | 246 | $this->getResult()->setIndexedTagName( $warnings['exists'], 'exists'); |
247 | | - |
| 247 | + |
248 | 248 | $result['result'] = 'Warning'; |
249 | 249 | $result['warnings'] = $warnings; |
250 | 250 | if( isset( $result['filewasdeleted'] ) ) |
— | — | @@ -274,13 +274,22 @@ |
275 | 275 | |
276 | 276 | // Append imageinfo to the result |
277 | 277 | |
278 | | - // might be a cleaner way to call this: |
279 | | - $imParam = ApiQueryImageInfo::getAllowedParams(); |
280 | | - $imProp = $imParam['prop'][ApiBase::PARAM_TYPE]; |
281 | | - $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file, |
282 | | - array_flip( $imProp ), |
283 | | - $this->getResult() ); |
| 278 | + //get all the image properties: |
| 279 | + $imParam = Array('timestamp', |
| 280 | + 'user', |
| 281 | + 'comment', |
| 282 | + 'url', |
| 283 | + 'size', |
| 284 | + 'sha1', |
| 285 | + 'mime', |
| 286 | + 'metadata', |
| 287 | + 'archivename', |
| 288 | + 'bitdepth'); |
| 289 | + $result['imageinfo'] = ApiQueryImageInfo::getInfo( $file, |
| 290 | + array_flip( $imParam ), |
| 291 | + $this->getResult() ); |
284 | 292 | |
| 293 | + |
285 | 294 | return $result; |
286 | 295 | } |
287 | 296 | |