summaryrefslogtreecommitdiff
path: root/ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'ajax.php')
-rw-r--r--ajax.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/ajax.php b/ajax.php
index 928a6d286..2336c314d 100644
--- a/ajax.php
+++ b/ajax.php
@@ -6,19 +6,23 @@
* @author Andreas Gohr <andi@splitbrain.org>
*/
+//fix for Opera XMLHttpRequests
+if(!count($_POST) && $HTTP_RAW_POST_DATA){
+ parse_str($HTTP_RAW_POST_DATA, $_POST);
+}
+
if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/');
require_once(DOKU_INC.'inc/init.php');
require_once(DOKU_INC.'inc/common.php');
require_once(DOKU_INC.'inc/pageutils.php');
require_once(DOKU_INC.'inc/auth.php');
-
//call the requested function
-$call = 'ajax_'.$_REQUEST['call'];
+$call = 'ajax_'.$_POST['call'];
if(function_exists($call)){
$call();
}else{
- print "The called function does not exist!";
+ print "The called function does not exist!";
}
/**
@@ -30,7 +34,7 @@ function ajax_qsearch(){
global $conf;
global $lang;
- $query = cleanID($_REQUEST['q']);
+ $query = cleanID($_POST['q']);
if(empty($query)) return;
$nsdir = str_replace(':','/',getNS($query));