Index: openacs-4/packages/user-tracking/www/advanced-card.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/advanced-card.adp,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/user-tracking/www/advanced-card.adp 11 May 2005 13:51:48 -0000 1.2
+++ openacs-4/packages/user-tracking/www/advanced-card.adp 28 Jun 2005 08:03:12 -0000 1.2.2.1
@@ -231,7 +231,7 @@
-
+
Index: openacs-4/packages/user-tracking/www/advanced-card.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/advanced-card.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/advanced-card.tcl 14 Apr 2005 15:44:27 -0000 1.1
+++ openacs-4/packages/user-tracking/www/advanced-card.tcl 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -32,6 +32,7 @@
community_id:onevalue
onlyuser:onevalue
onlylines:onevalue
+ LastLine:onevalue
}
set user_id $onlyuser
@@ -237,7 +238,7 @@
set DataFileName [user-tracking::get_data_file_name $onlylines $onlyuser $config $year $month]
set hidden [export_vars -form {{onlylines $community_id} {onlyuser $user_id}}]
-set hidden2 [export_vars -form { {config} {url "advanced-card"} {onlylines $community_id} {onlyuser $user_id}}]
+set LastLine ""
if {$asked_date <= $today } {
@@ -306,6 +307,9 @@
TotalUnique {
set TotalUnique [lindex $campos 1]
}
+ LastLine {
+ set LastLine [user-tracking::converts_date [lindex $campos 1]]
+ }
default {}
}
set i [expr $i - 1]
@@ -394,5 +398,7 @@
}
}
}
+set hidden2 [export_vars -form { {config} {url "advanced-card"} {onlylines $community_id} {onlyuser $user_id} {year $year} {month $month} {LastTime $LastLine} }]
+
ad_return_template
Index: openacs-4/packages/user-tracking/www/communities-card.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/communities-card.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/user-tracking/www/communities-card.adp 11 May 2005 13:51:48 -0000 1.3
+++ openacs-4/packages/user-tracking/www/communities-card.adp 28 Jun 2005 08:03:12 -0000 1.3.2.1
@@ -239,7 +239,7 @@
-
+
Index: openacs-4/packages/user-tracking/www/communities-card.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/communities-card.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/user-tracking/www/communities-card.tcl 14 Apr 2005 15:44:27 -0000 1.2
+++ openacs-4/packages/user-tracking/www/communities-card.tcl 28 Jun 2005 08:03:12 -0000 1.2.2.1
@@ -41,6 +41,7 @@
NofMembers:onevalue
NofUsers:onevalue
NofAdmin:onevalue
+ LastLine:onevalue
}
@@ -110,7 +111,7 @@
set DataFileName [user-tracking::get_data_file_name $community_id "" $config $year $month]
set hidden [export_vars -form {community_id}]
-set hidden2 [export_vars -form { {config} {url "communities-card"} {onlylines $community_id} }]
+set LastLine ""
if {$asked_date <= $today } {
@@ -180,6 +181,9 @@
TotalUnique {
set TotalUnique [lindex $campos 1]
}
+ LastLine {
+ set LastLine [user-tracking::converts_date [lindex $campos 1]]
+ }
default {}
}
set i [expr $i - 1]
@@ -268,5 +272,7 @@
}
}
}
+set hidden2 [export_vars -form { {config} {url "communities-card"} {onlylines $community_id} {year $year} {month $month} {LastTime $LastLine} }]
+
ad_return_template
Index: openacs-4/packages/user-tracking/www/loading.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading.adp,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/loading.adp 14 Apr 2005 15:44:27 -0000 1.1
+++ openacs-4/packages/user-tracking/www/loading.adp 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -1 +1,2 @@
Cargando datos...
+@aux@
\ No newline at end of file
Index: openacs-4/packages/user-tracking/www/loading.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/loading.tcl 14 Apr 2005 15:44:27 -0000 1.1
+++ openacs-4/packages/user-tracking/www/loading.tcl 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -4,6 +4,7 @@
@creation-date 2005-01-10
} -query {
} -properties {
+aux:onevalue
}
if {![exists_and_not_null onlyuser] & ![exists_and_not_null onlylines]} {
@@ -20,17 +21,89 @@
set onlyuser [string trimleft $onlyuser " "]
}
+if { [string length $month] == 1} {
+ set month "0${month}"
+}
+
+set logs [ns_config "ns/server/[ns_info server]/module/nslog" file]
+set patron "(.*)([ns_info server]\.log$)"
+regexp $patron $logs all logdir part2 ]
+ns_log notice "LOGDIR=$logdir"
+
+set todayyear [template::util::date::get_property year [template::util::date::today]]
+set todaymonth [template::util::date::get_property month [template::util::date::today]]
+set todayday [template::util::date::get_property day [template::util::date::today]]
+
+ if {$month < 12} {
+ set nextmonth [expr $month +1]
+ set nextyear $year
+ } else {
+ set nextmonth 1
+ set nextyear [expr $year + 1]
+ }
+ if { [string length $nextmonth] == 1} {
+ set nextmonth "0${nextmonth}"
+ }
+
+if {[exists_and_not_null LastTime]} {
+ set campos [split $LastTime "/-"]
+ set lastyear [lindex $campos 2]
+ set lastmonth [lindex $campos 1]
+ set lastday [lindex $campos 0]
+
+ set lastdate [clock scan "$lastyear-$lastmonth-$lastday"]
+ set todaydate [clock scan "$todayyear-$todaymonth-$todayday"]
+
+ set logresolvemerge ""
+ if { $lastmonth == $todaymonth } {
+ if {[expr $lastday + 1] <= [expr $todayday - 1]} {
+ set expresion "\[[expr $lastday + 1]"
+ for {set x [expr $lastday + 2]} {$x<=[expr $todayday - 1]} {incr x} {
+ append expresion ",$x"
+ }
+ append expresion "\]"
+ set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log |"
+ ns_log notice $logresolvemerge
+ } else {
+ set logresolvemerge "-LogFile=${logdir}elane.log"
+ }
+ } else {
+ if {[expr $lastday + 1] <= [template::util::date::get_property days_in_month "$lastyear$lastmonth"] } {
+ set expresion "\[[expr $lastday + 1]"
+ for {set x [expr $lastday + 2]} {$x<=[template::util::date::get_property days_in_month "$lastyear$lastmonth"]} {incr x} {
+ append expresion ",$x"
+ }
+ append expresion "\]"
+ ns_log notice $expresion
+ set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log.$nextyear-$nextmonth-01* |"
+ ns_log notice $logresolvemerge
+ }
+ }
+} else {
+ set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl "
+ append logresolvemerge " ${logdir}elane.log.$year-$month-0\[2-9\]* "
+ append logresolvemerge " ${logdir}elane.log.$year-$month-1\[0-9\]* "
+ append logresolvemerge " ${logdir}elane.log.$year-$month-2\[0-9\]* "
+ append logresolvemerge " ${logdir}elane.log.$year-$month-3\[0-1\]* "
+ append logresolvemerge " ${logdir}elane.log.$nextyear-$nextmonth-01* "
+ if {$month == $todaymonth} {
+ append logresolvemerge " ${logdir}elane.log |"
+ } else {
+ append logresolvemerge " |"
+ }
+}
+
ad_progress_bar_begin \
-title "" \
-message_1 "#user-tracking.updating_datafile#" \
-message_2 "#user-tracking.we_will_continue#"
ns_write "$message
"
-set execAnalyzer [list "perl" "[user-tracking::get_user_tracking_dir]/www/awstats/cgi-bin/awstats_dotlrn.pl" "-config=$config" "-update" "-onlycoms=$onlylines" "-onlyusers=$onlyuser"]
-ns_log notice $execAnalyzer
-catch {exec [lindex $execAnalyzer 0] [lindex $execAnalyzer 1] [lindex $execAnalyzer 2] [lindex $execAnalyzer 3] [lindex $execAnalyzer 4] [lindex $execAnalyzer 5]} aux
-
+set execAnalyzer [list "perl" "[user-tracking::get_user_tracking_dir]/www/awstats/cgi-bin/awstats_dotlrn.pl" "-config=$config" "-update" "-onlycoms=$onlylines" "-onlyusers=$onlyuser" "-month=$month" $logresolvemerge "-year=$year"]
+ns_log notice "$execAnalyzer"
+catch {exec [lindex $execAnalyzer 0] [lindex $execAnalyzer 1] [lindex $execAnalyzer 2] [lindex $execAnalyzer 3] [lindex $execAnalyzer 7] [lindex $execAnalyzer 8] [lindex $execAnalyzer 4] [lindex $execAnalyzer 5] [lindex $execAnalyzer 6]} aux
+ns_log notice $aux
set DataFileName [user-tracking::get_data_file_name $onlylines $onlyuser $config $year $month]
ns_log notice $DataFileName
set nodata_p "0"
Index: openacs-4/packages/user-tracking/www/loading2.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading2.adp,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/loading2.adp 14 Apr 2005 15:44:27 -0000 1.1
+++ openacs-4/packages/user-tracking/www/loading2.adp 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -1 +1,2 @@
Cargando datos...
+@aux@
\ No newline at end of file
Index: openacs-4/packages/user-tracking/www/loading2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/loading2.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/loading2.tcl 14 Apr 2005 15:44:27 -0000 1.1
+++ openacs-4/packages/user-tracking/www/loading2.tcl 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -7,29 +7,98 @@
{onlyuser ""}
{onlylines ""}
{url ""}
+ {LastTime ""}
+ {month ""}
+ {year ""}
} -properties {
+aux:onevalue
}
+if { [string length $month] == 1} {
+ set month "0${month}"
+}
+
+ if {$month < 12} {
+ set nextmonth [expr $month +1]
+ set nextyear $year
+ } else {
+ set nextmonth 1
+ set nextyear [expr $year + 1]
+ }
+ if { [string length $nextmonth] == 1} {
+ set nextmonth "0${nextmonth}"
+ }
+
+set logs [ns_config "ns/server/[ns_info server]/module/nslog" file]
+set patron "(.*)([ns_info server]\.log$)"
+regexp $patron $logs all logdir part2 ]
+
set message "[_ user-tracking.updating_statistics]"
+if {[exists_and_not_null LastTime]} {
+ set campos [split $LastTime "/-"]
+
+ set lastyear [lindex $campos 2]
+ set lastmonth [lindex $campos 1]
+ set lastday [lindex $campos 0]
+ set todayyear [template::util::date::get_property year [template::util::date::today]]
+ set todaymonth [template::util::date::get_property month [template::util::date::today]]
+ set todayday [template::util::date::get_property day [template::util::date::today]]
+
+ set lastdate [clock scan "$lastyear-$lastmonth-$lastday"]
+ set todaydate [clock scan "$todayyear-$todaymonth-$todayday"]
+
+ set logresolvemerge ""
+
+ if { $lastmonth == $todaymonth } {
+ if {[expr $lastday + 1] <= [expr $todayday - 1]} {
+ set expresion "\[[expr $lastday + 1]"
+ for {set x [expr $lastday + 2]} {$x<=[expr $todayday - 1]} {incr x} {
+ append expresion ",$x"
+ }
+ append expresion "\]"
+ set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log |"
+ ns_log notice $logresolvemerge
+ } else {
+ set logresolvemerge "-LogFile=${logdir}elane.log"
+ }
+ } else {
+ if {[expr $lastday + 1] <= [template::util::date::get_property days_in_month "$lastyear$lastmonth"] } {
+ set expresion "\[[expr $lastday + 1]"
+ for {set x [expr $lastday + 2]} {$x<=[template::util::date::get_property days_in_month "$lastyear$lastmonth"]} {incr x} {
+ append expresion ",$x"
+ }
+ append expresion "\]"
+ ns_log notice $expresion
+ set logresolvemerge "-LogFile=[user-tracking::get_user_tracking_dir]/tools/logresolvemerge.pl ${logdir}elane.log.$year-$month-${expresion}* ${logdir}elane.log.$nextyear-$nextmonth-01* |"
+ ns_log notice $logresolvemerge
+ }
+ }
+}
+
ad_progress_bar_begin \
-title "" \
-message_1 "#user-tracking.updating_datafile#" \
-message_2 "#user-tracking.we_will_continue#"
ns_write "$message
"
-set execAnalyzer [list "perl" "[user-tracking::get_user_tracking_dir]/www/awstats/cgi-bin/awstats_dotlrn.pl" "-config=$config" "-update" "-onlycoms=$onlylines" "-onlyusers=$onlyuser"]
-ns_log notice $execAnalyzer
-catch {exec [lindex $execAnalyzer 0] [lindex $execAnalyzer 1] [lindex $execAnalyzer 2] [lindex $execAnalyzer 3] [lindex $execAnalyzer 4] [lindex $execAnalyzer 5]} aux
+set aux ""
+if { [exists_and_not_null logresolvemerge] } {
+set execAnalyzer [list "perl" "[user-tracking::get_user_tracking_dir]/www/awstats/cgi-bin/awstats_dotlrn.pl" "-config=$config" "-update" "-onlycoms=$onlylines" "-onlyusers=$onlyuser" "$logresolvemerge" "-month=$month" "-year=$year"]
+ns_log notice "$execAnalyzer"
+catch {exec [lindex $execAnalyzer 0] [lindex $execAnalyzer 1] [lindex $execAnalyzer 2] [lindex $execAnalyzer 3] [lindex $execAnalyzer 6] [lindex $execAnalyzer 4] [lindex $execAnalyzer 5] [lindex $execAnalyzer 7] [lindex $execAnalyzer 8]} aux
+ns_log notice $aux
+}
+
if {[exists_and_not_null url]} {
switch $url {
- users-card { ad_progress_bar_end -url $url?user_id=$onlyuser }
- communities-card {ad_progress_bar_end -url $url?community_id=$onlylines}
- advanced-card {ad_progress_bar_end -url $url?onlylines=$onlylines&onlyuser=$onlyuser}
+ users-card { ad_progress_bar_end -url $url?user_id=$onlyuser&year=$year&month=$month}
+ communities-card {ad_progress_bar_end -url $url?community_id=$onlylines&year=$year&month=$month}
+ advanced-card {ad_progress_bar_end -url $url?onlylines=$onlylines&onlyuser=$onlyuser&year=$year&month=$month}
}
} else {
- ad_progress_bar_end -url site-card
+ ad_progress_bar_end -url site-card?year=$year&month=$month
}
Index: openacs-4/packages/user-tracking/www/site-card.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/site-card.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/user-tracking/www/site-card.adp 11 May 2005 13:51:48 -0000 1.3
+++ openacs-4/packages/user-tracking/www/site-card.adp 28 Jun 2005 08:03:12 -0000 1.3.2.1
@@ -151,7 +151,7 @@
-
+
@@ -251,7 +251,7 @@
-
+
Index: openacs-4/packages/user-tracking/www/site-card.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/site-card.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/user-tracking/www/site-card.tcl 14 Apr 2005 15:44:28 -0000 1.2
+++ openacs-4/packages/user-tracking/www/site-card.tcl 28 Jun 2005 08:03:12 -0000 1.2.2.1
@@ -42,6 +42,7 @@
asked_day:onevalue
server:onevalue
system_name:onevalue
+ LastLine:onevalue
}
@@ -95,6 +96,7 @@
if {$asked_date <= $today } {
set nodata_p 0
+ set LastLine ""
if {[file exists $DataFileName]} {
set nodata_p 1
set LastRegistration_ansi [lc_time_system_to_conn $last_registration]
@@ -164,6 +166,9 @@
TotalUnique {
set TotalUnique [lindex $campos 1]
}
+ LastLine {
+ set LastLine [user-tracking::converts_date [lindex $campos 1]]
+ }
default {}
}
set i [expr $i - 1]
@@ -193,9 +198,12 @@
while { $i > 0} {
set linea [gets $dataFile]
+ if { $linea == "END_DAY" } {
+ break;
+ }
set campos [split $linea]
- set TotalPages [expr $TotalPages+ [lindex $campos 1]]
- set TotalAsked [expr $TotalAsked+ [lindex $campos 2]]
+ set TotalPages [expr $TotalPages + [lindex $campos 1]]
+ set TotalAsked [expr $TotalAsked + [lindex $campos 2]]
set i [expr $i - 1]
if {[eof $dataFile]} { #Wrong file?
break;
Index: openacs-4/packages/user-tracking/www/users-card.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/users-card.adp,v
diff -u -r1.3 -r1.3.2.1
--- openacs-4/packages/user-tracking/www/users-card.adp 11 May 2005 13:51:48 -0000 1.3
+++ openacs-4/packages/user-tracking/www/users-card.adp 28 Jun 2005 08:03:12 -0000 1.3.2.1
@@ -127,7 +127,7 @@
-
+
@@ -227,7 +227,7 @@
-
+
Index: openacs-4/packages/user-tracking/www/users-card.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/users-card.tcl,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/user-tracking/www/users-card.tcl 14 Apr 2005 15:44:28 -0000 1.2
+++ openacs-4/packages/user-tracking/www/users-card.tcl 28 Jun 2005 08:03:12 -0000 1.2.2.1
@@ -36,6 +36,7 @@
asked_day:onevalue
user_id:onevalue
hidden:onevalue
+ LastLine:onevalue
}
@@ -95,6 +96,8 @@
if {$asked_date <= $today } {
set nodata_p 0
+ set LastLine ""
+
if {[file exists $DataFileName]} {
set nodata_p 1
set dataFile [open "$DataFileName" r]
@@ -158,6 +161,9 @@
TotalUnique {
set TotalUnique [lindex $campos 1]
}
+ LastLine {
+ set LastLine [user-tracking::converts_date [lindex $campos 1]]
+ }
default {}
}
set i [expr $i - 1]
Index: openacs-4/packages/user-tracking/www/awstats/cgi-bin/awstats_dotlrn.pl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/awstats/cgi-bin/awstats_dotlrn.pl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/awstats/cgi-bin/awstats_dotlrn.pl 15 Apr 2005 06:33:13 -0000 1.1
+++ openacs-4/packages/user-tracking/www/awstats/cgi-bin/awstats_dotlrn.pl 28 Jun 2005 08:03:12 -0000 1.1.2.1
@@ -7,7 +7,7 @@
# See AWStats documentation (in docs/ directory) for all setup instructions.
#------------------------------------------------------------------------------
# $Revision$ - $Author$ - $Date$
-# $Modifications by Sergio Gonzalez, TID, E-Lane proyect
+# $Modifications by Sergio Gonzalez, Pablo Mu�oz and David Ortega, TID, E-Lane project
require 5.005;
#$|=1;
@@ -2141,8 +2141,8 @@
if ($field[4]) { $LastLineChecksum=int($field[4]); }
next;
}
- if ($field[0] eq 'FirstTime' || $field[0] eq "${xmlrb}FirstTime") { if (! $FirstTime{$year.$month} || $FirstTime{$year.$month} > int($field[1])) { $FirstTime{$year.$month}=int($field[1]); }; next; }
- if ($field[0] eq 'LastTime' || $field[0] eq "${xmlrb}LastTime") { if (! $LastTime{$year.$month} || $LastTime{$year.$month} < int($field[1])) { $LastTime{$year.$month}=int($field[1]); }; next; }
+ if ($field[0] eq 'FirstTime' || $field[0] eq "${xmlrb}FirstTime") { if (! $FirstTime{$year.$month} || $FirstTime{$year.$month} > int($field[1])) { $FirstTime{$year.$month}=int($field[1]);}; next; }
+ if ($field[0] eq 'LastTime' || $field[0] eq "${xmlrb}LastTime") { if (! $LastTime{$year.$month} || $LastTime{$year.$month} < int($field[1])) { $LastTime{$year.$month}=int($field[1]);}; next; }
if ($field[0] eq 'LastUpdate' || $field[0] eq "${xmlrb}LastUpdate") {
if ($LastUpdate < $field[1]) {
$LastUpdate=int($field[1]);
@@ -6025,20 +6025,22 @@
# Build ListOfYears list with all existing years
if ($Debug) { debug("Scan for last history files into DirData='$DirData'"); }
$lastyearbeforeupdate=0;
-opendir(DIR,"$DirData");
-foreach (grep /^$PROG(\d\d)(\d\d\d\d)$FileSuffix\.txt(|\.gz)$/, sort readdir DIR) {
- /^$PROG(\d\d)(\d\d\d\d)$FileSuffix\.txt(|\.gz)$/;
- if (! $ListOfYears{"$2"} || "$1" gt $ListOfYears{"$2"}) {
- $ListOfYears{"$2"}="$1"; # ListOfYears contains max month found
- if ("$2" gt $lastyearbeforeupdate) { $lastyearbeforeupdate="$2"; }
- }
-}
-close DIR;
+#opendir(DIR,"$DirData");
+#foreach (grep /^$PROG(\d\d)(\d\d\d\d)$FileSuffix\.txt(|\.gz)$/, sort readdir DIR) {
+# /^$PROG(\d\d)(\d\d\d\d)$FileSuffix\.txt(|\.gz)$/;
+# if (! $ListOfYears{"$2"} || "$1" gt $ListOfYears{"$2"}) {
+# $ListOfYears{"$2"}="$1"; # ListOfYears contains max month found
+# if ("$2" gt $lastyearbeforeupdate) { $lastyearbeforeupdate="$2"; }
+# }
+#}
+#close DIR;
+#commented by e-lane
# Get value for LastLine
if ($lastyearbeforeupdate) {
# Read 'general' section of last history file for LastLine
- &Read_History_With_TmpUpdate($lastyearbeforeupdate,$ListOfYears{$lastyearbeforeupdate},0,0,"general");
+# &Read_History_With_TmpUpdate($lastyearbeforeupdate,$ListOfYears{$lastyearbeforeupdate},0,0,"general");
+ &Read_History_With_TmpUpdate($YearRequired,$MonthRequired,0,0,"general");
}
if ($Debug) {
debug("Last year=$lastyearbeforeupdate - Last month=$ListOfYears{$lastyearbeforeupdate}");
@@ -6333,7 +6335,7 @@
my $yearmonthdayrecord=sprintf("$dateparts[2]%02i%02i",$dateparts[1],$dateparts[0]);
my $timerecord=((int("$yearmonthdayrecord")*100+$dateparts[3])*100+$dateparts[4])*100+$dateparts[5];
- # E-lane
+ # E-lane, calculating moments in which more hits are produced
$date = $timerecord;
if($lastdate == 0){
$counter = 0;
@@ -6374,7 +6376,7 @@
$counter = 1;
$lastdate = $date;
}
-
+ #E-lane end
# Check date
#-----------------------
@@ -6462,6 +6464,7 @@
if ($lastprocessedmonth) {
# We save data of processed month
&Read_History_With_TmpUpdate($lastprocessedyear,$lastprocessedmonth,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
+ # &Read_History_With_TmpUpdate($YearRequired,$MonthRequired,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
$counterforflushtest=0; # We reset counterforflushtest
}
$lastprocessedyearmonth=sprintf("%04i%02i",$lastprocessedyear=$yearrecord,$lastprocessedmonth=$monthrecord);
@@ -7380,7 +7383,8 @@
print " _url_p:".(scalar keys %_url_p)." _url_k:".(scalar keys %_url_k)." _url_e:".(scalar keys %_url_e)." _url_x:".(scalar keys %_url_x)."\n";
print " _waithost_e:".(scalar keys %_waithost_e)." _waithost_l:".(scalar keys %_waithost_l)." _waithost_s:".(scalar keys %_waithost_s)." _waithost_u:".(scalar keys %_waithost_u)."\n";
}
- &Read_History_With_TmpUpdate($lastprocessedyear,$lastprocessedmonth,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($_));
+# &Read_History_With_TmpUpdate($lastprocessedyear,$lastprocessedmonth,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($_));
+ &Read_History_With_TmpUpdate($YearRequired,$MonthRequired,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($_));
&GetDelaySinceStart(1); $NbOfLinesShowsteps=1;
}
}
@@ -7405,10 +7409,10 @@
chomp $line; $line =~ s/\r$//;
if (! $NbOfLinesParsed) {
# TODO If there was no lines parsed (log was empty), we only update LastUpdate line with YYYYMMDDHHMMSS 0 0 0 0 0
- &Read_History_With_TmpUpdate($lastprocessedyear,$lastprocessedmonth,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
+ &Read_History_With_TmpUpdate($YearRequired,$MonthRequired,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
}
else {
- &Read_History_With_TmpUpdate($lastprocessedyear,$lastprocessedmonth,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
+ &Read_History_With_TmpUpdate($YearRequired,$MonthRequired,1,1,"all",($lastlinenb+$NbOfLinesParsed),$lastlineoffset,&CheckSum($line));
}
}
@@ -7522,10 +7526,10 @@
for (my $ix=12; $ix>=1; $ix--) {
my $monthix=sprintf("%02s",$ix);
if ($MonthRequired eq 'all' || $monthix eq $MonthRequired) {
- &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"all"); # Read full history file
+ &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"all"); # Read full history file
}
elsif (($HTMLOutput{'main'} && $ShowMonthStats) || $HTMLOutput{'alldays'}) {
- &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"general time"); # Read general and time sections.
+ &Read_History_With_TmpUpdate($YearRequired,$monthix,0,0,"general time"); # Read general and time sections.
}
}
}
Index: openacs-4/packages/user-tracking/www/visits/hits.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/visits/hits.tcl,v
diff -u -r1.1 -r1.1.2.1
--- openacs-4/packages/user-tracking/www/visits/hits.tcl 14 Apr 2005 15:44:30 -0000 1.1
+++ openacs-4/packages/user-tracking/www/visits/hits.tcl 28 Jun 2005 08:03:13 -0000 1.1.2.1
@@ -47,7 +47,7 @@
#Getting data about maximum hits
-set pos $Map(POS_EXTRA_9)
+set pos $Map(POS_EXTRA_7)
seek $dataFile $pos
set linea [gets $dataFile]
set patron "(PETITION_BEGIN) (.*)"