Merged revisions 49406 via svnmerge from

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

........
  r49406 | ischommer | 2008-02-12 12:10:06 +1300 (Tue, 12 Feb 2008) | 1 line
  
  checking for valid css media type
........


git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@52409 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-04-09 11:25:47 +00:00
parent 57ef489ffb
commit 067d2a5804

View File

@ -206,7 +206,7 @@ class Requirements {
} }
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)) {
$media = (isset($params['media'])) ? " media=\"{$params['media']}\"" : ""; $media = (isset($params['media']) && !empty($params['media'])) ? " media=\"{$params['media']}\"" : "";
$requirements .= "<link rel=\"stylesheet\" type=\"text/css\"{$media} href=\"$prefix$file\" />\n"; $requirements .= "<link rel=\"stylesheet\" type=\"text/css\"{$media} href=\"$prefix$file\" />\n";
} }
} }