mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 02:23:48 +00:00
Update domain_delete.php
This commit is contained in:
@@ -101,11 +101,18 @@ if (strlen($id) > 0) {
|
||||
$db->beginTransaction();
|
||||
if (isset($apps)) foreach ($apps as &$app) {
|
||||
if (isset($app['db'])) foreach ($app['db'] as $row) {
|
||||
$table_name = $row['table']['name'];
|
||||
if (isset($row['fields'])) foreach ($row['fields'] as $field) {
|
||||
if ($field['name'] == "domain_uuid") {
|
||||
$sql = "delete from $table_name where domain_uuid = '$id' ";
|
||||
$db->query($sql);
|
||||
if (is_array($row['table'])) {
|
||||
$table_name = $row['table']['name'];
|
||||
}
|
||||
else {
|
||||
$table_name = $row['table'];
|
||||
}
|
||||
if ($table_name !== "v" && isset($row['fields'])) {
|
||||
foreach ($row['fields'] as $field) {
|
||||
if ($field['name'] == "domain_uuid") {
|
||||
$sql = "delete from $table_name where domain_uuid = '$id' ";
|
||||
$db->query($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user