Skip to content

Commit

Permalink
This resolves an issue with the Snom phones
Browse files Browse the repository at this point in the history
  • Loading branch information
matmurdock authored Oct 4, 2018
1 parent 8a5573e commit 6e78dea
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Endpointman_Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1654,14 +1654,16 @@ function merge_data($path, $template_list, $maxlines = 12) {
$var_nam = "loop|" . str_replace("\$", "", $name[0]) . "_" . $i;
foreach ($item['data']['item'] as $item_loop) {
if ($item_loop['type'] != 'break') {
$z_tmp = explode("_", $item_loop['variable']);
$z = $z_tmp[1];
$items_loop[$var_nam][$z] = $item_loop;
$items_loop[$var_nam][$z]['description'] = str_replace('{$count}', $i, $items_loop[$var_nam][$z]['description']);
$items_loop[$var_nam][$z]['variable'] = str_replace('_', '_' . $i . '_', $items_loop[$var_nam][$z]['variable']);
$items_loop[$var_nam][$z]['default_value'] = isset($items_loop[$var_nam][$z]['default_value']) ? $items_loop[$var_nam][$z]['default_value'] : '';
$items_loop[$var_nam][$z]['loop'] = TRUE;
$items_loop[$var_nam][$z]['loop_count'] = $i;
if (!empty($item_loop['variable'])){
$z_tmp = explode("_", $item_loop['variable']);
$z = $z_tmp[1];
$items_loop[$var_nam][$z] = $item_loop;
$items_loop[$var_nam][$z]['description'] = str_replace('{$count}', $i, $items_loop[$var_nam][$z]['description']);
$items_loop[$var_nam][$z]['variable'] = str_replace('_', '_' . $i . '_', $items_loop[$var_nam][$z]['variable']);
$items_loop[$var_nam][$z]['default_value'] = isset($items_loop[$var_nam][$z]['default_value']) ? $items_loop[$var_nam][$z]['default_value'] : '';
$items_loop[$var_nam][$z]['loop'] = TRUE;
$items_loop[$var_nam][$z]['loop_count'] = $i;
}
} elseif ($item_loop['type'] == 'break') {
$items_loop[$var_nam]['break_' . $break_count]['type'] = 'break';
$break_count++;
Expand Down

0 comments on commit 6e78dea

Please sign in to comment.