Skip to content

Fixed CHtml::cssFile() ignore CHtml::$closeSingleTags #1540

Merged
merged 4 commits into from Oct 6, 2012
View
4 framework/web/helpers/CHtml.php
@@ -270,9 +270,7 @@ public static function refresh($seconds, $url='')
*/
public static function cssFile($url,$media='')
{
- if($media!=='')
- $media=' media="'.$media.'"';
- return '<link rel="stylesheet" type="text/css" href="'.self::encode($url).'"'.$media.' />';
+ return CHtml::linkTag('stylesheet','text/css',self::encode($url),$media!=='' ? $media : null);
}
/**
Something went wrong with that request. Please try again.