Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -832,8 +832,8 @@ |
833 | 833 | */ |
834 | 834 | function uploadError( $error ) { |
835 | 835 | global $wgOut; |
836 | | - $wgOut->addHTML( "<h2>" . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" ); |
837 | | - $wgOut->addHTML( "<span class='error'>{$error}</span>\n" ); |
| 836 | + $wgOut->addHTML( Xml::element( 'h2', null, wfMsg( 'uploadwarning' ) . "\n" ) ); |
| 837 | + $wgOut->addHTML( Xml::tags( 'span', array( 'class' => 'error' ), $error ) ); |
838 | 838 | } |
839 | 839 | |
840 | 840 | /** |
— | — | @@ -845,7 +845,7 @@ |
846 | 846 | * @access private |
847 | 847 | */ |
848 | 848 | function uploadWarning( $warning ) { |
849 | | - global $wgOut, $wgContLang; |
| 849 | + global $wgOut; |
850 | 850 | global $wgUseCopyrightUpload; |
851 | 851 | |
852 | 852 | $this->mSessionKey = $this->stashSession(); |
— | — | @@ -854,53 +854,32 @@ |
855 | 855 | return; |
856 | 856 | } |
857 | 857 | |
858 | | - $wgOut->addHTML( "<h2>" . wfMsgHtml( 'uploadwarning' ) . "</h2>\n" ); |
859 | | - $wgOut->addHTML( "<ul class='warning'>{$warning}</ul><br />\n" ); |
| 858 | + $wgOut->addHTML( Xml::element( 'h2', null, wfMsg( 'uploadwarning' ) ) . "\n" ); |
| 859 | + $wgOut->addHTML( Xml::tags( 'ul', array( 'class' => 'warning' ), $warning ) . "\n" ); |
860 | 860 | |
861 | | - $save = wfMsgHtml( 'savefile' ); |
862 | | - $reupload = wfMsgHtml( 'reupload' ); |
863 | | - $iw = wfMsgWikiHtml( 'ignorewarning' ); |
864 | | - $reup = wfMsgWikiHtml( 'reuploaddesc' ); |
865 | 861 | $titleObj = SpecialPage::getTitleFor( 'Upload' ); |
866 | | - $action = $titleObj->escapeLocalURL( 'action=submit' ); |
867 | | - $align1 = $wgContLang->isRTL() ? 'left' : 'right'; |
868 | | - $align2 = $wgContLang->isRTL() ? 'right' : 'left'; |
869 | 862 | |
870 | | - if ( $wgUseCopyrightUpload ) |
871 | | - { |
872 | | - $copyright = " |
873 | | - <input type='hidden' name='wpUploadCopyStatus' value=\"" . htmlspecialchars( $this->mCopyrightStatus ) . "\" /> |
874 | | - <input type='hidden' name='wpUploadSource' value=\"" . htmlspecialchars( $this->mCopyrightSource ) . "\" /> |
875 | | - "; |
| 863 | + if ( $wgUseCopyrightUpload ) { |
| 864 | + $copyright = Xml::hidden( 'wpUploadCopyStatus', $this->mCopyrightStatus ) . "\n" . |
| 865 | + Xml::hidden( 'wpUploadSource', $this->mCopyrightSource ) . "\n"; |
876 | 866 | } else { |
877 | | - $copyright = ""; |
| 867 | + $copyright = ''; |
878 | 868 | } |
879 | 869 | |
880 | | - $wgOut->addHTML( " |
881 | | - <form id='uploadwarning' method='post' enctype='multipart/form-data' action='$action'> |
882 | | - <input type='hidden' name='wpIgnoreWarning' value='1' /> |
883 | | - <input type='hidden' name='wpSessionKey' value=\"" . htmlspecialchars( $this->mSessionKey ) . "\" /> |
884 | | - <input type='hidden' name='wpUploadDescription' value=\"" . htmlspecialchars( $this->mComment ) . "\" /> |
885 | | - <input type='hidden' name='wpLicense' value=\"" . htmlspecialchars( $this->mLicense ) . "\" /> |
886 | | - <input type='hidden' name='wpDestFile' value=\"" . htmlspecialchars( $this->mDesiredDestName ) . "\" /> |
887 | | - <input type='hidden' name='wpWatchthis' value=\"" . htmlspecialchars( intval( $this->mWatchthis ) ) . "\" /> |
888 | | - {$copyright} |
889 | | - <table border='0'> |
890 | | - <tr> |
891 | | - <tr> |
892 | | - <td align='$align1'> |
893 | | - <input tabindex='2' type='submit' name='wpUpload' value=\"$save\" /> |
894 | | - </td> |
895 | | - <td align='$align2'>$iw</td> |
896 | | - </tr> |
897 | | - <tr> |
898 | | - <td align='$align1'> |
899 | | - <input tabindex='2' type='submit' name='wpReUpload' value=\"{$reupload}\" /> |
900 | | - </td> |
901 | | - <td align='$align2'>$reup</td> |
902 | | - </tr> |
903 | | - </tr> |
904 | | - </table></form>\n" ); |
| 870 | + $wgOut->addHTML( |
| 871 | + Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( 'action=submit' ), |
| 872 | + 'enctype' => 'multipart/form-data', 'id' => 'uploadwarning' ) ) . "\n" . |
| 873 | + Xml::hidden( 'wpIgnoreWarning', '1' ) . "\n" . |
| 874 | + Xml::hidden( 'wpSessionKey', $this->mSessionKey ) . "\n" . |
| 875 | + Xml::hidden( 'wpUploadDescription', $this->mComment ) . "\n" . |
| 876 | + Xml::hidden( 'wpLicense', $this->mLicense ) . "\n" . |
| 877 | + Xml::hidden( 'wpDestFile', $this->mDesiredDestName ) . "\n" . |
| 878 | + Xml::hidden( 'wpWatchthis', $this->mWatchthis ) . "\n" . |
| 879 | + "{$copyright}<br />" . |
| 880 | + Xml::submitButton( wfMsg( 'ignorewarning' ), array ( 'name' => 'wpUpload', 'id' => 'wpUpload', 'checked' => 'checked' ) ) . ' ' . |
| 881 | + Xml::submitButton( wfMsg( 'reuploaddesc' ), array ( 'name' => 'wpReUpload', 'id' => 'wpReUpload' ) ) . |
| 882 | + Xml::closeElement( 'form' ) . "\n" |
| 883 | + ); |
905 | 884 | } |
906 | 885 | |
907 | 886 | /** |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1433,7 +1433,7 @@ |
1434 | 1434 | 'upload' => 'Upload file', |
1435 | 1435 | 'uploadbtn' => 'Upload file', |
1436 | 1436 | 'reupload' => 'Re-upload', |
1437 | | -'reuploaddesc' => 'Return to the upload form.', |
| 1437 | +'reuploaddesc' => 'Cancel upload and return to the upload form', |
1438 | 1438 | 'uploadnologin' => 'Not logged in', |
1439 | 1439 | 'uploadnologintext' => 'You must be [[Special:Userlogin|logged in]] to upload files.', |
1440 | 1440 | 'upload_directory_read_only' => 'The upload directory ($1) is not writable by the webserver.', |
— | — | @@ -1459,7 +1459,7 @@ |
1460 | 1460 | 'filestatus' => 'Copyright status:', |
1461 | 1461 | 'filesource' => 'Source:', |
1462 | 1462 | 'uploadedfiles' => 'Uploaded files', |
1463 | | -'ignorewarning' => 'Ignore warning and save file anyway.', |
| 1463 | +'ignorewarning' => 'Ignore warning and save file anyway', |
1464 | 1464 | 'ignorewarnings' => 'Ignore any warnings', |
1465 | 1465 | 'minlength1' => 'File names must be at least one letter.', |
1466 | 1466 | 'illegalfilename' => 'The filename "$1" contains characters that are not allowed in page titles. Please rename the file and try uploading it again.', |
Index: trunk/phase3/languages/messages/MessagesDe.php |
— | — | @@ -1091,7 +1091,7 @@ |
1092 | 1092 | 'upload' => 'Hochladen', |
1093 | 1093 | 'uploadbtn' => 'Datei hochladen', |
1094 | 1094 | 'reupload' => 'Abbrechen', |
1095 | | -'reuploaddesc' => 'Zurück zur Hochladen-Seite.', |
| 1095 | +'reuploaddesc' => 'Abbrechen und zurück zur Hochladen-Seite', |
1096 | 1096 | 'uploadnologin' => 'Nicht angemeldet', |
1097 | 1097 | 'uploadnologintext' => 'Du musst [[Special:Userlogin|angemeldet sein]], um Dateien hochladen zu können.', |
1098 | 1098 | 'upload_directory_read_only' => 'Der Webserver hat keine Schreibrechte für das Upload-Verzeichnis ($1).', |
— | — | @@ -1124,7 +1124,7 @@ |
1125 | 1125 | 'filestatus' => 'Copyright-Status:', |
1126 | 1126 | 'filesource' => 'Quelle:', |
1127 | 1127 | 'uploadedfiles' => 'Hochgeladene Dateien', |
1128 | | -'ignorewarning' => 'Warnung ignorieren und Datei speichern.', |
| 1128 | +'ignorewarning' => 'Warnung ignorieren und Datei speichern', |
1129 | 1129 | 'ignorewarnings' => 'Warnungen ignorieren', |
1130 | 1130 | 'minlength1' => 'Dateinamen müssen mindestens einen Buchstaben lang sein.', |
1131 | 1131 | 'illegalfilename' => 'Der Dateiname „$1“ enthält mindestens ein nicht erlaubtes Zeichen. Bitte benenne die Datei um und versuche sie erneut hochzuladen.', |