X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FSkin.php;h=6722ccabd1b3e954708ebbb9e19237b3aecf842b;hb=688200c607640e77029d171803a7a72832519aa2;hp=a71bafcf970b71bd6605fd9ae628b2518e38d184;hpb=aa3499760344aca3d5f75800628104afc1cd65e8;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Skin.php b/includes/Skin.php index a71bafcf97..6722ccabd1 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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 element + * @return array of associative name-to-value elements for 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 * "" tag, skins can override it if they have a need to add in any @@ -1394,8 +1405,8 @@ abstract class Skin extends ContextSource { // Singular if no revision -> diff link will show latest change only in any case $plural = false; } - $plural = $plural ? 2 : 1; - // 2 signifies "more than one revision". We don't know how many, and even if we did, + $plural = $plural ? 999 : 1; + // 999 signifies "more than one revision". We don't know how many, and even if we did, // the number of revisions or authors is not necessarily the same as the number of // "messages". $newMessagesLink = Linker::linkKnown( @@ -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