Skip to content

Commit

Permalink
[AsseticBundle] Fixed url for assets in the debugging mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
yethee committed Mar 5, 2011
1 parent 727326b commit 4c54218
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/Symfony/Bundle/AsseticBundle/Templating/AsseticHelper.php
Expand Up @@ -85,22 +85,9 @@ public function assets($inputs = array(), $filters = array(), array $options = a
return array($coll->getTargetUrl());
}

// create a pattern for each leaf's target url
$pattern = $coll->getTargetUrl();
if (false !== $pos = strrpos($pattern, '.')) {
$pattern = substr($pattern, 0, $pos).'_*'.substr($pattern, $pos);
} else {
$pattern .= '_*';
}

$urls = array();
foreach ($coll as $leaf) {
$asset = $this->factory->createAsset($leaf->getSourceUrl(), $filters, array(
'output' => $pattern,
'name' => 'part'.(count($urls) + 1),
'debug' => $options['debug'],
));
$urls[] = $asset->getTargetUrl();
$urls[] = $leaf->getTargetUrl();
}

return $urls;
Expand Down

0 comments on commit 4c54218

Please sign in to comment.