From 5f23f631ba2ad1d50bc402e40dd7974164a3b316 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Mon, 20 May 2013 07:55:05 -0400 Subject: [PATCH] hashing the key for registerCss and registerJs. --- yii/base/View.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yii/base/View.php b/yii/base/View.php index 04eaacc..cf92741 100644 --- a/yii/base/View.php +++ b/yii/base/View.php @@ -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');