test/post-test.php
author ymh <ymh.work@gmail.com>
Tue, 22 Oct 2024 09:54:34 +0200
changeset 1080 2b513bcb710a
parent 931 0fdce6e14748
permissions -rw-r--r--
increment version
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
928
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     1
<?php
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     2
931
0fdce6e14748 Created Tagger widget for FTV project
veltr
parents: 928
diff changeset
     3
$data = json_decode(file_get_contents("php://input"));
928
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     4
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     5
if (!isset($data->annotations[0]->id)) {
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     6
    $data->annotations[0]->id = uniqid("annotation_");
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     7
}
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     8
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
     9
if (!isset($data->annotations[0]->type)) {
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    10
    $data->annotations[0]->type = uniqid("annotationType_");
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    11
}
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    12
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    13
print_r(json_encode($data));
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    14
5aadbc9f27cd First tests before allowing mashup annotation
veltr
parents:
diff changeset
    15
?>