Merged revisions 51944 via svnmerge from

svn://svn.silverstripe.com/silverstripe/modules/sapphire/branches/2.2.0-mesq

........
  r51944 | ischommer | 2008-04-01 15:43:14 +1300 (Tue, 01 Apr 2008) | 1 line
  
  ENHANCEMENT Using separate <script> tags for each customScript() requirements (necessary e.g. for google analytics inclusion)
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52264 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-07 21:39:11 +00:00
parent b035abc6d3
commit a4d9521c3f

View File

@ -198,11 +198,11 @@ class Requirements {
} }
if(self::$customScript) { if(self::$customScript) {
$requirements .= "<script type=\"text/javascript\">\n//<![CDATA[\n";
foreach(array_diff_key(self::$customScript,self::$blocked) as $script) { foreach(array_diff_key(self::$customScript,self::$blocked) as $script) {
$requirements .= "<script type=\"text/javascript\">\n//<![CDATA[\n";
$requirements .= "$script\n"; $requirements .= "$script\n";
$requirements .= "\n//]]>\n</script>\n";
} }
$requirements .= "\n//]]>\n</script>\n";
} }
foreach(array_diff_key(self::$css,self::$blocked) as $file => $params) { foreach(array_diff_key(self::$css,self::$blocked) as $file => $params) {
if(Director::fileExists($file)) { if(Director::fileExists($file)) {