Subversion Repositories ALCASAR

Rev

Rev 3037 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 3037 Rev 3179
Line 37... Line 37...
37
    if (isset($_GET['json']) || isset($_GET['jsonp'])) {
37
    if (isset($_GET['json']) || isset($_GET['jsonp'])) {
38
        header('Cache-Control: no-cache, must-revalidate');
38
        header('Cache-Control: no-cache, must-revalidate');
39
        $json = $output->getJsonString();
39
        $json = $output->getJsonString();
40
        if (isset($_GET['jsonp'])) {
40
        if (isset($_GET['jsonp'])) {
41
            header('Content-Type: application/javascript');
41
            header('Content-Type: application/javascript');
42
            echo(!preg_match('/[^\w\?]/', $_GET['callback'])?$_GET['callback']:'') . '('.$json.')';
42
            echo !preg_match('/[^\w\?]/', $_GET['callback'])?$_GET['callback']:'';
-
 
43
            echo '('.$json.')';
43
        } else {
44
        } else {
44
            header('Content-Type: application/json');
45
            header('Content-Type: application/json');
45
            echo $json;
46
            echo $json;
46
        }
47
        }
47
    } else {
48
    } else {