If the frequency is not set then do not include it.

This commit is contained in:
Mark Crane 2014-08-08 06:49:18 +00:00
parent f25723a3e7
commit 1b63f7ba9f
1 changed files with 12 additions and 4 deletions

View File

@ -196,8 +196,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "queue_discard_abandoned_after, ";
$sql .= "queue_abandoned_resume_allowed, ";
$sql .= "queue_cid_prefix, ";
$sql .= "queue_announce_sound, ";
$sql .= "queue_announce_frequency, ";
if (strlen($queue_announce_sound) > 0) {
$sql .= "queue_announce_sound, ";
}
if (strlen($queue_announce_frequency) > 0) {
$sql .= "queue_announce_frequency, ";
}
$sql .= "queue_description ";
$sql .= ")";
$sql .= "values ";
@ -221,8 +225,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$sql .= "'$queue_discard_abandoned_after', ";
$sql .= "'$queue_abandoned_resume_allowed', ";
$sql .= "'$queue_cid_prefix', ";
$sql .= "'$queue_announce_sound', ";
$sql .= "'$queue_announce_frequency', ";
if (strlen($queue_announce_sound) > 0) {
$sql .= "'$queue_announce_sound', ";
}
if (strlen($queue_announce_frequency) > 0) {
$sql .= "'$queue_announce_frequency', ";
}
$sql .= "'$queue_description' ";
$sql .= ")";
$db->exec(check_sql($sql));