Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -712,13 +712,15 @@ |
713 | 713 | */ |
714 | 714 | function mainUploadForm( $msg='' ) { |
715 | 715 | global $wgOut, $wgUser; |
716 | | - global $wgUseCopyrightUpload, $wgAjaxUploadDestCheck; |
| 716 | + global $wgUseCopyrightUpload, $wgAjaxUploadDestCheck, $wgUseAjax; |
717 | 717 | global $wgRequest, $wgAllowCopyUploads, $wgEnableAPI; |
718 | 718 | global $wgStylePath; |
719 | 719 | |
| 720 | + $useAjax = $wgAjaxUploadDestCheck && $wgUseAjax; |
| 721 | + |
720 | 722 | $wgOut->addScript( |
721 | 723 | "<script type='text/javascript'>wgAjaxUploadDestCheck = " . |
722 | | - ($wgAjaxUploadDestCheck ? 'true' : 'false' ) . ";</script>\n" . |
| 724 | + ($useAjax ? 'true' : 'false' ) . ";</script>\n" . |
723 | 725 | "<script type='text/javascript' src=\"$wgStylePath/common/upload.js?1\"></script>\n" |
724 | 726 | ); |
725 | 727 | |
— | — | @@ -792,7 +794,7 @@ |
793 | 795 | "size='40' />" . |
794 | 796 | "<input type='hidden' name='wpSourceType' value='file' />" ; |
795 | 797 | } |
796 | | - if ( $wgAjaxUploadDestCheck ) { |
| 798 | + if ( $useAjax ) { |
797 | 799 | $warningRow = "<tr><td colspan='2' id='wpDestFile-warning'> </td></tr>"; |
798 | 800 | $destOnkeyup = 'onkeyup="wgUploadWarningObj.keypress();"'; |
799 | 801 | } else { |