X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=api.php;h=38dc35dab9ef09834ac3120e8e8f74b229a9a868;hp=2054350084a29108e54982d3de468354805b33da;hb=c58963cfcd8a6ec3cd5374af8412c883b38e1a38;hpb=bd5438d61fd67d910da4183d4870366961a97b4a diff --git a/api.php b/api.php index 2054350..38dc35d 100644 --- a/api.php +++ b/api.php @@ -216,6 +216,7 @@ function main ($con) { if ($_POST ["keep_img"] == "yes") { $imgpath = $feature->imgpath; } else { + request_error (); $imgpath = save_uploaded_file ($_FILES ["image_file"], $con); } @@ -256,6 +257,7 @@ function main ($con) { success_feature ($new_feature, "update"); break; case "add": + request_error (); $imgpath = save_uploaded_file ($_FILES ["image_file"], $con); $lon = $_POST ["lon"]; @@ -275,6 +277,7 @@ function main ($con) { success_feature ($feature, "add"); break; case "del": + request_error (); $id = $_POST ["fid"]; $feature = $con->getfeature ($id); if (!isset ($feature)) {