ponymail-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject [1/3] incubator-ponymail git commit: remove redundant counting
Date Sun, 04 Jun 2017 14:47:02 GMT
Repository: incubator-ponymail
Updated Branches:
  refs/heads/master c58b23127 -> 5d9f505b7


remove redundant counting


Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/33d68285
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/33d68285
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/33d68285

Branch: refs/heads/master
Commit: 33d682850d79879d1c588256db5941ed9330d8e3
Parents: c58b231
Author: Daniel Gruno <humbedooh@apache.org>
Authored: Sun Jun 4 16:41:34 2017 +0200
Committer: Daniel Gruno <humbedooh@apache.org>
Committed: Sun Jun 4 16:41:34 2017 +0200

----------------------------------------------------------------------
 site/api/stats.lua | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/33d68285/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index c2ddee3..0c14932 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -567,8 +567,6 @@ function handle(r)
         dhh = doc.hits.hits
     end
 
-    local h = 0
-    
     -- Debug time point 5
     if DEBUG then
       table.insert(t, r:clock() - tnow)
@@ -581,8 +579,6 @@ function handle(r)
         local email = v._source
         if aaa.canAccessDoc(r, email, account) then
 
-            h = h + 1
-
             local eml = utils.extractCanonEmail(email.from)
             local gravatar = r:md5(eml:lower())
             email.gravatar = gravatar
@@ -737,7 +733,7 @@ function handle(r)
     listdata.lastMonth = datespan.lastMonth
     listdata.list = listraw:gsub("^([^.]+)%.", "%1@"):gsub("[<>]+", "")
     listdata.emails = emls
-    listdata.hits = h
+    listdata.hits = #emls
     listdata.searchlist = listraw
     listdata.participants = top10
     listdata.cloud = cloud


Mime
View raw message