Index: trunk/phase3/includes/SpecialUpload.php |
— | — | @@ -668,7 +668,7 @@ |
669 | 669 | * @access private |
670 | 670 | */ |
671 | 671 | function uploadWarning( $warning ) { |
672 | | - global $wgOut; |
| 672 | + global $wgOut, $wgContLang; |
673 | 673 | global $wgUseCopyrightUpload; |
674 | 674 | |
675 | 675 | $this->mSessionKey = $this->stashSession(); |
— | — | @@ -686,6 +686,8 @@ |
687 | 687 | $reup = wfMsgWikiHtml( 'reuploaddesc' ); |
688 | 688 | $titleObj = SpecialPage::getTitleFor( 'Upload' ); |
689 | 689 | $action = $titleObj->escapeLocalURL( 'action=submit' ); |
| 690 | + $align1 = $wgContLang->isRTL() ? 'left' : 'right'; |
| 691 | + $align2 = $wgContLang->isRTL() ? 'right' : 'left'; |
690 | 692 | |
691 | 693 | if ( $wgUseCopyrightUpload ) |
692 | 694 | { |
— | — | @@ -709,16 +711,16 @@ |
710 | 712 | <table border='0'> |
711 | 713 | <tr> |
712 | 714 | <tr> |
713 | | - <td align='right'> |
| 715 | + <td align='$align1'> |
714 | 716 | <input tabindex='2' type='submit' name='wpUpload' value=\"$save\" /> |
715 | 717 | </td> |
716 | | - <td align='left'>$iw</td> |
| 718 | + <td align='$align2'>$iw</td> |
717 | 719 | </tr> |
718 | 720 | <tr> |
719 | | - <td align='right'> |
| 721 | + <td align='$align1'> |
720 | 722 | <input tabindex='2' type='submit' name='wpReUpload' value=\"{$reupload}\" /> |
721 | 723 | </td> |
722 | | - <td align='left'>$reup</td> |
| 724 | + <td align='$align2'>$reup</td> |
723 | 725 | </tr> |
724 | 726 | </tr> |
725 | 727 | </table></form>\n" ); |
— | — | @@ -732,7 +734,7 @@ |
733 | 735 | * @access private |
734 | 736 | */ |
735 | 737 | function mainUploadForm( $msg='' ) { |
736 | | - global $wgOut, $wgUser; |
| 738 | + global $wgOut, $wgUser, $wgContLang; |
737 | 739 | global $wgUseCopyrightUpload, $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview; |
738 | 740 | global $wgRequest, $wgAllowCopyUploads, $wgEnableAPI; |
739 | 741 | global $wgStylePath, $wgStyleVersion; |
— | — | @@ -829,27 +831,29 @@ |
830 | 832 | } |
831 | 833 | |
832 | 834 | $encComment = htmlspecialchars( $this->mComment ); |
| 835 | + $align1 = $wgContLang->isRTL() ? 'left' : 'right'; |
| 836 | + $align2 = $wgContLang->isRTL() ? 'right' : 'left'; |
833 | 837 | |
834 | 838 | $wgOut->addHTML( <<<EOT |
835 | 839 | <form id='upload' method='post' enctype='multipart/form-data' action="$action"> |
836 | 840 | <table border='0'> |
837 | 841 | <tr> |
838 | 842 | {$this->uploadFormTextTop} |
839 | | - <td align='right' valign='top'><label for='wpUploadFile'>{$sourcefilename}:</label></td> |
840 | | - <td align='left'> |
| 843 | + <td align='$align1' valign='top'><label for='wpUploadFile'>{$sourcefilename}:</label></td> |
| 844 | + <td align='$align2'> |
841 | 845 | {$filename_form} |
842 | 846 | </td> |
843 | 847 | </tr> |
844 | 848 | <tr> |
845 | | - <td align='right'><label for='wpDestFile'>{$destfilename}:</label></td> |
846 | | - <td align='left'> |
| 849 | + <td align='$align1'><label for='wpDestFile'>{$destfilename}:</label></td> |
| 850 | + <td align='$align2'> |
847 | 851 | <input tabindex='2' type='text' name='wpDestFile' id='wpDestFile' size='40' |
848 | 852 | value="$encDestName" $destOnkeyup /> |
849 | 853 | </td> |
850 | 854 | </tr> |
851 | 855 | <tr> |
852 | | - <td align='right'><label for='wpUploadDescription'>{$summary}</label></td> |
853 | | - <td align='left'> |
| 856 | + <td align='$align1'><label for='wpUploadDescription'>{$summary}</label></td> |
| 857 | + <td align='$align2'> |
854 | 858 | <textarea tabindex='3' name='wpUploadDescription' id='wpUploadDescription' rows='6' |
855 | 859 | cols='{$cols}'{$ew}>$encComment</textarea> |
856 | 860 | {$this->uploadFormTextAfterSummary} |
— | — | @@ -862,8 +866,8 @@ |
863 | 867 | if ( $licenseshtml != '' ) { |
864 | 868 | global $wgStylePath; |
865 | 869 | $wgOut->addHTML( " |
866 | | - <td align='right'><label for='wpLicense'>$license:</label></td> |
867 | | - <td align='left'> |
| 870 | + <td align='$align1'><label for='wpLicense'>$license:</label></td> |
| 871 | + <td align='$align2'> |
868 | 872 | <select name='wpLicense' id='wpLicense' tabindex='4' |
869 | 873 | onchange='licenseSelectorCheck()'> |
870 | 874 | <option value=''>$nolicense</option> |
— | — | @@ -888,12 +892,12 @@ |
889 | 893 | $uploadsource = htmlspecialchars( $this->mCopyrightSource ); |
890 | 894 | |
891 | 895 | $wgOut->addHTML( " |
892 | | - <td align='right' nowrap='nowrap'><label for='wpUploadCopyStatus'>$filestatus:</label></td> |
| 896 | + <td align='$align1' nowrap='nowrap'><label for='wpUploadCopyStatus'>$filestatus:</label></td> |
893 | 897 | <td><input tabindex='5' type='text' name='wpUploadCopyStatus' id='wpUploadCopyStatus' |
894 | 898 | value=\"$copystatus\" size='40' /></td> |
895 | 899 | </tr> |
896 | 900 | <tr> |
897 | | - <td align='right'><label for='wpUploadCopyStatus'>$filesource:</label></td> |
| 901 | + <td align='$align1'><label for='wpUploadCopyStatus'>$filesource:</label></td> |
898 | 902 | <td><input tabindex='6' type='text' name='wpUploadSource' id='wpUploadCopyStatus' |
899 | 903 | value=\"$uploadsource\" size='40' /></td> |
900 | 904 | </tr> |
— | — | @@ -913,11 +917,11 @@ |
914 | 918 | $warningRow |
915 | 919 | <tr> |
916 | 920 | <td></td> |
917 | | - <td align='left'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td> |
| 921 | + <td align='$align2'><input tabindex='9' type='submit' name='wpUpload' value=\"{$ulb}\" /></td> |
918 | 922 | </tr> |
919 | 923 | <tr> |
920 | 924 | <td></td> |
921 | | - <td align='left'> |
| 925 | + <td align='$align2'> |
922 | 926 | " ); |
923 | 927 | $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); |
924 | 928 | $wgOut->addHTML( " |
— | — | @@ -1392,3 +1396,4 @@ |
1393 | 1397 | } |
1394 | 1398 | } |
1395 | 1399 | |
| 1400 | + |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -345,6 +345,7 @@ |
346 | 346 | * (bug 10769) Database::update() should return boolean result |
347 | 347 | * Toggles in RTL preferences indented to the right, hidden in IE in some |
348 | 348 | cases. |
| 349 | +* Fix RTL display of the upload form. |
349 | 350 | |
350 | 351 | == API changes since 1.10 == |
351 | 352 | |