Add CASCADINGSOURCES parser function
[lhc/web/wiklou.git] / includes / Skin.php
index 750f319..6722cca 100644 (file)
@@ -243,9 +243,7 @@ abstract class Skin extends ContextSource {
                                        $modules['watch'][] = 'mediawiki.page.watch.ajax';
                                }
 
-                               if ( !$user->getOption( 'disablesuggest', false ) ) {
-                                       $modules['search'][] = 'mediawiki.searchSuggest';
-                               }
+                               $modules['search'][] = 'mediawiki.searchSuggest';
                        }
                }
 
@@ -455,6 +453,19 @@ abstract class Skin extends ContextSource {
                return "$numeric $type $name";
        }
 
+       /*
+        * Return values for <html> element
+        * @return array of associative name-to-value elements for <html> element
+        */
+       public function getHtmlElementAttributes() {
+               $lang = $this->getLanguage();
+               return array(
+                       'lang' => $lang->getHtmlCode(),
+                       'dir' => $lang->getDir(),
+                       'class' => 'client-nojs',
+               );
+       }
+
        /**
         * This will be called by OutputPage::headElement when it is creating the
         * "<body>" tag, skins can override it if they have a need to add in any
@@ -1419,14 +1430,14 @@ abstract class Skin extends ContextSource {
                                        'youhavenewmessagesfromusers',
                                        $newMessagesLink,
                                        $newMessagesDiffLink
-                               )->numParams( $nofAuthors );
+                               )->numParams( $nofAuthors, $plural );
                        } else {
                                // $nofAuthors === 11 signifies "11 or more" ("more than 10")
                                $newMessagesAlert = $this->msg(
                                        $nofAuthors > 10 ? 'youhavenewmessagesmanyusers' : 'youhavenewmessages',
                                        $newMessagesLink,
                                        $newMessagesDiffLink
-                               );
+                               )->numParams( $plural );
                        }
                        $newMessagesAlert = $newMessagesAlert->text();
                        # Disable Squid cache