1cea6a67 by Chris Boden

Fix for filesystem linked themes

1 parent 1b9bd638
......@@ -58,8 +58,19 @@ function url($script, $base_file = false) {
if (defined(__NAMESPACE__ . '\OVERRIDE')) {
$info = Array(pathinfo(DIR), pathinfo(__DIR__));
$base_file = str_replace(__DIR__, DIR, $base_file);
$base_file = str_replace($info[1]['dirname'], $info[0]['dirname'], $base_file);
// This should replace link for tz-tools com components
$base_file = str_replace(__DIR__, DIR, $base_file, $q);
// I think this does the same...?
$base_file = str_replace($info[1]['dirname'], $info[0]['dirname'], $base_file, $r);
// This should replace for theme files
$theme_dir = get_theme_root() . DIRECTORY_SEPARATOR . get_template();
if (is_link($theme_dir)) {
$base_file = str_replace(readlink($theme_dir), $theme_dir . DIRECTORY_SEPARATOR, $base_file);
}
// I probably will need to add another replace for plugins (if we use plugins w/ tz-tools, prolly won't come to think of it)
}
$base_dir = (false === $base_file ? DIR : dirname($base_file));
......