Changeset 497
- Timestamp:
- 11/10/08 00:19:35 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/PageStatsPlugin/lib/TWiki/Plugins/PageStatsPlugin.pm
r245 r497 75 75 76 76 my $dd = TWiki::Func::getDataDir(); 77 my @pagestats = `grep $web\\.$topic $dd/log*.txt | grep -E \\(view\\|save\\)`; 77 #my @pagestats = `grep $web\\.$topic $dd/log*.txt | grep -E \\(view\\|save\\)`; 78 use TWiki::Sandbox; 79 my $sandbox = TWiki::Sandbox->new(); 80 my ($lsresp, $lsexit) = $sandbox->sysCommand("ls -1 $dd"); 81 my @resp = split(/\n/, $lsresp); 82 my @logs = grep(/log2.*.txt/, @resp); 83 my $logs = ""; 84 foreach my $l (@logs) { 85 $logs .= "$dd/$l "; 86 } 87 my $pat = "$web.$topic"; 88 my $x = 'grep -e '.$pat.' -e view -e save '.$logs; 89 my ($grepresp, $grepexit) = $sandbox->sysCommand('grep -e '.$pat.' -e view -e save '.$logs); 90 my @pagestats = split(/$/, $grepresp); 78 91 79 92 my $maxEntries = scalar &TWiki::Func::extractNameValuePair( $attributes, "max" ) || scalar @pagestats;
Note: See TracChangeset
for help on using the changeset viewer.
