r53446 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53445‎ | r53446 | r53447 >
Date:15:11, 18 July 2009
Author:dale
Status:deferred
Tags:
Comment:
Destination Check fixes
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUpload.php (modified) (history)
  • /trunk/phase3/js2/mwEmbed/README (modified) (history)
  • /trunk/phase3/js2/uploadPage.js (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUpload.php
@@ -350,7 +350,7 @@
351351 $warning .= '<li>' . wfMsgExt( 'fileexists', array('parseinline','replaceafter'), $dlink ) . '</li>' . $dlink2;
352352
353353 } elseif( $existsType == 'page-exists' ) {
354 - $lnk = $sk->linkKnown( $file->getTitle(), '', 'redirect=no' );
 354+ $lnk = $sk->linkKnown( $file->getTitle(), '', '',array('redirect'=>'no') );
355355 $warning .= '<li>' . wfMsgExt( 'filepageexists', array( 'parseinline', 'replaceafter' ), $lnk ) . '</li>';
356356 } elseif ( $existsType == 'exists-normalized' ) {
357357 # Check if image with lowercase extension exists.
@@ -818,13 +818,15 @@
819819 "<input type='hidden' name='wpSourceType' value='file' />" ;
820820 }
821821 }
822 -
823 - if ( $useAjaxDestCheck ) {
 822+ $warningRow = '';
 823+ $destOnkeyup = '';
 824+ if($wgEnableJS2system){
824825 $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'>&nbsp;</td></tr>";
825 - $destOnkeyup = '';
826 - } else {
827 - $warningRow = '';
828 - $destOnkeyup = '';
 826+ }else{
 827+ if ( $useAjaxDestCheck ) {
 828+ $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'>&nbsp;</td></tr>";
 829+ $destOnkeyup = 'onchange=\'wgUploadWarningObj.checkNow(this.value);\'';
 830+ }
829831 }
830832 # Uploading a new version? If so, the name is fixed.
831833 $on = $this->mForReUpload ? "readonly='readonly'" : "";
Index: trunk/phase3/js2/mwEmbed/README
@@ -1,15 +1,14 @@
22 ***********************************************
33 *
4 -* mwEmbed version 1.1
5 -* for details see: http://metavid.ucsc.edu/wiki/index.php/mwEmbed
 4+* mwEmbed version 1.2
 5+* for details see: http://www.mediawiki.org/wiki/MwEmbed
66 * and this README
77 *
88 * All Metavid Wiki code is Released under the GPL2
99 * for more info visit http:/metavid.ucsc.edu/code
1010 *
1111 * @author Michael Dale,
12 -* @email dale@ucsc.edu
13 -* @url http://metavid.org
 12+* @email mdale@wikimedia.org
1413 *
1514 *********************************************
1615
Index: trunk/phase3/js2/uploadPage.js
@@ -103,7 +103,8 @@
104104 },
105105 'url': _this.api_url
106106 },function(data){
107 - $j('#mw-spinner-wpDestFile').remove();
 107+ //remove spinner:
 108+ $j('#mw-spinner-wpDestFile').remove();
108109 if(data && data.query && data.query.pages){
109110 if( data.query.pages[-1] ){
110111 //all good no file there

Status & tagging log