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 ) {
+ if( false !== $wgAppleTouchIcon && wfExpandUrl('/apple-touch-icon.png') != wfExpandUrl($wgAppleTouchIcon) ) {
$out->addLink( array( 'rel' => 'apple-touch-icon', 'href' => $wgAppleTouchIcon ) );
}
- if( false !== $wgFavicon ) {
+ if( false !== $wgFavicon && wfExpandUrl('/favicon.ico') != wfExpandUrl($wgFavicon) ) {
$out->addLink( array( 'rel' => 'shortcut icon', 'href' => $wgFavicon ) );
}
return self::makeVariablesScript( $vars );
}
/**
- * Returns the Head Scripts (from local skin context)
+ * Return a random selection of the scripts we want in the header,
+ * according to no particular rhyme or reason. Various other scripts are
+ * returned from a haphazard assortment of other functions scattered over
+ * various files. This entire hackish system needs to be burned to the
+ * ground and rebuilt.
*
- * local $out variable that should be the same as $wgOut
+ * @param $out OutputPage object, should be $wgOut
*
* @return string Raw HTML to output to <head>
*/
- function getHeadScripts( OutputPage &$out ) {
+ function getHeadScripts( OutputPage $out ) {
global $wgStylePath, $wgUser, $wgJsMimeType, $wgStyleVersion, $wgOut;
global $wgUseSiteJs;
- $vars = self::makeGlobalVariablesScript( array( 'skinname' => $this->getSkinName() ) );
+ $vars = self::makeGlobalVariablesScript( $this->getSkinName() );
//moved wikibits to be called earlier on
//$out->addScriptFile( "{$wgStylePath}/common/wikibits.js" );
'action=raw&ctype='.$wgJsMimeType );
$wgOut->addScriptFile( $userjs );
}
- return $vars . "\t" . implode ( "\n\t", $r ) . $out->mScripts;
+ return "\t" . $vars . "\t" . $out->mScripts;
}
/**
if( !$wgUser->getOption( 'editsection' ) ) {
$s .= ".editsection { display: none; }\n";
}
+ $fontstyle = $wgUser->getOption( 'editfont' );
+ if ( $fontstyle !== 'default' ) {
+ $s .= "textarea { font-family: $fontstyle; }\n";
+ }
return $s;
}