1cea6a67 by Chris Boden

Fix for filesystem linked themes

1 parent 1b9bd638
...@@ -58,8 +58,19 @@ function url($script, $base_file = false) { ...@@ -58,8 +58,19 @@ function url($script, $base_file = false) {
58 if (defined(__NAMESPACE__ . '\OVERRIDE')) { 58 if (defined(__NAMESPACE__ . '\OVERRIDE')) {
59 $info = Array(pathinfo(DIR), pathinfo(__DIR__)); 59 $info = Array(pathinfo(DIR), pathinfo(__DIR__));
60 60
61 $base_file = str_replace(__DIR__, DIR, $base_file); 61 // This should replace link for tz-tools com components
62 $base_file = str_replace($info[1]['dirname'], $info[0]['dirname'], $base_file); 62 $base_file = str_replace(__DIR__, DIR, $base_file, $q);
63
64 // I think this does the same...?
65 $base_file = str_replace($info[1]['dirname'], $info[0]['dirname'], $base_file, $r);
66
67 // This should replace for theme files
68 $theme_dir = get_theme_root() . DIRECTORY_SEPARATOR . get_template();
69 if (is_link($theme_dir)) {
70 $base_file = str_replace(readlink($theme_dir), $theme_dir . DIRECTORY_SEPARATOR, $base_file);
71 }
72
73 // 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)
63 } 74 }
64 75
65 $base_dir = (false === $base_file ? DIR : dirname($base_file)); 76 $base_dir = (false === $base_file ? DIR : dirname($base_file));
......