From ea26bde9e13ba2024ce2ac58e31804f6711e2687 Mon Sep 17 00:00:00 2001 From: Michael Hasselbring Date: Thu, 11 Aug 2011 21:25:00 -0500 Subject: [PATCH 1/2] allowed ? in asset source --- system/asset.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/asset.php b/system/asset.php index d0e6f876..05ad042f 100644 --- a/system/asset.php +++ b/system/asset.php @@ -122,9 +122,11 @@ class Asset_Container { */ public function add($name, $source, $dependencies = array(), $attributes = array()) { - $type = (File::extension($source) == 'css') ? 'style' : 'script'; + $source = explode('?', $source); + + $type = (File::extension($source[0]) == 'css') ? 'style' : 'script'; - return call_user_func(array($this, $type), $name, $source, $dependencies, $attributes); + return call_user_func(array($this, $type), $name, $source[0], $dependencies, $attributes); } /** From 19f14fc66d9305c0619e097f11d551b8ba0c1ca7 Mon Sep 17 00:00:00 2001 From: Michael Hasselbring Date: Thu, 11 Aug 2011 21:27:20 -0500 Subject: [PATCH 2/2] passed original to method --- system/asset.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/system/asset.php b/system/asset.php index 05ad042f..0bfecdf7 100644 --- a/system/asset.php +++ b/system/asset.php @@ -122,11 +122,11 @@ class Asset_Container { */ public function add($name, $source, $dependencies = array(), $attributes = array()) { - $source = explode('?', $source); - - $type = (File::extension($source[0]) == 'css') ? 'style' : 'script'; + $_source = explode('?', $source); - return call_user_func(array($this, $type), $name, $source[0], $dependencies, $attributes); + $type = (File::extension($_source[0]) == 'css') ? 'style' : 'script'; + + return call_user_func(array($this, $type), $name, $source, $dependencies, $attributes); } /**