You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by uc...@apache.org on 2016/09/16 12:40:37 UTC
incubator-ponymail git commit: Only count hits if user can access
email
Repository: incubator-ponymail
Updated Branches:
refs/heads/count-if-allowed [created] bd27ae9a5
Only count hits if user can access email
Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/bd27ae9a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/bd27ae9a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/bd27ae9a
Branch: refs/heads/count-if-allowed
Commit: bd27ae9a5099b1591d3d2c27a2c2c631350553ca
Parents: e8e5b9f
Author: Ulises Cervino Beresi <uc...@apache.org>
Authored: Fri Sep 16 13:37:15 2016 +0100
Committer: Ulises Cervino Beresi <uc...@apache.org>
Committed: Fri Sep 16 13:37:15 2016 +0100
----------------------------------------------------------------------
site/api/stats.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/bd27ae9a/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 9107287..078885c 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -572,7 +572,7 @@ function handle(r)
dhh = doc.hits.hits
end
- local h = #dhh
+ local h = 0
-- Debug time point 7
table.insert(t, r:clock() - tnow)
@@ -606,6 +606,8 @@ function handle(r)
end
end
if canUse then
+
+ h = h + 1
if not config.slow_count then
local eml = email.from:match("<(.-)>") or email.from:match("%S+@%S+") or nil