Bug: statistics script greps in multiple webs
The script
statistics greps in more than on web if you
have two very similar web names.
It could be fixed very easily in the script
statistics.
There are some lines like this one:
my @list = grep( /^\|[^\|]*\|[^\|]*\| view \| $webName/, @theLogList );
These lines should be changed into
my @list = grep( /^\|[^\|]*\|[^\|]*\| view \| $webName\./, @theLogList );
The
\. after the
$webName will catch only lines with the full web name we are looking for.
Test case
- Build a web "SE"
- Build a web "SEAL"
- create a statisitc for the "SE" web, it will also have the actions done in the "SEAL" web
Environment
| TWiki version: |
Dec 2001 |
| TWiki plugins: |
None |
| Server OS: |
Linux |
| Web server: |
Apache |
| Perl version: |
5.00502 |
| Client OS: |
Windows |
| Web Browser: |
IE 5.5 |
--
StefanScherer - 25 Feb 2002
Follow up
Fix record
As it turns out, I fixed this independently as part of rewriting this script for
StatisticsUsingLessResources, but no doubt I will introduce new and more interesting bugs...
--
RichardDonkin - 04 Mar 2002
I just checked this is correct in the new script's regex, so I'm marking this resolved (will go into
TWikiAlphaRelease soon). You can test the script at
StatisticsUsingLessResources (or wait a day or two if you want a version with fewer module dependencies).
--
RichardDonkin - 22 Mar 2002