Update database.php

This commit is contained in:
FusionPBX 2020-02-08 15:53:32 -07:00 committed by GitHub
parent fb658a4e97
commit f41e989c7f
1 changed files with 63 additions and 60 deletions

View File

@ -711,6 +711,7 @@ include "root.php";
//exit;
//get the current data
if (is_array($delete_array)) {
foreach($delete_array as $table_name => $rows) {
foreach($rows as $row) {
$i = 0;
@ -730,6 +731,7 @@ include "root.php";
unset($parameters);
}
}
}
//save the array
$old_array = &$array;
@ -738,6 +740,7 @@ include "root.php";
$this->db->beginTransaction();
//delete the current data
if (is_array($delete_array)) {
foreach($delete_array as $table_name => $rows) {
//echo "table: ".$table_name."\n";
foreach($rows as $row) {
@ -777,7 +780,6 @@ include "root.php";
if ($this->debug["sql"]) {
$message["details"][$m]["sql"] = $sql;
}
$this->message = $message;
$m++;
}
@ -785,6 +787,7 @@ include "root.php";
} //if permission
} //foreach rows
} //foreach $array
}
//commit the atomic transaction
$this->db->commit();