mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-30 04:29:16 +00:00
change the order of the deletes.
This commit is contained in:
@@ -33,12 +33,6 @@
|
||||
function delete() {
|
||||
//set the variable
|
||||
$db = $this->db;
|
||||
//remove the old menu
|
||||
$sql = "delete from v_menu_items ";
|
||||
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
|
||||
$sql .= "and (menu_item_protected <> 'true' ";
|
||||
$sql .= "or menu_item_protected is null); ";
|
||||
$db->exec(check_sql($sql));
|
||||
//remove the menu languages
|
||||
$sql = "delete from v_menu_languages as l, v_menu_items as m ";
|
||||
$sql .= "where l.menu_uuid = '".$this->menu_uuid."' ";
|
||||
@@ -46,6 +40,12 @@
|
||||
$sql .= "and (m.menu_item_protected <> 'true' ";
|
||||
$sql .= "or m.menu_item_protected is null); ";
|
||||
$db->exec(check_sql($sql));
|
||||
//remove the old menu
|
||||
$sql = "delete from v_menu_items ";
|
||||
$sql .= "where menu_uuid = '".$this->menu_uuid."' ";
|
||||
$sql .= "and (menu_item_protected <> 'true' ";
|
||||
$sql .= "or menu_item_protected is null); ";
|
||||
$db->exec(check_sql($sql));
|
||||
}
|
||||
|
||||
//restore the menu
|
||||
@@ -142,6 +142,7 @@
|
||||
$sql .= "'$menu_language', ";
|
||||
$sql .= "'$menu_item_title' ";
|
||||
$sql .= ")";
|
||||
echo $sql; exit;
|
||||
$db->exec(check_sql($sql));
|
||||
unset($sql);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user