Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -318,15 +318,6 @@ |
319 | 319 | if( $exists !== false ) |
320 | 320 | $warnings['exists'] = $exists; |
321 | 321 | |
322 | | - // Check whether this may be a thumbnail |
323 | | - if( $exists !== false && $exists[0] != 'thumb' |
324 | | - && self::isThumbName( $filename ) ){ |
325 | | - // Make the title |
326 | | - $nt = $this->getTitle(); |
327 | | - $warnings['file-thumbnail-no'] = substr( $filename, 0, |
328 | | - strpos( $nt->getText() , '-' ) +1 ); |
329 | | - } |
330 | | - |
331 | 322 | // Check dupes against existing files |
332 | 323 | $hash = File::sha1Base36( $this->mTempPath ); |
333 | 324 | $dupes = RepoGroup::singleton()->findBySha1( $hash ); |
— | — | @@ -344,19 +335,6 @@ |
345 | 336 | if ( $archivedImage->getID() > 0 ) |
346 | 337 | $warnings['duplicate-archive'] = $archivedImage->getName(); |
347 | 338 | |
348 | | - $filenamePrefixBlacklist = self::getFilenamePrefixBlacklist(); |
349 | | - foreach( $filenamePrefixBlacklist as $prefix ) { |
350 | | - if ( substr( $partname, 0, strlen( $prefix ) ) == $prefix ) { |
351 | | - $warnings['filename-bad-prefix'] = $prefix; |
352 | | - break; |
353 | | - } |
354 | | - } |
355 | | - |
356 | | - # If the file existed before and was deleted, warn the user of this |
357 | | - # Don't bother doing so if the file exists now, however |
358 | | - if( $localFile->wasDeleted() && !$localFile->exists() ) |
359 | | - $warnings['filewasdeleted'] = $localFile->getTitle(); |
360 | | - |
361 | 339 | return $warnings; |
362 | 340 | } |
363 | 341 | |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -262,12 +262,9 @@ |
263 | 263 | if( isset( $warnings['exists'] ) ) { |
264 | 264 | $warning = $warnings['exists']; |
265 | 265 | unset( $warnings['exists'] ); |
266 | | - $warnings[$warning[0]] = $warning[1]->getName(); |
| 266 | + $warnings[$warning['warning']] = $warning['file']->getName(); |
267 | 267 | } |
268 | | - |
269 | | - if( isset( $warnings['filewasdeleted'] ) ) |
270 | | - $warnings['filewasdeleted'] = $warnings['filewasdeleted']->getName(); |
271 | | - |
| 268 | + |
272 | 269 | $result['result'] = 'Warning'; |
273 | 270 | $result['warnings'] = $warnings; |
274 | 271 | |
Index: trunk/phase3/includes/specials/SpecialUpload.php |
— | — | @@ -512,11 +512,6 @@ |
513 | 513 | } elseif( $warning == 'duplicate-archive' ) { |
514 | 514 | $titleText = Title::makeTitle( NS_FILE, $args )->getPrefixedText(); |
515 | 515 | $msg = Xml::tags( 'li', null, wfMsgExt( 'file-deleted-duplicate', array( 'parseinline' ), array( $titleText ) ) ); |
516 | | - } elseif( $warning == 'filewasdeleted' ) { |
517 | | - $ltitle = SpecialPage::getTitleFor( 'Log' ); |
518 | | - $llink = $sk->makeKnownLinkObj( $ltitle, wfMsgHtml( 'deletionlog' ), |
519 | | - 'type=delete&page=' . $args->getPrefixedUrl() ); |
520 | | - $msg = "\t<li>" . wfMsgWikiHtml( 'filewasdeleted', $llink ) . "</li>\n"; |
521 | 516 | } else { |
522 | 517 | if( is_bool( $args ) ) |
523 | 518 | $args = array(); |