Marius Cramer
2013-10-21 b533b414a075013307447a3fb895b1625504d477
interface/lib/classes/json_handler.inc.php
@@ -74,14 +74,19 @@
        $ret->code = $code;
        $ret->message = $message;
        $ret->response = $data;
        header('Content-Type: application/x-json; charset="utf-8"');
        header('Content-Type: application/json; charset="utf-8"');
        print json_encode($ret);
        exit;
    }
    
    public function run() {
        
        $method = reset(array_keys($_GET));
        if(!isset($_GET) || !is_array($_GET) || count($_GET) < 1) {
            $this->_return_json('invalid_method', 'Method not provided in json call');
        }
        $keys = array_keys($_GET);
        $method = reset($keys);
        $params = array();
        if(is_array($_POST)) {