When copying a dialplan use a unique uuid for app_uuid.
This commit is contained in:
parent
a83abc96d1
commit
0004a44d1c
|
|
@ -1386,11 +1386,15 @@
|
||||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||||
$y = 0;
|
$y = 0;
|
||||||
foreach ($rows as $x => $row) {
|
foreach ($rows as $x => $row) {
|
||||||
$primary_uuid = uuid();
|
//set a unique uuid
|
||||||
|
$primary_uuid = uuid();
|
||||||
|
|
||||||
//copy data
|
//copy data
|
||||||
$array[$this->table][$x] = $row;
|
$array[$this->table][$x] = $row;
|
||||||
|
|
||||||
|
//dialplan copy should have a unique app_uuid
|
||||||
|
$array[$this->table][$x]['app_uuid'] = uuid();
|
||||||
|
|
||||||
//overwrite
|
//overwrite
|
||||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid;
|
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid;
|
||||||
$array[$this->table][$x]['dialplan_description'] = trim($row['dialplan_description'].' ('.$text['label-copy'].')');
|
$array[$this->table][$x]['dialplan_description'] = trim($row['dialplan_description'].' ('.$text['label-copy'].')');
|
||||||
|
|
@ -1436,6 +1440,7 @@
|
||||||
$database->app_name = $this->app_name;
|
$database->app_name = $this->app_name;
|
||||||
$database->app_uuid = $this->app_uuid;
|
$database->app_uuid = $this->app_uuid;
|
||||||
$database->save($array);
|
$database->save($array);
|
||||||
|
//view_array($database->message);
|
||||||
unset($array);
|
unset($array);
|
||||||
|
|
||||||
//revoke temporary permissions
|
//revoke temporary permissions
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue