mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
When copying a dialplan use a unique uuid for app_uuid.
This commit is contained in:
@@ -1386,11 +1386,15 @@
|
||||
if (is_array($rows) && @sizeof($rows) != 0) {
|
||||
$y = 0;
|
||||
foreach ($rows as $x => $row) {
|
||||
$primary_uuid = uuid();
|
||||
//set a unique uuid
|
||||
$primary_uuid = uuid();
|
||||
|
||||
//copy data
|
||||
$array[$this->table][$x] = $row;
|
||||
|
||||
//dialplan copy should have a unique app_uuid
|
||||
$array[$this->table][$x]['app_uuid'] = uuid();
|
||||
|
||||
//overwrite
|
||||
$array[$this->table][$x][$this->uuid_prefix.'uuid'] = $primary_uuid;
|
||||
$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_uuid = $this->app_uuid;
|
||||
$database->save($array);
|
||||
//view_array($database->message);
|
||||
unset($array);
|
||||
|
||||
//revoke temporary permissions
|
||||
|
||||
Reference in New Issue
Block a user