]> git.ipfire.org Git - thirdparty/AWStats.git/commitdiff
Fixed incorret values reported for hours chart appeared in previous build.
authoreldy <>
Thu, 12 Sep 2002 15:39:16 +0000 (15:39 +0000)
committereldy <>
Thu, 12 Sep 2002 15:39:16 +0000 (15:39 +0000)
wwwroot/cgi-bin/awstats.pl

index feefd5628f71df4d8e42b1a4090e37d4f921cd1d..55b6f3ae6a1f2101b518433552a070fd8b218169 100644 (file)
@@ -1636,10 +1636,12 @@ sub Read_History_With_Update {
                                        #if ($field[0]) {       # This test must not be here for TIME section (because field[0] is "0" for hour 0)
                                                $count++;
                                                if ($SectionsToLoad{"time"}) {
-                                                       $countloaded++;
-                                                       if ($field[1]) { $_time_p[$field[0]]+=int($field[1]); }
-                                                       if ($field[2]) { $_time_h[$field[0]]+=int($field[2]); }
-                                                       if ($field[3]) { $_time_k[$field[0]]+=int($field[3]); }
+                                                       if ($MonthRequired eq "year" || $MonthRequired eq $month) {     # Still required
+                                                               $countloaded++;
+                                                               if ($field[1]) { $_time_p[$field[0]]+=int($field[1]); }
+                                                               if ($field[2]) { $_time_h[$field[0]]+=int($field[2]); }
+                                                               if ($field[3]) { $_time_k[$field[0]]+=int($field[3]); }
+                                                       }
                                                        $monthpages+=int($field[1]);
                                                        $monthhits+=int($field[2]);
                                                        $monthbytes+=int($field[3]);
@@ -4919,7 +4921,7 @@ EOF
                                &Read_History_With_Update($YearRequired,$monthix,0,0,"all");                    # Read full history file
                        }
                        elsif ($HTMLOutput eq "main" && $ShowMonthDayStats) {
-                               &Read_History_With_Update($YearRequired,$monthix,0,0,"general time");   # Read general and time sections
+                               &Read_History_With_Update($YearRequired,$monthix,0,0,"general time");   # Read general and time sections.
                        }
                }
        }