mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update var_delete.php
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2013
|
Portions created by the Initial Developer are Copyright (C) 2008-2018
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -47,13 +47,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//delete the data
|
//delete the data
|
||||||
if (strlen($id) > 0) {
|
if (strlen($id) > 0 && is_uuid($id)) {
|
||||||
|
//delete the variable
|
||||||
$sql = "delete from v_vars ";
|
$sql = "delete from v_vars ";
|
||||||
$sql .= "where var_uuid = '$id' ";
|
$sql .= "where var_uuid = '$id' ";
|
||||||
$prep_statement = $db->prepare(check_sql($sql));
|
$prep_statement = $db->prepare(check_sql($sql));
|
||||||
$prep_statement->execute();
|
$prep_statement->execute();
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
|
//rewrite the xml
|
||||||
save_var_xml();
|
save_var_xml();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user