From ca32f08966f1b51fcb19460f0996bb0c4048e6fe Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 3 Dec 2011 13:29:22 +0100 Subject: Update to MediaWiki 1.18.0 * also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing --- .../ResourceLoaderUserOptionsModule.php | 29 ++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'includes/resourceloader/ResourceLoaderUserOptionsModule.php') diff --git a/includes/resourceloader/ResourceLoaderUserOptionsModule.php b/includes/resourceloader/ResourceLoaderUserOptionsModule.php index 61c76940..8f28eb8d 100644 --- a/includes/resourceloader/ResourceLoaderUserOptionsModule.php +++ b/includes/resourceloader/ResourceLoaderUserOptionsModule.php @@ -29,8 +29,14 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule { protected $modifiedTime = array(); + protected $origin = self::ORIGIN_CORE_INDIVIDUAL; + /* Methods */ + /** + * @param $context ResourceLoaderContext + * @return array|int|Mixed + */ public function getModifiedTime( ResourceLoaderContext $context ) { $hash = $context->getHash(); if ( isset( $this->modifiedTime[$hash] ) ) { @@ -64,11 +70,19 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule { } } + /** + * @param $context ResourceLoaderContext + * @return string + */ public function getScript( ResourceLoaderContext $context ) { - return Xml::encodeJsCall( 'mediaWiki.user.options.set', + return Xml::encodeJsCall( 'mw.user.options.set', array( $this->contextUserOptions( $context ) ) ); } + /** + * @param $context ResourceLoaderContext + * @return array + */ public function getStyles( ResourceLoaderContext $context ) { global $wgAllowUserCssPrefs; @@ -80,6 +94,10 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule { if ( $options['underline'] < 2 ) { $rules[] = "a { text-decoration: " . ( $options['underline'] ? 'underline' : 'none' ) . "; }"; + } else { + # The scripts of these languages are very hard to read with underlines + $rules[] = 'a:lang(ar), a:lang(ckb), a:lang(fa),a:lang(kk-arab), ' . + 'a:lang(mzn), a:lang(ps), a:lang(ur) { text-decoration: none; }'; } if ( $options['highlightbroken'] ) { $rules[] = "a.new, #quickbar a.new { color: #ba0000; }\n"; @@ -109,12 +127,9 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule { return array(); } - public function getFlip( $context ) { - global $wgContLang; - - return $wgContLang->getDir() !== $context->getDirection(); - } - + /** + * @return string + */ public function getGroup() { return 'private'; } -- cgit v1.2.2