Commit f00269cd authored by Andrey Filippov's avatar Andrey Filippov
Browse files

debugging

parent c7901f1e
Loading
Loading
Loading
Loading
+12 −1
Original line number Original line Diff line number Diff line
@@ -238,6 +238,13 @@ function filter_record_by_file($a,$f){


// default CT is text/html - LibreJS can add extra tags: <html><head></head><body>response</body></html>
// default CT is text/html - LibreJS can add extra tags: <html><head></head><body>response</body></html>
header("Content-Type: text/plain");
header("Content-Type: text/plain");
if ($cmd=="debug"){
    $arr = get_control($file);
    echo "<!--";
    print_r($arr);
    echo "-->";
    exit (0);
}


if ($cmd=="do_nothing"){
if ($cmd=="do_nothing"){


@@ -309,7 +316,11 @@ if ($cmd=="restore"){
if ($cmd=="reread"){
if ($cmd=="reread"){
    $file = $_GET['file'];
    $file = $_GET['file'];
    $arr = get_control($DEBUGFSFILE);
    $arr = get_control($DEBUGFSFILE);
    if (!$file) {
        $filtered = $arr;
    } else {
        $filtered = filter_record_by_file($arr,$file);
        $filtered = filter_record_by_file($arr,$file);
    }
    echo json_encode($filtered);
    echo json_encode($filtered);
    //echo "<pre>";print_r($filtered);
    //echo "<pre>";print_r($filtered);
}
}