From 8716fca0d0248e89b8b2410acc6d405732bad6e8 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak <alec@alec.pl> Date: Sun, 13 Sep 2015 03:35:44 -0400 Subject: [PATCH] Small improvements --- program/steps/mail/func.inc | 2 +- program/steps/mail/show.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 9feb767..920eb80 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -773,7 +773,7 @@ // get default addressbook, like in addcontact.inc $CONTACTS = $RCMAIL->get_address_book(-1, true); - if ($CONTACTS) { + if ($CONTACTS && $message->sender['mailto']) { $result = $CONTACTS->search('email', $message->sender['mailto'], 1, false); if ($result->count) { $message->set_safe(true); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index af43fc8..e5bfcf0 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -329,7 +329,7 @@ $CONTACTS = $RCMAIL->get_address_book(-1, true); if (is_object($CONTACTS)) { - $existing = $CONTACTS->search('email', $email, true, false); + $existing = $CONTACTS->search('email', $email, 1, false); if ($existing->count) { return true; } -- Gitblit v1.9.1