Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -758,6 +758,21 @@ |
759 | 759 | wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" ); |
760 | 760 | return false; |
761 | 761 | } |
| 762 | + |
| 763 | + if( $this->mDesiredDestName && $wgUser->isAllowed( 'delete' ) ) { |
| 764 | + $title = Title::makeTitleSafe( NS_IMAGE, $this->mDesiredDestName ); |
| 765 | + if( $title instanceof Title && ( $count = $title->isDeleted() ) > 0 ) { |
| 766 | + $link = wfMsgExt( |
| 767 | + 'thisisdeleted', |
| 768 | + array( 'parse', 'replaceafter' ), |
| 769 | + $wgUser->getSkin()->makeKnownLinkObj( |
| 770 | + SpecialPage::getTitleFor( 'Undelete', $title->getPrefixedText() ), |
| 771 | + wfMsgHtml( 'restorelink', $count ) |
| 772 | + ) |
| 773 | + ); |
| 774 | + $wgOut->addHtml( "<div id=\"contentSub2\">{$link}</div>" ); |
| 775 | + } |
| 776 | + } |
762 | 777 | |
763 | 778 | $cols = intval($wgUser->getOption( 'cols' )); |
764 | 779 | $ew = $wgUser->getOption( 'editwidth' ); |
— | — | @@ -775,7 +790,7 @@ |
776 | 791 | |
777 | 792 | $sourcefilename = wfMsgHtml( 'sourcefilename' ); |
778 | 793 | $destfilename = wfMsgHtml( 'destfilename' ); |
779 | | - $summary = wfMsgWikiHtml( 'fileuploadsummary' ); |
| 794 | + $summary = wfMsgExt( 'fileuploadsummary', 'parseinline' ); |
780 | 795 | |
781 | 796 | $licenses = new Licenses(); |
782 | 797 | $license = wfMsgExt( 'license', array( 'parseinline' ) ); |
— | — | @@ -824,7 +839,7 @@ |
825 | 840 | "<input type='hidden' name='wpSourceType' value='file' />" ; |
826 | 841 | } |
827 | 842 | if ( $useAjaxDestCheck ) { |
828 | | - $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'> </td></tr>"; |
| 843 | + $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'> </td></tr>"; |
829 | 844 | $destOnkeyup = 'onkeyup="wgUploadWarningObj.keypress();"'; |
830 | 845 | } else { |
831 | 846 | $warningRow = ''; |
— | — | @@ -1395,6 +1410,4 @@ |
1396 | 1411 | } |
1397 | 1412 | return $pageText; |
1398 | 1413 | } |
1399 | | -} |
1400 | | - |
1401 | | - |
| 1414 | +} |
\ No newline at end of file |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -182,6 +182,9 @@ |
183 | 183 | * (bug 11001) Submit Special:Newpages as a GET, rather than a POST request |
184 | 184 | * The <strong></strong> around links to watched pages in change lists now |
185 | 185 | has a class - "mw-watched" |
| 186 | +* (bug 9002) Provide a "view/restore deleted edits" link on Special:Upload |
| 187 | + when a destination filename is provided that corresponds with previous |
| 188 | + deleted files |
186 | 189 | |
187 | 190 | == Bugfixes since 1.10 == |
188 | 191 | |
— | — | @@ -400,6 +403,7 @@ |
401 | 404 | leading to inconsistent paging behaviour |
402 | 405 | * (bug 9026) Incorrect heading numbering when viewing Special:Statistics with |
403 | 406 | "auto-numbered headings" enabled |
| 407 | +* Fixed invalid XHTML in Special:Upload |
404 | 408 | |
405 | 409 | == API changes since 1.10 == |
406 | 410 | |