Hi! I'm currently working on integrating css-js-booster into an existing website that uses .css files scattered throughout its directory tree. I'm assigning an array containing paths to the .css files relative to the booster_inc.php to $booster->css_source. Also, I'm developing my website at http://localhost/~username/foobar, so I am setting $booster->base_offset and $booster->document_root, too.
Everything seems to work out fine, except for a wrong path calculation in css_datauri_cleanup(). In booster_inc.php:1144, $booster_path is calculated using the document_root object-property, which has never been set for this instance of the Booster class that executes this function. css_datauri_cleanup() is executed only on the instance which was constructed in booster_css.php, and naturally, that instance knows nothing of the
document_root I used when parameterising $booster in my website's files.
However, I don't think it's actually necessary to recalculate $booster_path. In my opinion, it should be enough to use the $dir paramter that gets passed in with a usable relative path anyway? So, in line 1169, instead of
$replace = $treffer[1][$i].$booster_path.'/';
it should be enough to say
$replace = $treffer[1][$i];
At least, that seems to work for me. What are your thoughts on this? Am I missing something?
Regards,
please keep up the good work!,
Fritz.
ps: same file, unrelated issue, line 1170: I guess it should read if (...) ... = $css_stringbase instead of ... $css_stringmode.