$res .= "<imgurl>" .
($feature->imgpath ?
- full_url_from_filename ($feature->imgpath)
+ full_url_from_imgpath ($feature->imgpath)
: "") .
"</imgurl>";
}
function delete_image_if_unused ($imgpath, $con) {
+ if (!isset ($imgpath) || (strlen ($imgpath) == 0)) {
+ return;
+ }
if ($con->imgpath_exists ($imgpath)) {
return false;
}
$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 ();
}
$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 ();
}