I also had the problem, addresses could not be deleted from address book in any templates in v1.5 .
The only way i found to get it to work was to change:
Code:
if (isset($_GET['action']) && ($_GET['action'] == 'deleteconfirm') && isset($_POST['delete']) && is_numeric($_POST['delete'])) {
$sql = "DELETE FROM " . TABLE_ADDRESS_BOOK . "
WHERE address_book_id = :delete
AND customers_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$sql = $db->bindVars($sql, ':delete', $_POST['delete'], 'integer');
$db->Execute($sql);
to:
Code:
if (isset($_GET['action']) && ($_GET['action'] == 'deleteconfirm') && isset($_GET['delete']) && is_numeric($_GET['delete'])) {
$sql = "DELETE FROM " . TABLE_ADDRESS_BOOK . "
WHERE address_book_id = :delete
AND customers_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$sql = $db->bindVars($sql, ':delete', $_GET['delete'], 'integer');
$db->Execute($sql);
Ajeh, is it ok to use _GET['delete'] here?
Bookmarks