mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Frytimo pr patches for php8.1 (#6630)
* Passing null to parameter #2 ($string) of type string is deprecated * Passing null to parameter #1 ($string) of type string is deprecated * php 8.1 fixes * php 8.1 fixes - replace strlen($var) > 0 with !empty($var) * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - replace ${var} with {$var} * php 8.1 fixes - strlower with null * php 8.1 fixes - strreplace with null * php 8.1 fixes - passing null to base64_decode * php 8.1 fixes - check for false and check for null on $this->dir * php 8.1 fixes - remove assignment of $db variable to modules object * php 8.1 fixes - avoid sending null to substr * php 8.1 fixes - change ${var} to {$var} * php 8.1 fixes - check for null before preg_replace * php 8.1 fixes - remove setting db variable on domains object * php 8.1 fixes - set empty string if $row['domain_setting_subcategory'] is null * php 8.1 fixes - set empty string if $_REQUEST['show'] is not available * php 8.1 fixes * php 8.1 fixes - correct $_POST checking syntax * php 8.1 fixes - correct $_POST variables * php 8.1 fixes * Use brackets consistently * Update user_setting_edit.php * Change to not empty * Update device.php * Update text.php --------- Co-authored-by: Tim Fry <tim@voipstratus.com> Co-authored-by: FusionPBX <markjcrane@gmail.com>
This commit is contained in:
@@ -122,10 +122,10 @@ if ($domains_processed == 1) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen($row['queue_cid_prefix']) > 0) {
|
||||
if (!empty($row['queue_cid_prefix'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".xml::sanitize($row['queue_cid_prefix'])."#\${caller_id_name}\"/>\n";
|
||||
}
|
||||
if (strlen($row['queue_cc_exit_keys']) > 0) {
|
||||
if (!empty($row['queue_cc_exit_keys'])) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($row['queue_cc_exit_keys'])."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($row['queue_extension'])."@".xml::sanitize($row['domain_name'])."\"/>\n";
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
@@ -113,23 +113,23 @@
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (strlen($call_center_agent_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (strlen($user_uuid) == 0) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
|
||||
if (strlen($agent_name) == 0) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
|
||||
if (strlen($agent_type) == 0) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
|
||||
if (strlen($agent_call_timeout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
|
||||
//if (strlen($agent_id) == 0) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
|
||||
//if (strlen($agent_password) == 0) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
|
||||
//if (strlen($agent_status) == 0) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
|
||||
if (strlen($agent_contact) == 0) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
|
||||
if (strlen($agent_no_answer_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_no_answer_delay_time']."<br>\n"; }
|
||||
if (strlen($agent_max_no_answer) == 0) { $msg .= $text['message-required']." ".$text['label-agent_max_no_answer']."<br>\n"; }
|
||||
if (strlen($agent_wrap_up_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_wrap_up_time']."<br>\n"; }
|
||||
if (strlen($agent_reject_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_reject_delay_time']."<br>\n"; }
|
||||
if (strlen($agent_busy_delay_time) == 0) { $msg .= $text['message-required']." ".$text['label-agent_busy_delay_time']."<br>\n"; }
|
||||
//if (strlen($agent_logout) == 0) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//if (empty($call_center_agent_uuid)) { $msg .= $text['message-required']." ".$text['label-call_center_agent_uuid']."<br>\n"; }
|
||||
//if (empty($domain_uuid)) { $msg .= $text['message-required']." ".$text['label-domain_uuid']."<br>\n"; }
|
||||
//if (empty($user_uuid)) { $msg .= $text['message-required']." ".$text['label-user_uuid']."<br>\n"; }
|
||||
if (empty($agent_name)) { $msg .= $text['message-required']." ".$text['label-agent_name']."<br>\n"; }
|
||||
if (empty($agent_type)) { $msg .= $text['message-required']." ".$text['label-agent_type']."<br>\n"; }
|
||||
if (empty($agent_call_timeout)) { $msg .= $text['message-required']." ".$text['label-agent_call_timeout']."<br>\n"; }
|
||||
//if (empty($agent_id)) { $msg .= $text['message-required']." ".$text['label-agent_id']."<br>\n"; }
|
||||
//if (empty($agent_password)) { $msg .= $text['message-required']." ".$text['label-agent_password']."<br>\n"; }
|
||||
//if (empty($agent_status)) { $msg .= $text['message-required']." ".$text['label-agent_status']."<br>\n"; }
|
||||
if (empty($agent_contact)) { $msg .= $text['message-required']." ".$text['label-agent_contact']."<br>\n"; }
|
||||
if (empty($agent_no_answer_delay_time)) { $msg .= $text['message-required']." ".$text['label-agent_no_answer_delay_time']."<br>\n"; }
|
||||
if (empty($agent_max_no_answer)) { $msg .= $text['message-required']." ".$text['label-agent_max_no_answer']."<br>\n"; }
|
||||
if (empty($agent_wrap_up_time)) { $msg .= $text['message-required']." ".$text['label-agent_wrap_up_time']."<br>\n"; }
|
||||
if (empty($agent_reject_delay_time)) { $msg .= $text['message-required']." ".$text['label-agent_reject_delay_time']."<br>\n"; }
|
||||
if (empty($agent_busy_delay_time)) { $msg .= $text['message-required']." ".$text['label-agent_busy_delay_time']."<br>\n"; }
|
||||
//if (empty($agent_logout)) { $msg .= $text['message-required']." ".$text['label-agent_logout']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
@@ -143,7 +143,7 @@
|
||||
}
|
||||
|
||||
//add the call_center_agent_uuid
|
||||
if (strlen($call_center_agent_uuid) == 0) {
|
||||
if (empty($call_center_agent_uuid)) {
|
||||
$call_center_agent_uuid = uuid();
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@
|
||||
header("Location: call_center_agents.php");
|
||||
return;
|
||||
}
|
||||
} //(is_array($_POST) && strlen($_POST["persistformvar"]) == 0)
|
||||
} //(is_array($_POST) && empty($_POST["persistformvar"]))
|
||||
|
||||
//initialize the destinations object
|
||||
$destination = new destinations;
|
||||
@@ -315,13 +315,13 @@
|
||||
}
|
||||
|
||||
//set default values
|
||||
if (strlen($agent_type) == 0) { $agent_type = "callback"; }
|
||||
if (strlen($agent_call_timeout) == 0) { $agent_call_timeout = "20"; }
|
||||
if (strlen($agent_max_no_answer) == 0) { $agent_max_no_answer = "0"; }
|
||||
if (strlen($agent_wrap_up_time) == 0) { $agent_wrap_up_time = "10"; }
|
||||
if (strlen($agent_no_answer_delay_time) == 0) { $agent_no_answer_delay_time = "30"; }
|
||||
if (strlen($agent_reject_delay_time) == 0) { $agent_reject_delay_time = "90"; }
|
||||
if (strlen($agent_busy_delay_time) == 0) { $agent_busy_delay_time = "90"; }
|
||||
if (empty($agent_type)) { $agent_type = "callback"; }
|
||||
if (empty($agent_call_timeout)) { $agent_call_timeout = "20"; }
|
||||
if (empty($agent_max_no_answer)) { $agent_max_no_answer = "0"; }
|
||||
if (empty($agent_wrap_up_time)) { $agent_wrap_up_time = "10"; }
|
||||
if (empty($agent_no_answer_delay_time)) { $agent_no_answer_delay_time = "30"; }
|
||||
if (empty($agent_reject_delay_time)) { $agent_reject_delay_time = "90"; }
|
||||
if (empty($agent_busy_delay_time)) { $agent_busy_delay_time = "90"; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
if (!empty($search)) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(agent_name) like :search ";
|
||||
$sql_search .= "or lower(agent_id) like :search ";
|
||||
@@ -102,13 +102,13 @@
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql = str_replace('count(*)', '*', $sql ?? '');
|
||||
$sql .= order_by($order_by, $order, 'agent_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
@@ -211,7 +211,7 @@
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
}
|
||||
|
||||
//delete the tier from the database
|
||||
if (strlen($call_center_tier_uuid) > 0) {
|
||||
if (!empty($call_center_tier_uuid)) {
|
||||
$array['call_center_tiers'][0]['call_center_tier_uuid'] = $call_center_tier_uuid;
|
||||
$array['call_center_tiers'][0]['domain_uuid'] = $_SESSION['domain_uuid'];
|
||||
|
||||
@@ -175,7 +175,7 @@
|
||||
}
|
||||
|
||||
//process the user data and save it to the database
|
||||
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
if (count($_POST) > 0 && empty($_POST["persistformvar"])) {
|
||||
|
||||
//get the uuid from the POST
|
||||
if ($action == "update") {
|
||||
@@ -192,27 +192,27 @@
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
//if (strlen($domain_uuid) == 0) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (strlen($queue_name) == 0) { $msg .= $text['message-required'].$text['label-queue_name']."<br>\n"; }
|
||||
if (strlen($queue_extension) == 0) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
if (strlen($queue_strategy) == 0) { $msg .= $text['message-required'].$text['label-strategy']."<br>\n"; }
|
||||
//if (strlen($queue_moh_sound) == 0) { $msg .= $text['message-required'].$text['label-music_on_hold']."<br>\n"; }
|
||||
//if (strlen($queue_record_template) == 0) { $msg .= $text['message-required'].$text['label-record_template']."<br>\n"; }
|
||||
//if (strlen($queue_time_base_score) == 0) { $msg .= $text['message-required'].$text['label-time_base_score']."<br>\n"; }
|
||||
//if (strlen($queue_time_base_score_sec) == 0) { $msg .= $text['message-required'].$text['label-time_base_score_sec']."<br>\n"; }
|
||||
//if (strlen($queue_max_wait_time) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time']."<br>\n"; }
|
||||
//if (strlen($queue_max_wait_time_with_no_agent) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent']."<br>\n"; }
|
||||
//if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent_time_reached']."<br>\n"; }
|
||||
//if (strlen($queue_tier_rules_apply) == 0) { $msg .= $text['message-required'].$text['label-tier_rules_apply']."<br>\n"; }
|
||||
//if (strlen($queue_tier_rule_wait_second) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_wait_second']."<br>\n"; }
|
||||
//if (strlen($queue_tier_rule_wait_multiply_level) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_wait_multiply_level']."<br>\n"; }
|
||||
//if (strlen($queue_tier_rule_no_agent_no_wait) == 0) { $msg .= $text['message-required'].$text['label-tier_rule_no_agent_no_wait']."<br>\n"; }
|
||||
//if (strlen($queue_timeout_action) == 0) { $msg .= $text['message-required'].$text['label-timeout_action']."<br>\n"; }
|
||||
//if (strlen($queue_discard_abandoned_after) == 0) { $msg .= $text['message-required'].$text['label-discard_abandoned_after']."<br>\n"; }
|
||||
//if (strlen($queue_abandoned_resume_allowed) == 0) { $msg .= $text['message-required'].$text['label-abandoned_resume_allowed']."<br>\n"; }
|
||||
//if (strlen($queue_cid_prefix) == 0) { $msg .= $text['message-required'].$text['label-caller_id_name_prefix']."<br>\n"; }
|
||||
//if (strlen($queue_description) == 0) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
//if (empty($domain_uuid)) { $msg .= $text['message-required']."domain_uuid<br>\n"; }
|
||||
if (empty($queue_name)) { $msg .= $text['message-required'].$text['label-queue_name']."<br>\n"; }
|
||||
if (empty($queue_extension)) { $msg .= $text['message-required'].$text['label-extension']."<br>\n"; }
|
||||
if (empty($queue_strategy)) { $msg .= $text['message-required'].$text['label-strategy']."<br>\n"; }
|
||||
//if (empty($queue_moh_sound)) { $msg .= $text['message-required'].$text['label-music_on_hold']."<br>\n"; }
|
||||
//if (empty($queue_record_template)) { $msg .= $text['message-required'].$text['label-record_template']."<br>\n"; }
|
||||
//if (empty($queue_time_base_score)) { $msg .= $text['message-required'].$text['label-time_base_score']."<br>\n"; }
|
||||
//if (empty($queue_time_base_score_sec)) { $msg .= $text['message-required'].$text['label-time_base_score_sec']."<br>\n"; }
|
||||
//if (empty($queue_max_wait_time)) { $msg .= $text['message-required'].$text['label-max_wait_time']."<br>\n"; }
|
||||
//if (empty($queue_max_wait_time_with_no_agent)) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent']."<br>\n"; }
|
||||
//if (empty($queue_max_wait_time_with_no_agent_time_reached)) { $msg .= $text['message-required'].$text['label-max_wait_time_with_no_agent_time_reached']."<br>\n"; }
|
||||
//if (empty($queue_tier_rules_apply)) { $msg .= $text['message-required'].$text['label-tier_rules_apply']."<br>\n"; }
|
||||
//if (empty($queue_tier_rule_wait_second)) { $msg .= $text['message-required'].$text['label-tier_rule_wait_second']."<br>\n"; }
|
||||
//if (empty($queue_tier_rule_wait_multiply_level)) { $msg .= $text['message-required'].$text['label-tier_rule_wait_multiply_level']."<br>\n"; }
|
||||
//if (empty($queue_tier_rule_no_agent_no_wait)) { $msg .= $text['message-required'].$text['label-tier_rule_no_agent_no_wait']."<br>\n"; }
|
||||
//if (empty($queue_timeout_action)) { $msg .= $text['message-required'].$text['label-timeout_action']."<br>\n"; }
|
||||
//if (empty($queue_discard_abandoned_after)) { $msg .= $text['message-required'].$text['label-discard_abandoned_after']."<br>\n"; }
|
||||
//if (empty($queue_abandoned_resume_allowed)) { $msg .= $text['message-required'].$text['label-abandoned_resume_allowed']."<br>\n"; }
|
||||
//if (empty($queue_cid_prefix)) { $msg .= $text['message-required'].$text['label-caller_id_name_prefix']."<br>\n"; }
|
||||
//if (empty($queue_description)) { $msg .= $text['message-required'].$text['label-description']."<br>\n"; }
|
||||
if (!empty($msg) && empty($_POST["persistformvar"])) {
|
||||
require_once "resources/header.php";
|
||||
require_once "resources/persist_form_var.php";
|
||||
echo "<div align='center'>\n";
|
||||
@@ -229,13 +229,13 @@
|
||||
$_POST["domain_uuid"] = $_SESSION["domain_uuid"];
|
||||
|
||||
//add the call_center_queue_uuid
|
||||
if (strlen($_POST["call_center_queue_uuid"]) == 0) {
|
||||
if (empty($_POST["call_center_queue_uuid"])) {
|
||||
$call_center_queue_uuid = uuid();
|
||||
$_POST["call_center_queue_uuid"] = $call_center_queue_uuid;
|
||||
}
|
||||
|
||||
//add the dialplan_uuid
|
||||
if (strlen($_POST["dialplan_uuid"]) == 0) {
|
||||
if (empty($_POST["dialplan_uuid"])) {
|
||||
$dialplan_uuid = uuid();
|
||||
$_POST["dialplan_uuid"] = $dialplan_uuid;
|
||||
}
|
||||
@@ -245,11 +245,11 @@
|
||||
if (is_array($_POST["call_center_tiers"]) && @sizeof($_POST["call_center_tiers"]) != 0) {
|
||||
foreach ($_POST["call_center_tiers"] as $row) {
|
||||
//add the domain_uuid
|
||||
if (strlen($row["domain_uuid"]) == 0) {
|
||||
if (empty($row["domain_uuid"])) {
|
||||
$_POST["call_center_tiers"][$x]["domain_uuid"] = $_SESSION['domain_uuid'];
|
||||
}
|
||||
//unset ring_group_destination_uuid if the field has no value
|
||||
if (strlen($row["call_center_agent_uuid"]) == 0) {
|
||||
if (empty($row["call_center_agent_uuid"])) {
|
||||
unset($_POST["call_center_tiers"][$x]);
|
||||
}
|
||||
//increment the row
|
||||
@@ -324,7 +324,7 @@
|
||||
else {
|
||||
$call_center_tier_uuid = uuid();
|
||||
}
|
||||
if (strlen($row['call_center_agent_uuid']) > 0) {
|
||||
if (!empty($row['call_center_agent_uuid'])) {
|
||||
$array["call_center_queues"][0]["call_center_tiers"][$y]["call_center_tier_uuid"] = $call_center_tier_uuid;
|
||||
$array['call_center_queues'][0]["call_center_tiers"][$y]["call_center_agent_uuid"] = $row['call_center_agent_uuid'];
|
||||
$array['call_center_queues'][0]["call_center_tiers"][$y]["tier_level"] = $row['tier_level'];
|
||||
@@ -365,10 +365,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (strlen($queue_cid_prefix) > 0) {
|
||||
if (!empty($queue_cid_prefix)) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"effective_caller_id_name=".xml::sanitize($queue_cid_prefix)."#\${caller_id_name}\"/>\n";
|
||||
}
|
||||
if (strlen($queue_cc_exit_keys) > 0) {
|
||||
if (!empty($queue_cc_exit_keys)) {
|
||||
$dialplan_xml .= " <action application=\"set\" data=\"cc_exit_keys=".xml::sanitize($queue_cc_exit_keys)."\"/>\n";
|
||||
}
|
||||
$dialplan_xml .= " <action application=\"callcenter\" data=\"".xml::sanitize($queue_extension)."@".$_SESSION["domain_name"]."\"/>\n";
|
||||
@@ -486,7 +486,7 @@
|
||||
}
|
||||
return;
|
||||
|
||||
} //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0)
|
||||
} //(count($_POST)>0 && empty($_POST["persistformvar"]))
|
||||
|
||||
//pre-populate the form
|
||||
if (is_array($_GET) && is_uuid($_GET["id"]) && $_POST["persistformvar"] != "true") {
|
||||
@@ -581,19 +581,19 @@
|
||||
$sounds = $sounds->get();
|
||||
|
||||
//set default values
|
||||
if (strlen($queue_strategy) == 0) { $queue_strategy = "longest-idle-agent"; }
|
||||
if (strlen($queue_moh_sound) == 0) { $queue_moh_sound = "\$\${hold_music}"; }
|
||||
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = "system"; }
|
||||
if (strlen($queue_time_base_score) == 0) { $queue_time_base_score = ""; }
|
||||
if (strlen($queue_max_wait_time) == 0) { $queue_max_wait_time = "0"; }
|
||||
if (strlen($queue_max_wait_time_with_no_agent) == 0) { $queue_max_wait_time_with_no_agent = "90"; }
|
||||
if (strlen($queue_max_wait_time_with_no_agent_time_reached) == 0) { $queue_max_wait_time_with_no_agent_time_reached = "30"; }
|
||||
if (strlen($queue_tier_rules_apply) == 0) { $queue_tier_rules_apply = "false"; }
|
||||
if (strlen($queue_tier_rule_wait_second) == 0) { $queue_tier_rule_wait_second = "30"; }
|
||||
if (strlen($queue_tier_rule_wait_multiply_level) == 0) { $queue_tier_rule_wait_multiply_level = "true"; }
|
||||
if (strlen($queue_tier_rule_no_agent_no_wait) == 0) { $queue_tier_rule_no_agent_no_wait = "true"; }
|
||||
if (strlen($queue_discard_abandoned_after) == 0) { $queue_discard_abandoned_after = "900"; }
|
||||
if (strlen($queue_abandoned_resume_allowed) == 0) { $queue_abandoned_resume_allowed = "false"; }
|
||||
if (empty($queue_strategy)) { $queue_strategy = "longest-idle-agent"; }
|
||||
if (empty($queue_moh_sound)) { $queue_moh_sound = "\$\${hold_music}"; }
|
||||
if (empty($queue_time_base_score)) { $queue_time_base_score = "system"; }
|
||||
if (empty($queue_time_base_score)) { $queue_time_base_score = ""; }
|
||||
if (empty($queue_max_wait_time)) { $queue_max_wait_time = "0"; }
|
||||
if (empty($queue_max_wait_time_with_no_agent)) { $queue_max_wait_time_with_no_agent = "90"; }
|
||||
if (empty($queue_max_wait_time_with_no_agent_time_reached)) { $queue_max_wait_time_with_no_agent_time_reached = "30"; }
|
||||
if (empty($queue_tier_rules_apply)) { $queue_tier_rules_apply = "false"; }
|
||||
if (empty($queue_tier_rule_wait_second)) { $queue_tier_rule_wait_second = "30"; }
|
||||
if (empty($queue_tier_rule_wait_multiply_level)) { $queue_tier_rule_wait_multiply_level = "true"; }
|
||||
if (empty($queue_tier_rule_no_agent_no_wait)) { $queue_tier_rule_no_agent_no_wait = "true"; }
|
||||
if (empty($queue_discard_abandoned_after)) { $queue_discard_abandoned_after = "900"; }
|
||||
if (empty($queue_abandoned_resume_allowed)) { $queue_abandoned_resume_allowed = "false"; }
|
||||
|
||||
//create token
|
||||
$object = new token;
|
||||
@@ -825,7 +825,7 @@
|
||||
foreach($tiers as $field) {
|
||||
echo " <tr>\n";
|
||||
echo " <td class=''>";
|
||||
if (strlen($field['call_center_tier_uuid']) > 0) {
|
||||
if (!empty($field['call_center_tier_uuid'])) {
|
||||
echo " <input name='call_center_tiers[".$x."][call_center_tier_uuid]' type='hidden' value=\"".escape($field['call_center_tier_uuid'])."\">\n";
|
||||
}
|
||||
echo " <select name=\"call_center_tiers[$x][call_center_agent_uuid]\" class=\"formfld\" style=\"width: 200px\">\n";
|
||||
@@ -901,13 +901,13 @@
|
||||
echo "<td class='vtable' align='left'>\n";
|
||||
$record_template = $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/archive/\${strftime(%Y)}/\${strftime(%b)}/\${strftime(%d)}/\${uuid}.\${record_ext}";
|
||||
echo " <select class='formfld' name='queue_record_template'>\n";
|
||||
if (strlen($queue_record_template) > 0) {
|
||||
if (!empty($queue_record_template)) {
|
||||
echo " <option value='".escape($queue_record_template)."' selected='selected' >".$text['option-true']."</option>\n";
|
||||
}
|
||||
else {
|
||||
echo " <option value='".escape($record_template)."'>".$text['option-true']."</option>\n";
|
||||
}
|
||||
if (strlen($queue_record_template) == 0) {
|
||||
if (empty($queue_record_template)) {
|
||||
echo " <option value='' selected='selected' >".$text['option-false']."</option>\n";
|
||||
}
|
||||
else {
|
||||
@@ -1239,11 +1239,11 @@
|
||||
foreach ($recordings as &$row) {
|
||||
$recording_name = $row["recording_name"];
|
||||
$recording_filename = $row["recording_filename"];
|
||||
if ($queue_announce_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && strlen($queue_announce_sound) > 0) {
|
||||
if ($queue_announce_sound == $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$recording_filename && !empty($queue_announce_sound)) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
|
||||
}
|
||||
else if ($queue_announce_sound == $recording_filename && strlen($queue_announce_sound) > 0) {
|
||||
else if ($queue_announce_sound == $recording_filename && !empty($queue_announce_sound)) {
|
||||
$tmp_selected = true;
|
||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($recording_filename)."' selected='selected'>".escape($recording_name)."</option>\n";
|
||||
}
|
||||
@@ -1254,7 +1254,7 @@
|
||||
echo "</optgroup>\n";
|
||||
}
|
||||
|
||||
if (!$tmp_selected && strlen($queue_announce_sound) > 0) {
|
||||
if (!$tmp_selected && !empty($queue_announce_sound)) {
|
||||
echo "<optgroup label='Selected'>\n";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']."/".$queue_announce_sound)) {
|
||||
echo " <option value='".escape($_SESSION['switch']['recordings']['dir'])."/".escape($_SESSION['domain_name'])."/".escape($queue_announce_sound)."' selected='selected'>".escape($queue_announce_sound)."</option>\n";
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
//add the search term
|
||||
$search = strtolower($_GET["search"]);
|
||||
if (strlen($search) > 0) {
|
||||
if (!empty($search)) {
|
||||
$sql_search = " (";
|
||||
$sql_search .= "lower(queue_name) like :search ";
|
||||
$sql_search .= "or lower(queue_description) like :search ";
|
||||
@@ -108,13 +108,13 @@
|
||||
$param .= "&show=all";
|
||||
}
|
||||
$page = $_GET['page'];
|
||||
if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; }
|
||||
if (empty($page)) { $page = 0; $_GET['page'] = 0; }
|
||||
list($paging_controls, $rows_per_page) = paging($num_rows, $param, $rows_per_page);
|
||||
list($paging_controls_mini, $rows_per_page) = paging($num_rows, $param, $rows_per_page, true);
|
||||
$offset = $rows_per_page * $page;
|
||||
|
||||
//get the list
|
||||
$sql = str_replace('count(*)', '*', $sql);
|
||||
$sql = str_replace('count(*)', '*', $sql ?? '');
|
||||
$sql .= order_by($order_by, $order, 'queue_name', 'asc');
|
||||
$sql .= limit_offset($rows_per_page, $offset);
|
||||
$database = new database;
|
||||
@@ -234,7 +234,7 @@
|
||||
echo " </td>\n";
|
||||
}
|
||||
if ($_GET['show'] == "all" && permission_exists('call_center_all')) {
|
||||
if (strlen($_SESSION['domains'][$row['domain_uuid']]['domain_name']) > 0) {
|
||||
if (!empty($_SESSION['domains'][$row['domain_uuid']]['domain_name'])) {
|
||||
$domain = $_SESSION['domains'][$row['domain_uuid']]['domain_name'];
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||
$y++;
|
||||
|
||||
if (strlen($this->queue_cid_prefix) > 0) {
|
||||
if (!empty($this->queue_cid_prefix)) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
@@ -156,7 +156,7 @@
|
||||
$y++;
|
||||
}
|
||||
|
||||
if (strlen($this->queue_greeting) > 0) {
|
||||
if (!empty($this->queue_greeting)) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "sleep";
|
||||
@@ -166,7 +166,7 @@
|
||||
$y++;
|
||||
}
|
||||
|
||||
if (strlen($this->queue_greeting) > 0) {
|
||||
if (!empty($this->queue_greeting)) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "playback";
|
||||
@@ -176,7 +176,7 @@
|
||||
$y++;
|
||||
}
|
||||
|
||||
if (strlen($this->queue_cc_exit_keys) > 0) {
|
||||
if (!empty($this->queue_cc_exit_keys)) {
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_type"] = "set";
|
||||
@@ -194,7 +194,7 @@
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_order"] = $y * 10;
|
||||
$y++;
|
||||
|
||||
if (strlen($this->queue_timeout_action) > 0) {
|
||||
if (!empty($this->queue_timeout_action)) {
|
||||
$action_array = explode(":",$this->queue_timeout_action);
|
||||
$dialplan["dialplan_details"][$y]["domain_uuid"] = $this->domain_uuid;
|
||||
$dialplan["dialplan_details"][$y]["dialplan_detail_tag"] = "action";
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
//get the http post values and set them as php variables
|
||||
if (count($_POST) > 0) {
|
||||
foreach ($_POST['agents'] as $row) {
|
||||
if (strlen($row['agent_status']) > 0) {
|
||||
if (!empty($row['agent_status'])) {
|
||||
//agent set status
|
||||
if ($fp) {
|
||||
// update the database
|
||||
|
||||
Reference in New Issue
Block a user