]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fix: Update of last update date broken sometimes.
authoreldy <>
Wed, 19 Nov 2008 22:25:17 +0000 (22:25 +0000)
committereldy <>
Wed, 19 Nov 2008 22:25:17 +0000 (22:25 +0000)
wwwroot/cgi-bin/awstats.pl

index 860b150ec1d0093bfeb2a717b181f380fcde1304..7d1c2395aaeb19e1c65b139ee2b3cb5a6e7933cb 100644 (file)
@@ -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 "<section id='$sectiontosave'><comment>\n";