From 66d7598dacd36aa905853ec5fe64c642dcd009b9 Mon Sep 17 00:00:00 2001 From: mattf Date: Tue, 25 Nov 2014 04:17:19 +0000 Subject: [PATCH] Fixed Fhour variable bug in several perl scripts git-svn-id: svn://192.168.202.10@2204 3d104415-ff17-0410-8863-d5cf3c621b8a --- agi/agi-NVA_recording.agi | 7 ++++--- agi/timer_rebeep.agi | 5 +++-- bin/ADMIN_audio_store_sync.pl | 5 +++-- bin/ADMIN_backup.pl | 3 ++- bin/ADMIN_restart_roll_logs.pl | 5 +++-- bin/AST_manager_listen.pl | 3 ++- bin/AST_update.pl | 5 +++-- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/agi/agi-NVA_recording.agi b/agi/agi-NVA_recording.agi index e96d732c..aee11531 100644 --- a/agi/agi-NVA_recording.agi +++ b/agi/agi-NVA_recording.agi @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# agi-NVA_recording.agi version 2.6 +# agi-NVA_recording.agi version 2.10 # # This script is designed to give recording ability to agents not the using # ViciDial agent screen @@ -33,6 +33,7 @@ # 120430-2214 - Converted call to Monitor app to be asterisk 1.8 compatible # 130108-1811 - Changes for Asterisk 1.8 compatibility # 130326-1510 - Added lead_id and user logging from vicidial values +# 141124-2309 - Fixed Fhour variable bug # &get_time_now; @@ -47,7 +48,7 @@ $year = ($year + 1900); $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$Fhour = "0$hour";} +if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} $now_date = "$year-$mon-$mday $hour:$min:$sec"; @@ -296,7 +297,7 @@ sub get_time_now #get the current date and time and epoch for logging call lengt $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$Fhour = "0$hour";} + if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} diff --git a/agi/timer_rebeep.agi b/agi/timer_rebeep.agi index 3e7b1ccd..4b809755 100644 --- a/agi/timer_rebeep.agi +++ b/agi/timer_rebeep.agi @@ -24,10 +24,11 @@ # "Timer Action Seconds" = 20 # "Transfer Conf Number 1" = 8399 # -# Copyright (C) 2011 Matt Florell LICENSE: AGPLv2 +# Copyright (C) 2014 Matt Florell LICENSE: AGPLv2 # # CHANGELOG # 111227-1418 - First build +# 141124-2309 - Fixed Fhour variable bug # $US='_'; @@ -46,7 +47,7 @@ $year = ($year + 1900); $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$Fhour = "0$hour";} +if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} diff --git a/bin/ADMIN_audio_store_sync.pl b/bin/ADMIN_audio_store_sync.pl index 9bba2a99..07d38c01 100644 --- a/bin/ADMIN_audio_store_sync.pl +++ b/bin/ADMIN_audio_store_sync.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# ADMIN_audio_store_sync.pl version 2.4 +# ADMIN_audio_store_sync.pl version 2.10 # # DESCRIPTION: # syncronizes audio between audio store and this server @@ -16,6 +16,7 @@ # 100824-0032 - Fixed issue with first MoH file being skipped when playing in non-random order # 101217-2137 - Small fix for admin directories not directly off of the webroot # 121019-0729 - Added audio_store_purge feature +# 141124-2309 - Fixed Fhour variable bug # # constants @@ -34,7 +35,7 @@ $year = ($year + 1900); $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$Fhour = "0$hour";} +if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} $file_date = "$year-$mon-$mday"; diff --git a/bin/ADMIN_backup.pl b/bin/ADMIN_backup.pl index 5aad2612..23b277c1 100644 --- a/bin/ADMIN_backup.pl +++ b/bin/ADMIN_backup.pl @@ -18,6 +18,7 @@ # 100817-1202 - Fixed test option bug # 101208-0452 - Added checks for zaptel and dahdi conf files # 141103-1505 - Added option to export without leads, logs, servers or phones +# 141124-2309 - Fixed Fhour variable bug # $secT = time(); @@ -27,7 +28,7 @@ $year = ($year + 1900); $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$Fhour = "0$hour";} +if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} $file_date = "$year-$mon-$mday"; diff --git a/bin/ADMIN_restart_roll_logs.pl b/bin/ADMIN_restart_roll_logs.pl index 7c74a598..2587c434 100644 --- a/bin/ADMIN_restart_roll_logs.pl +++ b/bin/ADMIN_restart_roll_logs.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# ADMIN_restart_roll_logs.pl version 2.6 +# ADMIN_restart_roll_logs.pl version 2.10 # # script to roll the Asterisk logs on machine restart # @@ -12,6 +12,7 @@ # 90311-0921 - Added /var/log/asterisk/screenlog log rolling # 90508-0535 - Changes root screenlog to /var/log/astguiclient # 130108-1715 - Changes for new log rolling script compatibility +# 141124-2309 - Fixed Fhour variable bug # ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @@ -19,7 +20,7 @@ $year = ($year + 1900); $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} -if ($hour < 10) {$Fhour = "0$hour";} +if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} diff --git a/bin/AST_manager_listen.pl b/bin/AST_manager_listen.pl index 1c1e0775..da794f40 100644 --- a/bin/AST_manager_listen.pl +++ b/bin/AST_manager_listen.pl @@ -42,6 +42,7 @@ # 130418-1946 - Changed asterisk 1.8 compatibility for CPD and SIP Hangup # 140524-0900 - Fixed issue with consultative agent transfers in Asterisk 1.8 # 141113-1605 - Added concurrency check +# 141124-2309 - Fixed Fhour variable bug # # constants @@ -1291,7 +1292,7 @@ sub get_time_now #get the current date and time and epoch for logging call lengt $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$Fhour = "0$hour";} + if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";} diff --git a/bin/AST_update.pl b/bin/AST_update.pl index 107d9136..f6cacf8e 100644 --- a/bin/AST_update.pl +++ b/bin/AST_update.pl @@ -62,9 +62,10 @@ # 131122-1317 - Small formatting fixes # 140510-0119 - Small formatting and asterisk version changes # 141113-1601 - Added concurrency check +# 141124-2309 - Fixed Fhour variable bug # -$build = '141113-1601'; +$build = '141124-2309'; # constants $SYSPERF=0; # system performance logging to MySQL server_performance table every 5 seconds @@ -1324,7 +1325,7 @@ sub get_time_now $mon++; if ($mon < 10) {$mon = "0$mon";} if ($mday < 10) {$mday = "0$mday";} - if ($hour < 10) {$Fhour = "0$hour";} + if ($hour < 10) {$hour = "0$hour";} if ($min < 10) {$min = "0$min";} if ($sec < 10) {$sec = "0$sec";}