From: Rotem Liss Date: Fri, 3 Aug 2007 00:47:49 +0000 (+0000) Subject: Fix RTL display of the upload form. X-Git-Tag: 1.31.0-rc.0~51884 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=190dc254cb47ad1e9d82b9e6acd7bf1de499104a;p=lhc%2Fweb%2Fwiklou.git Fix RTL display of the upload form. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8805167e5c..78548331a4 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -345,6 +345,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10769) Database::update() should return boolean result * Toggles in RTL preferences indented to the right, hidden in IE in some cases. +* Fix RTL display of the upload form. == API changes since 1.10 == diff --git a/includes/SpecialUpload.php b/includes/SpecialUpload.php index 0affae1bc9..1c738cce6e 100644 --- a/includes/SpecialUpload.php +++ b/includes/SpecialUpload.php @@ -668,7 +668,7 @@ class UploadForm { * @access private */ function uploadWarning( $warning ) { - global $wgOut; + global $wgOut, $wgContLang; global $wgUseCopyrightUpload; $this->mSessionKey = $this->stashSession(); @@ -686,6 +686,8 @@ class UploadForm { $reup = wfMsgWikiHtml( 'reuploaddesc' ); $titleObj = SpecialPage::getTitleFor( 'Upload' ); $action = $titleObj->escapeLocalURL( 'action=submit' ); + $align1 = $wgContLang->isRTL() ? 'left' : 'right'; + $align2 = $wgContLang->isRTL() ? 'right' : 'left'; if ( $wgUseCopyrightUpload ) { @@ -709,16 +711,16 @@ class UploadForm { - - + - - +
+ $iw$iw
+ $reup$reup
\n" ); @@ -732,7 +734,7 @@ class UploadForm { * @access private */ function mainUploadForm( $msg='' ) { - global $wgOut, $wgUser; + global $wgOut, $wgUser, $wgContLang; global $wgUseCopyrightUpload, $wgUseAjax, $wgAjaxUploadDestCheck, $wgAjaxLicensePreview; global $wgRequest, $wgAllowCopyUploads, $wgEnableAPI; global $wgStylePath, $wgStyleVersion; @@ -829,27 +831,29 @@ wgAjaxLicensePreview = {$alp}; } $encComment = htmlspecialchars( $this->mComment ); + $align1 = $wgContLang->isRTL() ? 'left' : 'right'; + $align2 = $wgContLang->isRTL() ? 'right' : 'left'; $wgOut->addHTML( << {$this->uploadFormTextTop} - - + - - + - - + - + + - + @@ -913,11 +917,11 @@ EOT $warningRow - + -
+ {$filename_form}
+
+ {$this->uploadFormTextAfterSummary} @@ -862,8 +866,8 @@ EOT if ( $licenseshtml != '' ) { global $wgStylePath; $wgOut->addHTML( " - +
+ " ); $wgOut->addWikiText( wfMsgForContent( 'edittools' ) ); $wgOut->addHTML( " @@ -1392,3 +1396,4 @@ EOT } } +