a72b2dd4 by Chris Boden

Fixed what I think was a bug if the user called url function from a theme

1 parent 3a17009c
......@@ -56,7 +56,10 @@ function autoloader($class) {
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);
}
$base_dir = (false === $base_file ? DIR : dirname($base_file));
......