From: eldy <> Date: Wed, 19 Nov 2008 22:25:17 +0000 (+0000) Subject: Fix: Update of last update date broken sometimes. X-Git-Tag: AWSTATS_6_9~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab38cc8a2f26c1ef1b518da9a8eaad22ae6d8ddf;p=thirdparty%2FAWStats.git Fix: Update of last update date broken sometimes. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 860b150e..7d1c2395 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -3587,16 +3587,10 @@ sub Read_History_With_TmpUpdate { } next; } - if ( $field[0] eq 'LastUpdate' - || $field[0] eq "${xmlrb}LastUpdate" ) + if ($field[0] eq 'LastUpdate' + || $field[0] eq "${xmlrb}LastUpdate") { - if ( $LastUpdate < $field[1] ) { - $LastUpdate = int( $field[1] ); - - #$LastUpdateLinesRead=int($field[2]); - #$LastUpdateNewLinesRead=int($field[3]); - #$LastUpdateLinesCorrupted=int($field[4]); - } + if (! $LastUpdate) { $LastUpdate=int($field[1]); }; next; } if ( $field[0] eq 'TotalVisits' @@ -6114,12 +6108,8 @@ sub Save_History { } # General - if ( $sectiontosave eq 'general' ) { - if ( $LastUpdate < - int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec") ) - { - $LastUpdate = int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec"); - } + if ($sectiontosave eq 'general') { + $LastUpdate=int("$nowyear$nowmonth$nowday$nowhour$nowmin$nowsec"); print HISTORYTMP "\n"; if ($xml) { print HISTORYTMP "
\n";