-
Notifications
You must be signed in to change notification settings - Fork 10
/
Restore.php
41 lines (40 loc) · 1.09 KB
/
Restore.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
namespace FreePBX\modules\Ringgroups;
use FreePBX\modules\Backup as Base;
class Restore Extends Base\RestoreBase{
public function runRestore(){
$configs = $this->getConfigs();
foreach($configs['groups'] as $rg) {
$this->FreePBX->Ringgroups->delete($rg['grpnum'])
->add(
$rg['grpnum'] ?? '',
$rg['strategy'] ?? '',
$rg['grptime'] ?? '',
$rg['grplist'] ?? '',
$rg['postdest'] ?? '',
$rg['description'] ?? '',
$rg['grppre'] ?? '',
$rg['annmsg_id'] ?? '',
$rg['alertinfo'] ?? '',
$rg['needsconf'] ?? '',
$rg['remotealert_id'] ?? '',
$rg['toolate_id'] ?? '',
$rg['ringing'] ?? '',
$rg['cwignore'] ?? '',
$rg['cfignore'] ?? '',
$rg['changecid'] ?? '',
$rg['fixedcid'] ?? '',
$rg['cpickup'] ?? '',
$rg['recording'] ?? '',
$rg['progress'] ?? '',
$rg['elsewhere'] ?? '',
($rg['rvolume'] ?? '')
);
}
$this->importAdvancedSettings($configs['settings']);
}
public function processLegacy($pdo, $data, $tables, $unknownTables){
$this->restoreLegacyDatabase($pdo);
$this->restoreLegacyAdvancedSettings($pdo);
}
}