You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/12/17 09:21:54 UTC

[1/2] incubator-ponymail git commit: redundant matching of same string

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master eb81ad56e -> aaab3d7ef


redundant matching of same string

This fixes #117

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

Branch: refs/heads/master
Commit: 4c39715245618c09513239daba0e447e9479b8f3
Parents: eb81ad5
Author: Sebb <se...@apache.org>
Authored: Sat Dec 17 01:52:11 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Sat Dec 17 01:52:11 2016 +0000

----------------------------------------------------------------------
 CHANGELOG.md       | 3 ++-
 site/api/stats.lua | 8 ++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4c397152/CHANGELOG.md
----------------------------------------------------------------------
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5a83db..0eb35a0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -74,7 +74,8 @@
 - unnecessary double-checking of window.sessionStorage in ponymail.js (#193)
 - lua scripts not using cross.contentType() compatibility function (#218)
 - code assumes that subject is always present in an e-mail (#149)
-- elastic.lua:getHeaders uses different sort field #146
+- elastic.lua:getHeaders uses different sort field (#146)
+- redundant matching of same string (#117)
 
 ## CHANGES in 0.9b:
 

http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/4c397152/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 79d41c7..185bb8d 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -208,7 +208,7 @@ function handle(r)
         get.s = get.d
         get.e = get.d
     end
-    if get.d and get.d:match("lte=.+") then
+    if get.d then
         local lte = get.d:match("lte=([0-9]+[wMyd])")
         if lte then
             daterange.lte = "now+1d"
@@ -216,7 +216,7 @@ function handle(r)
             daterange.gt = nil
         end
     end
-    if get.d and get.d:match("gte=.+") then
+    if get.d then
         local gte = get.d:match("gte=([0-9]+[wMyd])")
         if gte then
             daterange.gte = nil
@@ -224,14 +224,14 @@ function handle(r)
             daterange.lte = "now-" .. gte
         end
     end
-    if get.d and get.d:match("dfr=.+") then
+    if get.d then
         local y,m,d = get.d:match("dfr=(%d+)%-(%d+)%-(%d+)")
         if y and m and d then
             daterange.gte = ("%04u/%02u/%02u 00:00:00"):format(y,m,d)
             daterange.gt = nil
         end
     end
-    if get.d and get.d:match("dto=.+") then
+    if get.d then
         local y,m,d = get.d:match("dto=(%d+)%-(%d+)%-(%d+)")
         if y and m and d then
             daterange.lte = ("%04u/%02u/%02u 23:59:59"):format(y,m,d)


[2/2] incubator-ponymail git commit: Already included in attachments.mbox

Posted by se...@apache.org.
Already included in attachments.mbox

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

Branch: refs/heads/master
Commit: aaab3d7ef973fcb5890a9ea99cd9e3324b55c4db
Parents: 4c39715
Author: Sebb <se...@apache.org>
Authored: Sat Dec 17 09:21:41 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Sat Dec 17 09:21:41 2016 +0000

----------------------------------------------------------------------
 test/resources/pass/emptyattach.mbox | 72 -------------------------------
 1 file changed, 72 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/aaab3d7e/test/resources/pass/emptyattach.mbox
----------------------------------------------------------------------
diff --git a/test/resources/pass/emptyattach.mbox b/test/resources/pass/emptyattach.mbox
deleted file mode 100644
index 08260a5..0000000
--- a/test/resources/pass/emptyattach.mbox
+++ /dev/null
@@ -1,72 +0,0 @@
-From 
-Return-Path: <de...@ponymail.incubator.apache.org>
-X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io
-Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io
-Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183])
-	by cust-asf2.ponee.io (Postfix) with ESMTP id CDA67200BCA
-	for <ar...@cust-asf2.ponee.io>; Mon, 21 Nov 2016 19:14:45 +0100 (CET)
-Received: by cust-asf.ponee.io (Postfix)
-	id CA777160AF9; Mon, 21 Nov 2016 18:14:45 +0000 (UTC)
-Delivered-To: archive-asf-public@cust-asf.ponee.io
-Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
-	by cust-asf.ponee.io (Postfix) with SMTP id 44D48160AEF
-	for <ar...@cust-asf.ponee.io>; Mon, 21 Nov 2016 19:14:45 +0100 (CET)
-Received: (qmail 14810 invoked by uid 500); 21 Nov 2016 18:14:44 -0000
-Mailing-List: contact dev-help@ponymail.incubator.apache.org; run by ezmlm
-Precedence: bulk
-List-Help: <ma...@ponymail.incubator.apache.org>
-List-Unsubscribe: <ma...@ponymail.incubator.apache.org>
-List-Post: <ma...@ponymail.incubator.apache.org>
-List-Id: <dev.ponymail.incubator.apache.org>
-Reply-To: dev@ponymail.incubator.apache.org
-Delivered-To: mailing list dev@ponymail.incubator.apache.org
-Received: (qmail 14799 invoked by uid 99); 21 Nov 2016 18:14:44 -0000
-Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142)
-    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2016 18:14:44 +0000
-Received: from localhost (localhost [127.0.0.1])
-	by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 188291A7BE9
-	for <de...@ponymail.apache.org>; Mon, 21 Nov 2016 18:14:44 +0000 (UTC)
-X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org
-X-Spam-Flag: NO
-X-Spam-Score: -7.019
-X-Spam-Level: 
-X-Spam-Status: No, score=-7.019 tagged_above=-999 required=6.31
-	tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5,
-	RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01,
-	RP_MATCHES_RCVD=-2.999] autolearn=disabled
-Received: from mx1-lw-us.apache.org ([10.40.0.8])
-	by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024)
-	with ESMTP id Zz95hBPFcoFx for <de...@ponymail.apache.org>;
-	Mon, 21 Nov 2016 18:14:43 +0000 (UTC)
-Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
-	by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 416235FDEF
-	for <de...@ponymail.incubator.apache.org>; Mon, 21 Nov 2016 18:14:43 +0000 (UTC)
-Received: (qmail 14783 invoked by uid 99); 21 Nov 2016 18:14:42 -0000
-Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9)
-    by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Nov 2016 18:14:42 +0000
-Received: by minotaur.apache.org (Postfix, from userid 1721)
-	id 873061948D; Mon, 21 Nov 2016 18:14:42 +0000 (UTC)
-Date: Mon, 21 Nov 2016 18:14:42 +0000
-From: Sebb <se...@apache.org>
-To: dev@ponymail.incubator.apache.org
-Subject: Test message with empty attachment 
-Message-ID: <20...@minotaur.apache.org>
-MIME-Version: 1.0
-Content-Type: multipart/mixed; boundary="Dxnq1zWXvFF0Q93v"
-Content-Disposition: inline
-User-Agent: Mutt/1.5.21 (2010-09-15)
-archived-at: Mon, 21 Nov 2016 18:14:46 -0000
-
---Dxnq1zWXvFF0Q93v
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline
-
-Mon 21 Nov 2016 18:14:42 GMT
-
---Dxnq1zWXvFF0Q93v
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: attachment; filename="empty.txt"
-
-
---Dxnq1zWXvFF0Q93v--
-