X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=api.php;h=6ed26c9712435eec3dad280935df78b5c4023c65;hp=93f27bde6bd5e658a5a0a7af32c297754abe76f0;hb=e4a4e5149d55cf01a86f26392c52fdca803654ce;hpb=de485fbe85dc15d416ed08a51d6561fc8db0e078 diff --git a/api.php b/api.php index 93f27bd..6ed26c9 100644 --- a/api.php +++ b/api.php @@ -20,7 +20,7 @@ function success_feature ($feature, $request) { $res .= "" . ($feature->imgpath ? - full_url_from_filename ($feature->imgpath) + full_url_from_imgpath ($feature->imgpath) : "") . ""; @@ -201,7 +201,7 @@ function main ($con) { $description = unquote ($_POST ["description"]); try { - $new_feature = new feature ($id, $lon, $lat, $imgpath, $title, $description); + $new_feature = new feature ($id, $lon, $lat, $imgpath, $title, $description, 0); } catch (Exception $e) { request_error (); } @@ -239,7 +239,7 @@ function main ($con) { $title = unquote ($_POST ["title"]); $description = unquote ($_POST ["description"]); try { - $feature = new feature (null, $lon, $lat, $imgpath, $title, $description); + $feature = new feature (null, $lon, $lat, $imgpath, $title, $description, 0); } catch (Exception $e) { request_error (); }