Merge "Made Special:Contributions includable"
[lhc/web/wiklou.git] / includes / resourceloader / ResourceLoaderUserCSSPrefsModule.php
index bda8653..424afce 100644 (file)
@@ -41,12 +41,12 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
         */
        public function getModifiedTime( ResourceLoaderContext $context ) {
                $hash = $context->getHash();
-               if ( isset( $this->modifiedTime[$hash] ) ) {
-                       return $this->modifiedTime[$hash];
+               if ( !isset( $this->modifiedTime[$hash] ) ) {
+                       global $wgUser;
+                       $this->modifiedTime[$hash] = wfTimestamp( TS_UNIX, $wgUser->getTouched() );
                }
 
-               global $wgUser;
-               return $this->modifiedTime[$hash] = wfTimestamp( TS_UNIX, $wgUser->getTouched() );
+               return $this->modifiedTime[$hash];
        }
 
        /**
@@ -71,18 +71,12 @@ class ResourceLoaderUserCSSPrefsModule extends ResourceLoaderModule {
                                ( $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(kk-arab), ' .
-                       'a:lang(mzn), a:lang(ps), a:lang(ur) { text-decoration: none; }';
+                       $rules[] = 'a:lang(ar), a:lang(kk-arab), a:lang(mzn), ' .
+                       'a:lang(ps), a:lang(ur) { text-decoration: none; }';
                }
                if ( $options['justify'] ) {
                        $rules[] = "#article, #bodyContent, #mw_content { text-align: justify; }\n";
                }
-               if ( !$options['showtoc'] ) {
-                       $rules[] = "#toc { display: none; }\n";
-               }
-               if ( !$options['editsection'] ) {
-                       $rules[] = ".mw-editsection { display: none; }\n";
-               }
                if ( $options['editfont'] !== 'default' ) {
                        // Double-check that $options['editfont'] consists of safe characters only
                        if ( preg_match( '/^[a-zA-Z0-9_, -]+$/', $options['editfont'] ) ) {