Commit 0beec683 authored by Taylor Otwell's avatar Taylor Otwell

refactoring asset version handling.

parent a0c7db34
......@@ -122,9 +122,11 @@ class Asset_Container {
*/
public function add($name, $source, $dependencies = array(), $attributes = array())
{
$_source = explode('?', $source);
// Since assets may contain timestamps to force a refresh, we will strip them
// off to get the "real" filename of the asset.
$segments = explode('?', $source);
$type = (File::extension($_source[0]) == 'css') ? 'style' : 'script';
$type = (File::extension($segments[0]) == 'css') ? 'style' : 'script';
return call_user_func(array($this, $type), $name, $source, $dependencies, $attributes);
}
......
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