From fecfb52b137076defcee712d4e544043f0ccda3e Mon Sep 17 00:00:00 2001 From: Michael Dale Date: Sat, 18 Jul 2009 15:11:41 +0000 Subject: [PATCH] Destination Check fixes --- includes/specials/SpecialUpload.php | 16 +++++++++------- js2/mwEmbed/README | 7 +++---- js2/uploadPage.js | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 0cd6d1bc1c..49bac540f1 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -350,7 +350,7 @@ class UploadForm extends SpecialPage { $warning .= '
  • ' . wfMsgExt( 'fileexists', array('parseinline','replaceafter'), $dlink ) . '
  • ' . $dlink2; } elseif( $existsType == 'page-exists' ) { - $lnk = $sk->linkKnown( $file->getTitle(), '', 'redirect=no' ); + $lnk = $sk->linkKnown( $file->getTitle(), '', '',array('redirect'=>'no') ); $warning .= '
  • ' . wfMsgExt( 'filepageexists', array( 'parseinline', 'replaceafter' ), $lnk ) . '
  • '; } elseif ( $existsType == 'exists-normalized' ) { # Check if image with lowercase extension exists. @@ -818,13 +818,15 @@ wgUploadAutoFill = {$autofill}; "" ; } } - - if ( $useAjaxDestCheck ) { + $warningRow = ''; + $destOnkeyup = ''; + if($wgEnableJS2system){ $warningRow = " "; - $destOnkeyup = ''; - } else { - $warningRow = ''; - $destOnkeyup = ''; + }else{ + if ( $useAjaxDestCheck ) { + $warningRow = " "; + $destOnkeyup = 'onchange=\'wgUploadWarningObj.checkNow(this.value);\''; + } } # Uploading a new version? If so, the name is fixed. $on = $this->mForReUpload ? "readonly='readonly'" : ""; diff --git a/js2/mwEmbed/README b/js2/mwEmbed/README index 05d3219fd0..8639659e3d 100644 --- a/js2/mwEmbed/README +++ b/js2/mwEmbed/README @@ -1,15 +1,14 @@ *********************************************** * -* mwEmbed version 1.1 -* for details see: http://metavid.ucsc.edu/wiki/index.php/mwEmbed +* mwEmbed version 1.2 +* for details see: http://www.mediawiki.org/wiki/MwEmbed * and this README * * All Metavid Wiki code is Released under the GPL2 * for more info visit http:/metavid.ucsc.edu/code * * @author Michael Dale, -* @email dale@ucsc.edu -* @url http://metavid.org +* @email mdale@wikimedia.org * ********************************************* diff --git a/js2/uploadPage.js b/js2/uploadPage.js index 46bf061c3f..a374d9a35a 100644 --- a/js2/uploadPage.js +++ b/js2/uploadPage.js @@ -103,7 +103,8 @@ var mwUploadHelper = { }, 'url': _this.api_url },function(data){ - $j('#mw-spinner-wpDestFile').remove(); + //remove spinner: + $j('#mw-spinner-wpDestFile').remove(); if(data && data.query && data.query.pages){ if( data.query.pages[-1] ){ //all good no file there -- 2.20.1