wfProfileIn( __METHOD__ );
- # Add favicons and Apple touch icons, if they're not the defaults
- #
# Generally the order of the favicon and apple-touch-icon links
# should not matter, but Konqueror (3.5.9 at least) incorrectly
# uses whichever one appears later in the HTML source. Make sure
# apple-touch-icon is specified first to avoid this.
- if( false !== $wgAppleTouchIcon && wfExpandUrl('/apple-touch-icon.png') != wfExpandUrl($wgAppleTouchIcon) ) {
+ if( false !== $wgAppleTouchIcon ) {
$out->addLink( array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) );
}
- if( false !== $wgFavicon && wfExpandUrl('/favicon.ico') != wfExpandUrl($wgFavicon) ) {
+ if( false !== $wgFavicon ) {
$out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) );
}
$skinName = $skinName['skinname'];
}
global $wgScript, $wgTitle, $wgStylePath, $wgUser;
- global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang, $wgVariant;
+ global $wgArticlePath, $wgScriptPath, $wgServer, $wgContLang, $wgLang;
global $wgCanonicalNamespaceNames, $wgOut, $wgArticle;
global $wgBreakFrames, $wgRequest, $wgVariantArticlePath, $wgActionPaths;
global $wgUseAjax, $wgAjaxWatch;
'wgIsArticle' => $wgOut->isArticle(),
'wgUserName' => $wgUser->isAnon() ? NULL : $wgUser->getName(),
'wgUserGroups' => $wgUser->isAnon() ? NULL : $wgUser->getEffectiveGroups(),
- 'wgUserVariant' => $wgVariant->getCode(),
'wgUserLanguage' => $wgLang->getCode(),
'wgContentLanguage' => $wgContLang->getCode(),
'wgBreakFrames' => $wgBreakFrames,
'wgDigitTransformTable' => $compactDigitTransTable,
'wgMainPageTitle' => $mainPage ? $mainPage->getPrefixedText() : null,
);
- if ( !( $wgContLang->hasVariants() ) ) {
- unset( $vars['wgUserVariant'] );
+ if ( $wgContLang->hasVariants() ) {
+ $vars['wgUserVariant'] = $wgContLang->getPreferredVariant();
}
//if on upload page output the extension list & js_upload