Fixed what I think was a bug if the user called url function from a theme
Showing
1 changed file
with
3 additions
and
0 deletions
| ... | @@ -56,7 +56,10 @@ function autoloader($class) { | ... | @@ -56,7 +56,10 @@ function autoloader($class) { |
| 56 | 56 | ||
| 57 | function url($script, $base_file = false) { | 57 | function url($script, $base_file = false) { |
| 58 | if (defined(__NAMESPACE__ . '\OVERRIDE')) { | 58 | if (defined(__NAMESPACE__ . '\OVERRIDE')) { |
| 59 | $info = Array(pathinfo(DIR), pathinfo(__DIR__)); | ||
| 60 | |||
| 59 | $base_file = str_replace(__DIR__, DIR, $base_file); | 61 | $base_file = str_replace(__DIR__, DIR, $base_file); |
| 62 | $base_file = str_replace($info[1]['dirname'], $info[0]['dirname'], $base_file); | ||
| 60 | } | 63 | } |
| 61 | 64 | ||
| 62 | $base_dir = (false === $base_file ? DIR : dirname($base_file)); | 65 | $base_dir = (false === $base_file ? DIR : dirname($base_file)); | ... | ... |
-
Please register or sign in to post a comment