r23619 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r23618‎ | r23619 | r23620 >
Date:21:50, 1 July 2007
Author:tstarling
Status:old
Tags:
Comment:
Respect $wgUseAjax
Modified paths:
  • /trunk/phase3/includes/SpecialUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUpload.php
@@ -712,13 +712,15 @@
713713 */
714714 function mainUploadForm( $msg='' ) {
715715 global $wgOut, $wgUser;
716 - global $wgUseCopyrightUpload, $wgAjaxUploadDestCheck;
 716+ global $wgUseCopyrightUpload, $wgAjaxUploadDestCheck, $wgUseAjax;
717717 global $wgRequest, $wgAllowCopyUploads, $wgEnableAPI;
718718 global $wgStylePath;
719719
 720+ $useAjax = $wgAjaxUploadDestCheck && $wgUseAjax;
 721+
720722 $wgOut->addScript(
721723 "<script type='text/javascript'>wgAjaxUploadDestCheck = " .
722 - ($wgAjaxUploadDestCheck ? 'true' : 'false' ) . ";</script>\n" .
 724+ ($useAjax ? 'true' : 'false' ) . ";</script>\n" .
723725 "<script type='text/javascript' src=\"$wgStylePath/common/upload.js?1\"></script>\n"
724726 );
725727
@@ -792,7 +794,7 @@
793795 "size='40' />" .
794796 "<input type='hidden' name='wpSourceType' value='file' />" ;
795797 }
796 - if ( $wgAjaxUploadDestCheck ) {
 798+ if ( $useAjax ) {
797799 $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'>&nbsp</td></tr>";
798800 $destOnkeyup = 'onkeyup="wgUploadWarningObj.keypress();"';
799801 } else {

Follow-up revisions

RevisionCommit summaryAuthorDate
r23662Merged revisions 23581-23661 via svnmerge from...david03:01, 3 July 2007

Status & tagging log