summaryrefslogtreecommitdiff
path: root/lib/exe/ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/exe/ajax.php')
-rw-r--r--lib/exe/ajax.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php
index 0100f3130..9e89d6bd3 100644
--- a/lib/exe/ajax.php
+++ b/lib/exe/ajax.php
@@ -23,11 +23,18 @@ header('Content-Type: text/html; charset=utf-8');
//call the requested function
+if (!isset($_POST['call'])) { return; }
$call = 'ajax_'.$_POST['call'];
if(function_exists($call)){
$call();
}else{
- print "The called function '".htmlspecialchars($call)."' does not exist!";
+ $call = $_POST['call'];
+ $evt = new Doku_Event('AJAX_CALL_UNKNOWN', $call);
+ if ($evt->advise_before()) {
+ print "AJAX call '".htmlspecialchars($_POST['call'])."' unknown!\n";
+ }
+ $evt->advise_after();
+ unset($evt);
}
/**