Browse Source

ajax.php: do not json_decode post data

master
parent
commit
75d112b3d7
  1. 3
      ajax.php
  2. 4
      src/options.php

3
ajax.php

@ -17,9 +17,6 @@ function error($msg) {
Header("Content-Type: application/json; charset=UTF-8");
$postdata = file_get_contents("php://input");
if ($postdata) {
$postdata = json_decode($postdata, true);
}
$fun = "ajax_{$_REQUEST['__func']}";
$return = $fun($_REQUEST, $postdata);

4
src/options.php

@ -1,5 +1,7 @@
<?php
function ajax_options_save($get_param, $post_param) {
function ajax_options_save($get_param, $postdata) {
$post_param = json_decode($postdata, true);
call_hooks('options_save', $post_param);
$_SESSION['options'] = $post_param;

Loading…
Cancel
Save