Misc: Database class integration.

This commit is contained in:
Nate
2019-09-04 12:21:57 -06:00
parent 9e301a0c97
commit fdf28ca6fc
5 changed files with 331 additions and 318 deletions

View File

@@ -88,12 +88,23 @@
$this->dialplan_uuid = uuid();
}
else {
//delete the previous details
$sql = "delete from v_dialplan_details ";
$sql .= "where dialplan_uuid = '".$this->dialplan_uuid."' ";
$sql .= "and domain_uuid = '".$this->domain_uuid."' ";
$this->db->exec($sql);
unset($sql);
//build previous details delete array
$array['dialplan_details'][0]['dialplan_uuid'] = $this->dialplan_uuid;
$array['dialplan_details'][0]['domain_uuid'] = $this->domain_uuid;
//grant temporary permissions
$p = new permissions;
$p->add('dialplan_detail_delete', 'temp');
//execute delete
$database = new database;
$database->app_name = 'fax';
$database->app_uuid = '24108154-4ac3-1db6-1551-4731703a4440';
$database->delete($array);
unset($array);
//revoke temporary permissions
$p->delete('dialplan_detail_delete', 'temp');
}
//set the fax name
@@ -195,4 +206,4 @@ $c->fax_description = $fax_description;
$c->dialplan();
*/
?>
?>