Skip to content

Commit

Permalink
Rewrite uris when inlining, with combine on.
Browse files Browse the repository at this point in the history
In this mode, we read in the cache file. Since the path at which the cache
file's contents therefore changes, need to rewrite all uris inside that
cache file.
  • Loading branch information
canton7 committed May 31, 2012
1 parent f32af83 commit 2e8d9f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions classes/casset.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ public static function render_css($group = false, $options = array(), $attr_dep
if ($inline)
{
$content = file_get_contents(DOCROOT.static::$cache_path.$filename);
// We'll need to fix the uris, unless they were rewritten absolutely to start with
$content = static::css_rewrite_uris($content, static::$cache_path.$filename, \Uri::string());
if ($options['gen_tags'])
$ret .= html_tag('style', $attr, PHP_EOL.$content.PHP_EOL).PHP_EOL;
else
Expand Down

0 comments on commit 2e8d9f7

Please sign in to comment.