Added default_phone_code to system_settings, removed hard-coded default phone_code of '1' in several places. Issue #942
git-svn-id: svn://192.168.202.10@2514 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -62,6 +62,7 @@ use MIME::QuotedPrint;
|
||||
# 150513-2310 - Added pop3_auth_mode
|
||||
# 151030-0557 - Small change to catch more attachments properly
|
||||
# 160120-2149 - Added missing entry_date field on vicidial_list insert
|
||||
# 160414-0930 - Added missing phone_code field on vicidial_list insert
|
||||
#
|
||||
|
||||
# default path to astguiclient configuration file:
|
||||
@@ -213,6 +214,28 @@ if($min==0) {$min=60;}
|
||||
$minutes=($hour*60)+$min;
|
||||
# $minutes=0; # Uncomment if you want to TEST ONLY, so you can test this at any time.
|
||||
|
||||
##### Get the settings from system_settings #####
|
||||
$stmtA = "SELECT allow_emails,default_phone_code FROM system_settings;";
|
||||
# print "$stmtA\n";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$SSallow_emails = $aryA[0];
|
||||
$SSdefault_phone_code = $aryA[1];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
##### exit program if system setting for allow email is not enabled
|
||||
if ( ($SSallow_emails < 1) && ($force_check < 1) )
|
||||
{
|
||||
if ($DB) {print "SYSTEM SETTING for allow_email is disabled, exiting... |$SSallow_emails|$force_check|\n";}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
$stmt="SELECT email_account_id,email_account_name,email_account_description,user_group,protocol,email_replyto_address,email_account_server,email_account_user,email_account_pass,pop3_auth_mode,active,email_frequency_check_mins,group_id,default_list_id,call_handle_method,agent_search_method,campaign_id,list_id,email_account_type from vicidial_email_accounts where active='Y'";
|
||||
$rslt=$dbhA->prepare($stmt);
|
||||
$rslt->execute();
|
||||
@@ -562,7 +585,7 @@ while (@row=$rslt->fetchrow_array) {
|
||||
my @lead_id_row=$vicidial_lead_check_rslt->fetchrow_array;
|
||||
$lead_id=$lead_id_row[0];
|
||||
} else {
|
||||
my $vicidial_list_stmt="insert into vicidial_list(list_id, email, comments, status, entry_date) values('$default_list_id', '$email_from', '".substr($message,0,255)."', '$status', NOW())";
|
||||
my $vicidial_list_stmt="insert into vicidial_list(list_id, email, comments, status, entry_date, phone_code) values('$default_list_id', '$email_from', '".substr($message,0,255)."', '$status', NOW(), '$SSdefault_phone_code')";
|
||||
if ($DBX) {print $vicidial_list_stmt;}
|
||||
my $vicidial_list_rslt=$dbhA->prepare($vicidial_list_stmt);
|
||||
if ($vicidial_list_rslt->execute()) {
|
||||
@@ -900,7 +923,7 @@ while (@row=$rslt->fetchrow_array) {
|
||||
my @lead_id_row=$vicidial_lead_check_rslt->fetchrow_array;
|
||||
$lead_id=$lead_id_row[0];
|
||||
} else {
|
||||
my $vicidial_list_stmt="insert into vicidial_list(list_id, email, comments, status, entry_date) values('$default_list_id', '$email_from', '".substr($message,0,255)."', '$status', NOW())";
|
||||
my $vicidial_list_stmt="insert into vicidial_list(list_id, email, comments, status, entry_date, phone_code) values('$default_list_id', '$email_from', '".substr($message,0,255)."', '$status', NOW(), '$SSdefault_phone_code')";
|
||||
if ($DBX) {print $vicidial_list_stmt."\n";}
|
||||
my $vicidial_list_rslt=$dbhA->prepare($vicidial_list_stmt);
|
||||
if ($vicidial_list_rslt->execute()) {
|
||||
|
||||
@@ -404,10 +404,11 @@
|
||||
# 160326-0940 - Fixed issue #933, variables
|
||||
# 160326-1002 - Fixed issue #934, phone_login
|
||||
# 160331-2130 - Fixed missing start and dispo call url variables, issue #938
|
||||
# 160414-0944 - Added default_phone_code value instead of hard-coded '1'
|
||||
#
|
||||
|
||||
$version = '2.12-298';
|
||||
$build = '160331-2130';
|
||||
$version = '2.12-299';
|
||||
$build = '160414-0944';
|
||||
$php_script = 'vdc_db_query.php';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=654;
|
||||
@@ -855,7 +856,7 @@ $sip_hangup_cause_dictionary = array(
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,timeclock_end_of_day,agentonly_callback_campaign_lock,alt_log_server_ip,alt_log_dbname,alt_log_login,alt_log_pass,tables_use_alt_log_db,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,agent_debug_logging,default_language,active_modules,allow_chats,default_phone_code FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'00001',$user,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -880,6 +881,7 @@ if ($qm_conf_ct > 0)
|
||||
$SSdefault_language = $row[14];
|
||||
$active_modules = $row[15];
|
||||
$allow_chats = $row[16];
|
||||
$default_phone_code = $row[17];
|
||||
}
|
||||
##### END SETTINGS LOOKUP #####
|
||||
###########################################
|
||||
@@ -1974,7 +1976,7 @@ if ($ACTION == 'manDiaLnextCaLL')
|
||||
$postal_code='';
|
||||
$state='';
|
||||
if (strlen($phone_code)<1)
|
||||
{$phone_code='1';}
|
||||
{$phone_code=$default_phone_code;}
|
||||
|
||||
$local_call_time='24hours';
|
||||
##### gather local call time setting from campaign
|
||||
|
||||
@@ -520,10 +520,11 @@
|
||||
# 160326-0941 - Fixed issue #933, variables
|
||||
# 160326-1001 - Fixed issue #934, phone_login
|
||||
# 160331-2129 - Fixed missing start and dispo call url variables, issue #938
|
||||
# 160414-0922 - Added default_phone_code system settings option
|
||||
#
|
||||
|
||||
$version = '2.12-489c';
|
||||
$build = '160331-2129';
|
||||
$version = '2.12-490c';
|
||||
$build = '160414-0922';
|
||||
$mel=1; # Mysql Error Log enabled = 1
|
||||
$mysql_log_count=87;
|
||||
$one_mysql_log=0;
|
||||
@@ -622,7 +623,7 @@ if ($sl_ct > 0)
|
||||
|
||||
#############################################
|
||||
##### START SYSTEM_SETTINGS LOOKUP #####
|
||||
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url FROM system_settings;";
|
||||
$stmt = "SELECT use_non_latin,vdc_header_date_format,vdc_customer_date_format,vdc_header_phone_format,webroot_writable,timeclock_end_of_day,vtiger_url,enable_vtiger_integration,outbound_autodial_active,enable_second_webform,user_territories_active,static_agent_url,custom_fields_enabled,pllb_grouping_limit,qc_features_active,allow_emails,callback_time_24hour,enable_languages,language_method,meetme_enter_login_filename,meetme_enter_leave3way_filename,enable_third_webform,default_language,active_modules,allow_chats,chat_url,default_phone_code FROM system_settings;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
if ($mel > 0) {mysql_error_logging($NOW_TIME,$link,$mel,$stmt,'01001',$VD_login,$server_ip,$session_name,$one_mysql_log);}
|
||||
if ($DB) {echo "$stmt\n";}
|
||||
@@ -656,6 +657,7 @@ if ($qm_conf_ct > 0)
|
||||
$active_modules = $row[23];
|
||||
$chat_enabled = $row[24];
|
||||
$chat_URL = $row[25];
|
||||
$default_phone_code = $row[26];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -18136,7 +18138,7 @@ if ($agent_display_dialable_leads > 0)
|
||||
<?php echo _QXZ("Note: all new manual dial leads will go into list %1s",0,'',$manual_dial_list_id); ?><br /><br />
|
||||
<table><tr>
|
||||
<td align="right"><font class="body_text"> <?php echo _QXZ("Dial Code:"); ?> </font></td>
|
||||
<td align="left"><font class="body_text"><input type="text" size="7" maxlength="10" name="MDDiaLCodE" id="MDDiaLCodE" class="cust_form" value="1" /> <?php echo _QXZ("(This is usually a 1 in the USA-Canada)"); ?></font></td>
|
||||
<td align="left"><font class="body_text"><input type="text" size="7" maxlength="10" name="MDDiaLCodE" id="MDDiaLCodE" class="cust_form" value="<?php echo $default_phone_code ?>" /> <?php echo _QXZ("(This is usually a 1 in the USA-Canada)"); ?></font></td>
|
||||
</tr><tr>
|
||||
<td align="right"><font class="body_text"> <?php echo _QXZ("Phone Number:"); ?> </font></td>
|
||||
<td align="left"><font class="body_text">
|
||||
|
||||
+11
-4
File diff suppressed because one or more lines are too long
@@ -85,6 +85,7 @@
|
||||
# 160306-1201 - Added new webphone options and server options
|
||||
# 160324-1940 - Added callback_useronly_move_minutes
|
||||
# 160407-1931 - Updated Phones Email entry
|
||||
# 160414-0916 - Added default_phone_code
|
||||
#
|
||||
|
||||
|
||||
@@ -4966,6 +4967,11 @@ FR_SPAC 00 00 00 00 00 - <?php echo _QXZ("France space separated phone number");
|
||||
<BR>
|
||||
<B><?php echo _QXZ("USA-Canada Phone Number Dialcode Fix"); ?> -</B><?php echo _QXZ("This option if set to 1 will trigger a process that will run at the Timeclock End of Day and will check all phone numbers to populate the dial code, or phone code, field with a 1 if it is missing as well as remove a leading 1 from the phone number field if it is present. Default is 0 for inactive."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-default_phone_code">
|
||||
<BR>
|
||||
<B><?php echo _QXZ("Default Phone Code"); ?> -</B><?php echo _QXZ("This setting will be used to fill in the Phone Code field on manual dial calls from the agent screen, also called Dial Code in some places. Default is 1."); ?>
|
||||
|
||||
<BR>
|
||||
<A NAME="settings-user_territories_active">
|
||||
<BR>
|
||||
|
||||
Reference in New Issue
Block a user