Don't include the skinname.js message if it's not set for this skin.
Patch from Michael Keppler:
http://bugzilla.wikipedia.org/attachment.cgi?id=483
$s = '/* generated javascript */';
$s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';";
$s .= '/* MediaWiki:'.ucfirst($this->skinname)." */\n";
- $s .= wfMsg(ucfirst($this->skinname).'.js');
+
+ // avoid inclusion of non defined user JavaScript (with custom skins only)
+ // by checking for default message content
+ $msgKey = ucfirst($this->skinname).'.js';
+ $userJS = wfMsg($msgKey);
+ if ('<'.$msgKey.'>' != $userJS) {
+ $s .= $userJS;
+ }
wfProfileOut( $fname );
return $s;