Enhance Add Tones (#1857)

Add tone support
This commit is contained in:
Mafoo
2016-09-03 20:32:19 -06:00
committed by FusionPBX
parent 8ea17bdaf3
commit 097a09536e
6 changed files with 162 additions and 0 deletions
+15
View File
@@ -238,6 +238,21 @@ EOD;
}
$result[] = $row;
}
elseif(preg_match("/-tone/", $value[0])){
$row = Array();
$row['var_cat'] = 'Tones';
$row['var_name'] = $value[0];
$row['var_value'] = $value[1];
$row['var_enabled'] = $item->attributes()->enabled;
if(!isset($row['var_enabled'])){
$row['var_enabled'] = 'true';
}
$row['var_description'] = $item->attributes()->description;
if(!isset($row['var_description'])){
$row['var_description'] = base64_encode('Imported from vars.xml');
}
$result[] = $row;
}
}
}