diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php
index 343463b0b1..b559e1ebbd 100644
--- a/app/time_conditions/time_condition_edit.php
+++ b/app/time_conditions/time_condition_edit.php
@@ -332,7 +332,6 @@ require_once "resources/paging.php";
$sql .= "'".$dialplan_detail_group."', ";
$sql .= "'".$dialplan_detail_order."' ";
$sql .= ") ";
-
}
//execute query
@@ -340,7 +339,6 @@ require_once "resources/paging.php";
unset($sql);
}
-
//increment group number, reset order number
$dialplan_detail_group = 100;
$dialplan_detail_order = 0;
@@ -596,43 +594,43 @@ require_once "resources/paging.php";
}
}
-//create a is_preset function to determine if the time settings are a preset
- function is_preset($presets, $times) {
- if ($_GET['debug'] == 'true') {
- echo "
\n";
- echo "
\n";
- echo "
\n";
- }
- $preset_keys = array();
- foreach ($presets as $row) {
- if ($_GET['debug'] == 'true') {
- echo "
\n";
- }
- $match = true;
- foreach ($row as $k => $v) {
- if ($_GET['debug'] == 'true') {
- echo "\n";
- echo "| ".$k." | ".$row[$k]." | ".$k." | ".$times[$k]." | ";
- }
- if ($row[$k] == $times[$k]) {
- if ($_GET['debug'] == 'true') { echo "match | "; }
- }
- else {
- if ($_GET['debug'] == 'true') { echo "no match | "; }
- $match = false;
- }
- if ($_GET['debug'] == 'true') {
- echo "
\n";
- }
- }
- if ($_GET['debug'] == 'true') {
- echo "
\n";
- echo "
\n";
- }
- if ($match) { return true; }
- }
- return false;
+
+function is_preset($presets, $times) {
+ if ($_GET['debug'] == 'true') {
+ echo "\n";
+ echo "
\n";
+ echo "
\n";
}
+ $preset_keys = array();
+ foreach ($presets as $row) {
+ if ($_GET['debug'] == 'true') {
+ echo "
\n";
+ }
+ $match = true;
+ foreach ($row as $k => $v) {
+ if ($_GET['debug'] == 'true') {
+ echo "\n";
+ echo "| ".$k." | ".$row[$k]." | ".$k." | ".$times[$k]." | ";
+ }
+ if ($row[$k] == $times[$k]) {
+ if ($_GET['debug'] == 'true') { echo "match | "; }
+ }
+ else {
+ if ($_GET['debug'] == 'true') { echo "no match | "; }
+ $match = false;
+ }
+ if ($_GET['debug'] == 'true') {
+ echo "
\n";
+ }
+ }
+ if ($_GET['debug'] == 'true') {
+ echo "
\n";
+ echo "
\n";
+ }
+ if ($match) { return true; }
+ }
+ return false;
+}
//set preset to true or false on dialplan_times array
$x = 0;
@@ -776,7 +774,7 @@ require_once "resources/paging.php";
echo " | \n";
echo " \n";
- $c = 0;
+ $x = 0;
foreach($details as $detail_group) {
foreach ($detail_group as $row) {
if ($row['dialplan_detail_tag'] == 'condition') {
@@ -796,12 +794,17 @@ require_once "resources/paging.php";
$dialplan_detail_group = $row['dialplan_detail_group'];
$dialplan_detail_order = $row['dialplan_detail_order'];
- //for ($c = 1; $c <= 3; $c++) {
+ //add the primary key uuid
+ if (strlen($dialplan_detail_uuid) > 0) {
+ echo " \n";
+ }
+
+ //start a new row
echo " \n";
//time condition
echo " | \n";
- echo " |