mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update domain_delete.php
This commit is contained in:
@@ -101,11 +101,18 @@ if (strlen($id) > 0) {
|
|||||||
$db->beginTransaction();
|
$db->beginTransaction();
|
||||||
if (isset($apps)) foreach ($apps as &$app) {
|
if (isset($apps)) foreach ($apps as &$app) {
|
||||||
if (isset($app['db'])) foreach ($app['db'] as $row) {
|
if (isset($app['db'])) foreach ($app['db'] as $row) {
|
||||||
$table_name = $row['table']['name'];
|
if (is_array($row['table'])) {
|
||||||
if (isset($row['fields'])) foreach ($row['fields'] as $field) {
|
$table_name = $row['table']['name'];
|
||||||
if ($field['name'] == "domain_uuid") {
|
}
|
||||||
$sql = "delete from $table_name where domain_uuid = '$id' ";
|
else {
|
||||||
$db->query($sql);
|
$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