From 5dd38fee468b119a5c66cca2a56535e641a7ecc5 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sat, 13 Jun 2009 23:30:17 +0000 Subject: [PATCH] (bug 19170) Special:Version should follow the content language direction --- RELEASE-NOTES | 1 + includes/specials/SpecialVersion.php | 18 ++++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 67f9b0044c..ce426775fa 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -183,6 +183,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN link from the edit comment * (bug 19112) Preferences now respects $wgUseExternalEditor, $wgExternalDiffEngine * (bug 18173) MediaWiki now fails when unable to determine a client IP +* (bug 19170) Special:Version should follow the content language direction == API changes in 1.16 == diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 74e1cfcd77..e589af932b 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -20,13 +20,17 @@ class SpecialVersion extends SpecialPage { * main() */ function execute( $par ) { - global $wgOut, $wgMessageCache, $wgSpecialVersionShowHooks; + global $wgOut, $wgMessageCache, $wgSpecialVersionShowHooks, $wgContLang; $wgMessageCache->loadAllMessages(); $this->setHeaders(); $this->outputHeader(); - $wgOut->addHTML( '
' ); + if( $wgContLang->isRTL() ) { + $wgOut->addHTML( '
' ); + } else { + $wgOut->addHTML( '
' ); + } $text = $this->MediaWikiCredits() . $this->softwareInformation() . @@ -47,8 +51,13 @@ class SpecialVersion extends SpecialPage { * @return wiki text showing the license information */ static function MediaWikiCredits() { - $ret = Xml::element( 'h2', array( 'id' => 'mw-version-license' ), wfMsg( 'version-license' ) ) . - "__NOTOC__ + global $wgContLang; + + $ret = Xml::element( 'h2', array( 'id' => 'mw-version-license' ), wfMsg( 'version-license' ) ); + + // This text is always left-to-right. + $ret .= '
'; + $ret .= "__NOTOC__ This wiki is powered by '''[http://www.mediawiki.org/ MediaWiki]''', copyright © 2001-2009 Magnus Manske, Brion Vibber, Lee Daniel Crocker, Tim Starling, Erik Möller, Gabriel Wicke, Ævar Arnfjörð Bjarmason, @@ -70,6 +79,7 @@ class SpecialVersion extends SpecialPage { Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA or [http://www.gnu.org/licenses/old-licenses/gpl-2.0.html read it online]. "; + $ret .= '
'; return str_replace( "\t\t", '', $ret ) . "\n"; } -- 2.20.1