diff options
author | Andreas Gohr <andi@splitbrain.org> | 2009-05-04 20:10:55 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2009-05-04 20:10:55 +0200 |
commit | 850c2e7c4319efcacd94ee246c3290f81e27769a (patch) | |
tree | 1e24704154f3110ffa57fd7c9e5360434f416525 | |
parent | 3a4bb9d5b60597f13681e43dff1a37b3a2966735 (diff) | |
download | rpg-850c2e7c4319efcacd94ee246c3290f81e27769a.tar.gz rpg-850c2e7c4319efcacd94ee246c3290f81e27769a.tar.bz2 |
fixed GET support in lib/exe/ajax.php FS#1679
Ignore-this: e77d9d77e6a02bb18b0cf7043a7eb3cb
darcs-hash:20090504181055-7ad00-f8bf902e0c93f45eb6ca33fd5b32c9f8bb85512e.gz
-rw-r--r-- | lib/exe/ajax.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php index b4bd20b70..4a30b0349 100644 --- a/lib/exe/ajax.php +++ b/lib/exe/ajax.php @@ -24,18 +24,21 @@ header('Content-Type: text/html; charset=utf-8'); //call the requested function if(isset($_POST['call'])) - $call = 'ajax_'.$_POST['call']; + $call = $_POST['call']; else if(isset($_GET['call'])) - $call = 'ajax_'.$_GET['call']; + $call = $_GET['call']; else exit; -if(function_exists($call)){ - $call(); + +$callfn = 'ajax_'.$call; + +if(function_exists($callfn)){ + $callfn(); }else{ - $call = $_POST['call']; $evt = new Doku_Event('AJAX_CALL_UNKNOWN', $call); if ($evt->advise_before()) { - print "AJAX call '".htmlspecialchars($_POST['call'])."' unknown!\n"; + print "AJAX call '".htmlspecialchars($call)."' unknown!\n"; + exit; } $evt->advise_after(); unset($evt); |