Commit 5f23f631 by Qiang Xue

hashing the key for registerCss and registerJs.

parent f3d23ec0
......@@ -614,7 +614,7 @@ class View extends Component
*/
public function registerCss($css, $options = array(), $key = null)
{
$key = $key ?: $css;
$key = $key ?: md5($css);
$this->css[$key] = Html::style($css, $options);
}
......@@ -650,7 +650,7 @@ class View extends Component
*/
public function registerJs($js, $position = self::POS_READY, $key = null)
{
$key = $key ?: $js;
$key = $key ?: md5($js);
$this->js[$position][$key] = $js;
if ($position === self::POS_READY) {
$this->registerAssetBundle('yii/jquery');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment