Skip to content
Snippets Groups Projects
Commit d0ed0c14 authored by Jared Hancock's avatar Jared Hancock
Browse files

Allow interaction with client-side ajax

And allow passing a callable array as the callback to the URL dispatcher
parent 7159d09e
No related branches found
No related tags found
No related merge requests found
......@@ -39,5 +39,6 @@ $dispatcher = patterns('',
url_get('^help-topic/(?P<id>\d+)$', 'getClientFormsForHelpTopic')
))
);
Signal::send('ajax.client', $dispatcher);
print $dispatcher->resolve($ost->get_path_info());
?>
......@@ -153,7 +153,10 @@ class UrlMatcher {
function apply_prefix() {
if (is_array($this->func)) { list($class, $func) = $this->func; }
else { $func = $this->func; $class = ""; }
$class = $this->prefix . $class;
if (is_object($class))
return array(false, $this->func);
if ($this->prefix)
$class = $this->prefix . $class;
if (strpos($class, ":")) {
list($file, $class) = explode(":", $class, 2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment