diff --git a/agc_2-X/trunk/www/agc/vicidial.php b/agc_2-X/trunk/www/agc/vicidial.php index 8e7843a9..7403daed 100644 --- a/agc_2-X/trunk/www/agc/vicidial.php +++ b/agc_2-X/trunk/www/agc/vicidial.php @@ -263,10 +263,11 @@ # 91130-2021 - Added code for manager override of in-group selection # 91204-1638 - Added recording_filename and recording_id script variables and script refresh link # 91205-2055 - Added CONSULTATIVE checkbox in a redesigned Transfer-Conf frame +# 91206-2020 - Fixed vicidial_agent_log logging bug on logout when not paused # -$version = '2.2.0-241'; -$build = '91205-2055'; +$version = '2.2.0-242'; +$build = '91206-2020'; $mel=1; # Mysql Error Log enabled = 1 $mysql_log_count=63; $one_mysql_log=0; @@ -2603,6 +2604,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} var recording_id=''; var delayed_script_load=''; var script_recording_delay=''; + var VDRP_stage='PAUSED'; var DiaLControl_auto_HTML = "\"\"Resume\""; var DiaLControl_auto_HTML_ready = "\"\"Resume\""; var DiaLControl_auto_HTML_OFF = "\"\"Resume\""; @@ -5443,11 +5445,11 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} // ################################################################################ // Set the client to READY and start looking for calls (VDADready, VDADpause) - function AutoDial_ReSume_PauSe(taskaction,taskagentlog,taskwrapup,taskstatuschange) + function AutoDial_ReSume_PauSe(taskaction,taskagentlog,taskwrapup,taskstatuschange,templogout) { if (taskaction == 'VDADready') { - var VDRP_stage = 'READY'; + VDRP_stage = 'READY'; if (INgroupCOUNT > 0) { if (VICIDiaL_closer_blended == 0) @@ -5470,7 +5472,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} } else { - var VDRP_stage = 'PAUSED'; + VDRP_stage = 'PAUSED'; AutoDialReady = 0; AutoDialWaiting = 0; if (dial_method == "INBOUND_MAN") @@ -5484,7 +5486,7 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} document.getElementById("DiaLControl").innerHTML = DiaLControl_auto_HTML; } - if (agent_pause_codes_active=='FORCE') + if ( (agent_pause_codes_active=='FORCE') && (templogout != 'LOGOUT') ) { PauseCodeSelectContent_create(); } @@ -7861,12 +7863,31 @@ if ($enable_fast_refresh < 1) {echo "\tvar refresh_interval = 1000;\n";} { if (logout_stop_timeouts < 1) { + if (VDRP_stage != 'PAUSED') + { + AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT"); + } LogouT('CLOSE'); alert("PLEASE CLICK THE LOGOUT LINK TO LOG OUT NEXT TIME.\n"); } } +// ################################################################################ +// Normal logout with check for pause stage first + function NormalLogout() + { + if (logout_stop_timeouts < 1) + { + if (VDRP_stage != 'PAUSED') + { + AutoDial_ReSume_PauSe("VDADpause",'','','',"LOGOUT"); + } + LogouT('NORMAL'); + } + } + + // ################################################################################ // Log the user out of the system, if active call or active dial is occuring, don't let them. function LogouT(tempreason) @@ -9677,7 +9698,7 @@ echo "\n"; 0) {echo "TERRITORIES     \n";} ?> 0) {echo "GROUPS     \n";} ?> -LOGOUT\n"; ?> +LOGOUT\n"; ?>