From: Robin Pepermans Date: Fri, 17 Jun 2011 11:32:42 +0000 (+0000) Subject: (part of bug 6100) Set the directionality based on user language instead of content... X-Git-Tag: 1.31.0-rc.0~29476 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/recherche.php?a=commitdiff_plain;h=932c44fd3e6c8355ef461997be034c7a526b2586;p=lhc%2Fweb%2Fwiklou.git (part of bug 6100) Set the directionality based on user language instead of content language (as in r81622, but only when $wgBetterDirectionality is enabled) --- diff --git a/includes/resourceloader/ResourceLoaderContext.php b/includes/resourceloader/ResourceLoaderContext.php index 33859f0e6f..d391f63a60 100644 --- a/includes/resourceloader/ResourceLoaderContext.php +++ b/includes/resourceloader/ResourceLoaderContext.php @@ -140,8 +140,11 @@ class ResourceLoaderContext { if ( $this->direction === null ) { $this->direction = $this->request->getVal( 'dir' ); if ( !$this->direction ) { - global $wgContLang; - $this->direction = $wgContLang->getDir(); + global $wgBetterDirectionality, $wgContLang; + // if $wgBetterDirectionality is true, set + // directionality based on user language (see bug 6100) + $this->direction = ( $wgBetterDirectionality ? + Language::factory( $this->language )->getDir() : $wgContLang->getDir() ); } } return $this->direction;