Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adeg committed Apr 16, 2014
1 parent ba5060a commit c47af38
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions EClientScriptBoost.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class EClientScriptBoost extends CClientScript
'TbBulkActions#',
'TbEditableField#',
'TbEditable#',
'TbGridView#',
'TbSelect2#',
'Yii2Debug#',
'Yii.CHtml.#',
Expand Down Expand Up @@ -112,7 +113,7 @@ protected function registerContent($type, $id, $content, $registerParam=null, ar
$debug = $this->debug === null ? YII_DEBUG : $this->debug;

// Check if this script is in the exceptions - if so, skip caching.
// TODO: do we really need skipList for CSS?
// Should be checked for both script and CSS content
$skip = false;
foreach($this->skipList as $s) {
$skip|=strpos($id, $s) === 0;
Expand All @@ -121,7 +122,12 @@ protected function registerContent($type, $id, $content, $registerParam=null, ar

// Do not use cache for content with IDs listed in {@link $this->skipList}
if ($skip)
$compressed = EScriptBoost::minifyJs($content);
{
if ($type == 'script')
$compressed = EScriptBoost::minifyJs($content);
else if ($type == 'css')
$compressed = EScriptBoost::minifyCss($content);
}
else
$compressed = Yii::app()->cache->get($id);

Expand Down

0 comments on commit c47af38

Please sign in to comment.