$_REQUEST = array_map('stripslashes_deep', $_REQUEST);
}
- require_once "functions.php";
require_once "sessions.php";
+ require_once "functions.php";
require_once "sanity_check.php";
require_once "config.php";
require_once "db.php";
$method = $_REQUEST["op"];
- $handler = new Handler_Public($link, $_REQUEST);
+ global $pluginhost;
+ $override = $pluginhost->lookup_handler("public", $method);
+
+ if ($override) {
+ $handler = $override;
+ } else {
+ $handler = new Handler_Public($link, $_REQUEST);
+ }
- if ($handler->before($method)) {
+ if (implements_interface($handler, "IHandler") && $handler->before($method)) {
if ($method && method_exists($handler, $method)) {
$handler->$method();
} else if (method_exists($handler, 'index')) {