* (bug 4167) Fix regression caused by patch for bug 153
[lhc/web/wiklou.git] / includes / SpecialUpload.php
index 97f3d97..9f8b63f 100644 (file)
@@ -141,9 +141,7 @@ class UploadForm {
         * @access private
         */
        function processUpload() {
-               global $wgUser, $wgOut, $wgLang, $wgContLang;
-               global $wgUploadDirectory;
-               global $wgUseCopyrightUpload, $wgCheckCopyrightUpload;
+               global $wgUser, $wgOut, $wgUploadDirectory;
 
                /* Check for PHP error if any, requires php 4.2 or newer */
                if ( $this->mUploadError == 1/*UPLOAD_ERR_INI_SIZE*/ ) {
@@ -483,7 +481,7 @@ class UploadForm {
         * @access private
         */
        function uploadWarning( $warning ) {
-               global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+               global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
                global $wgUseCopyrightUpload;
 
                $this->mSessionKey = $this->stashSession();
@@ -547,7 +545,7 @@ class UploadForm {
         * @access private
         */
        function mainUploadForm( $msg='' ) {
-               global $wgOut, $wgUser, $wgLang, $wgUploadDirectory, $wgRequest;
+               global $wgOut, $wgUser, $wgUploadDirectory, $wgRequest;
                global $wgUseCopyrightUpload;
 
                $cols = intval($wgUser->getOption( 'cols' ));
@@ -560,7 +558,9 @@ class UploadForm {
                        $wgOut->addHTML( "<h2>{$sub}</h2>\n" .
                          "<span class='error'>{$msg}</span>\n" );
                }
+               $wgOut->addHTML( '<div id="uploadtext">' );
                $wgOut->addWikiText( wfMsg( 'uploadtext' ) );
+               $wgOut->addHTML( '</div>' );
                $sk = $wgUser->getSkin();
 
 
@@ -587,32 +587,32 @@ class UploadForm {
                
                $wgOut->addHTML( "
        <form id='upload' method='post' enctype='multipart/form-data' action=\"$action\">
-               <table border='1'>
+               <table border='0'>
                <tr>
-                       <td align='right'>{$sourcefilename}:</td>
+                       <td align='right'><label for='wpUploadFile'>{$sourcefilename}:</label></td>
                        <td align='left'>
                                <input tabindex='1' type='file' name='wpUploadFile' id='wpUploadFile' " . ($this->mDestFile?"":"onchange='fillDestFilename()' ") . "size='40' />
                        </td>
                </tr>
                <tr>
-                       <td align='right'>{$destfilename}:</td>
+                       <td align='right'><label for='wpDestFile'>{$destfilename}:</label></td>
                        <td align='left'>
                                <input tabindex='2' type='text' name='wpDestFile' id='wpDestFile' size='40' value=\"$encDestFile\" />
                        </td>
                </tr>
                <tr>
-                       <td align='right'>{$summary}</td>
+                       <td align='right'><label for='wpUploadDescription'>{$summary}</label></td>
                        <td align='left'>
-                               <textarea tabindex='3' name='wpUploadDescription' rows='6' cols='{$cols}'{$ew}>" . htmlspecialchars( $this->mUploadDescription ) . "</textarea>
+                               <textarea tabindex='3' name='wpUploadDescription' id='wpUploadDescription' rows='6' cols='{$cols}'{$ew}>" . htmlspecialchars( $this->mUploadDescription ) . "</textarea>
                        </td>
                </tr>
                <tr>" );
        
        if ( $licenseshtml != '' ) {
                $wgOut->addHTML( "
-                       <td align='right'>$license:</td>
+                       <td align='right'><label for='wpLicense'>$license:</label></td>
                        <td align='left'>
-                               <select name='wpLicense' tabindex='4'>
+                               <select name='wpLicense' id='wpLicense' tabindex='4'>
                                        <option value=''>$nolicense</option>
                                        $licenseshtml
                                </select>
@@ -629,12 +629,12 @@ class UploadForm {
                $uploadsource = htmlspecialchars( $this->mUploadSource );
                
                $wgOut->addHTML( "
-                               <td align='right' nowrap='nowrap'>$filestatus:</td>
-                               <td><input tabindex='5' type='text' name='wpUploadCopyStatus' value=\"$copystatus\" size='40' /></td>
+                               <td align='right' nowrap='nowrap'><label for='wpUploadCopyStatus'>$filestatus:</label></td>
+                               <td><input tabindex='5' type='text' name='wpUploadCopyStatus' id='wpUploadCopyStatus' value=\"$copystatus\" size='40' /></td>
                        </tr>
                        <tr>
-                               <td align='right'>$filesource:</td>
-                               <td><input tabindex='6' type='text' name='wpUploadSource' value=\"$uploadsource\" size='40' /></td>
+                               <td align='right'><label for='wpUploadCopyStatus'>$filesource:</label></td>
+                               <td><input tabindex='6' type='text' name='wpUploadSource' id='wpUploadCopyStatus' value=\"$uploadsource\" size='40' /></td>
                        </tr>
                        <tr>
                ");
@@ -647,7 +647,7 @@ class UploadForm {
                        <input tabindex='7' type='checkbox' name='wpWatchthis' id='wpWatchthis' $watchChecked value='true' />
                        <label for='wpWatchthis'>" . wfMsgHtml( 'watchthis' ) . "</label>
                        <input tabindex='8' type='checkbox' name='wpIgnoreWarning' id='wpIgnoreWarning' value='true' />
-                       <label for='wpIgnoreWarning'>" . wfMsgHtml( 'ignorewarning' ) . "</label>
+                       <label for='wpIgnoreWarning'>" . wfMsgHtml( 'ignorewarnings' ) . "</label>
                </td>
        </tr>
        <tr>
@@ -657,6 +657,16 @@ class UploadForm {
                <td></td>
                <td align='left'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td>
        </tr>
+       
+       <tr>
+               <td></td>
+               <td align='left'>
+               " );
+       $wgOut->addWikiText( wfMsgForContent( 'edittools' ) );
+       $wgOut->addHTML( "
+               </td>
+       </tr>
+               
        </table>
        </form>" );
        }