Skip to content

Commit

Permalink
#265 [Address] fix: delete and update favorite
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Jul 19, 2024
1 parent 46b3cd6 commit b36d1bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions view/address_card.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,10 @@
$objectLinked->fetch($fromId);
if ($objectLinked->array_options['options_projectaddress'] == $addressID) {
$objectLinked->array_options['options_projectaddress'] = 0;
$objectLinked->update($user);
$objectLinked->updateExtrafield('projectaddress');
}

$geolocations = $geolocation->fetchAll('', '', 0, 0, ['customsql' => 'fk_address = ' . $addressID]);
$geolocation = array_shift($geolocations);
$geolocations = $geolocation->fetch('', '', ' AND fk_address = ' . $addressID);
$geolocation->delete($user, false, false);

setEventMessages($langs->trans('AddressDeleted'), []);
Expand Down

0 comments on commit b36d1bd

Please sign in to comment.