r25042 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r25041‎ | r25042 | r25043 >
Date:08:51, 22 August 2007
Author:robchurch
Status:old
Tags:
Comment:
* (bug 9002) Provide a "view/restore deleted edits" link on Special:Upload when a destination filename is provided that corresponds with previous deleted files
* Fix various bits of invalid XHTML in Special:Upload
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -758,6 +758,21 @@
759759 wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" );
760760 return false;
761761 }
 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+ }
762777
763778 $cols = intval($wgUser->getOption( 'cols' ));
764779 $ew = $wgUser->getOption( 'editwidth' );
@@ -775,7 +790,7 @@
776791
777792 $sourcefilename = wfMsgHtml( 'sourcefilename' );
778793 $destfilename = wfMsgHtml( 'destfilename' );
779 - $summary = wfMsgWikiHtml( 'fileuploadsummary' );
 794+ $summary = wfMsgExt( 'fileuploadsummary', 'parseinline' );
780795
781796 $licenses = new Licenses();
782797 $license = wfMsgExt( 'license', array( 'parseinline' ) );
@@ -824,7 +839,7 @@
825840 "<input type='hidden' name='wpSourceType' value='file' />" ;
826841 }
827842 if ( $useAjaxDestCheck ) {
828 - $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'>&nbsp</td></tr>";
 843+ $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'>&nbsp;</td></tr>";
829844 $destOnkeyup = 'onkeyup="wgUploadWarningObj.keypress();"';
830845 } else {
831846 $warningRow = '';
@@ -1395,6 +1410,4 @@
13961411 }
13971412 return $pageText;
13981413 }
1399 -}
1400 -
1401 -
 1414+}
\ No newline at end of file
Index: trunk/phase3/RELEASE-NOTES
@@ -182,6 +182,9 @@
183183 * (bug 11001) Submit Special:Newpages as a GET, rather than a POST request
184184 * The <strong></strong> around links to watched pages in change lists now
185185 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
186189
187190 == Bugfixes since 1.10 ==
188191
@@ -400,6 +403,7 @@
401404 leading to inconsistent paging behaviour
402405 * (bug 9026) Incorrect heading numbering when viewing Special:Statistics with
403406 "auto-numbered headings" enabled
 407+* Fixed invalid XHTML in Special:Upload
404408
405409 == API changes since 1.10 ==
406410

Follow-up revisions

RevisionCommit summaryAuthorDate
r25109Merged revisions 25016-25108 via svnmerge from...david07:30, 24 August 2007

Status & tagging log