if(is_array($this->urlClasses)) {
foreach($this->urlClasses as $key => $val) {
error_log("checking url $url against $key, $val");
- if($url == "/") {
+ if($key == "/") {
$base = $val;
error_log("base set to $val");
- return new $val($this->config);
}
// TODO: this is quite messy really, need to think about how i do /'s in urls for url parsers
}
}
}
+
+ // check for "bases"
+ if($url == "/") {
+ return new $base($this->config);
+ }
+
}
error_log("get class returns default");
return new $default($this->config);
$mt = preg_match("/.*.js$/", $file);
if($mt > 0) {
error_log("loading js $file");
- echo "<script type=\"text/javascript\" src=\"$BASE_URL/css/$file\"></script>";
+ echo "<script type=\"text/javascript\" src=\"$BASE_URL/js/$file\"></script>";
//echo "required $basedir/$file\n";
}
}
<?php
global $URL_HANDLERS;
-$URL_HANDLERS["cron"] = "GLCASCron";
+$URL_HANDLERS["cron.*"] = "GLCASCron";
class GLCASCron {
function __construct($config)