Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -939,7 +939,14 @@ |
940 | 940 | $s = '/* generated javascript */'; |
941 | 941 | $s .= "var skin = '{$this->skinname}';\nvar stylepath = '{$wgStylePath}';"; |
942 | 942 | $s .= '/* MediaWiki:'.ucfirst($this->skinname)." */\n"; |
943 | | - $s .= wfMsg(ucfirst($this->skinname).'.js'); |
| 943 | + |
| 944 | + // avoid inclusion of non defined user JavaScript (with custom skins only) |
| 945 | + // by checking for default message content |
| 946 | + $msgKey = ucfirst($this->skinname).'.js'; |
| 947 | + $userJS = wfMsg($msgKey); |
| 948 | + if ('<'.$msgKey.'>' != $userJS) { |
| 949 | + $s .= $userJS; |
| 950 | + } |
944 | 951 | |
945 | 952 | wfProfileOut( $fname ); |
946 | 953 | return $s; |