Commit 56244672 authored by Vincent Pelletier's avatar Vincent Pelletier

Refine module vs. document detection heuristic.

Module listbox links to documents do not have a trailing slash, which skews
results for normal usage patterns.
parent 6ecf19d6
...@@ -283,7 +283,9 @@ class ERP5SiteStats(GenericSiteStats): ...@@ -283,7 +283,9 @@ class ERP5SiteStats(GenericSiteStats):
module = split[0] module = split[0]
if module.endswith('_module'): if module.endswith('_module'):
super(ERP5SiteStats, self).accumulate(match, url_match, date) super(ERP5SiteStats, self).accumulate(match, url_match, date)
self.module[module][len(split) > 2][date].accumulate(match) self.module[module][
len(split) > 1 and (split[1] != 'view' and '_view' not in split[1])
][date].accumulate(match)
else: else:
self.no_module[date].accumulate(match) self.no_module[date].accumulate(match)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment