From 92f201f36b9f1dde35eee1231640f3c3ad2192e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 19 May 2021 09:39:14 +0200 Subject: [PATCH] Add `email` filter to EmailLogList Resolves #4224 --- .../install/files/acp/templates/emailLogList.tpl | 15 +++++++++++++++ .../files/lib/acp/page/EmailLogListPage.class.php | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/wcfsetup/install/files/acp/templates/emailLogList.tpl b/wcfsetup/install/files/acp/templates/emailLogList.tpl index c8f38a838b..13cc8f725f 100644 --- a/wcfsetup/install/files/acp/templates/emailLogList.tpl +++ b/wcfsetup/install/files/acp/templates/emailLogList.tpl @@ -40,6 +40,21 @@ + {if $__wcf->session->getPermission('admin.user.canEditMailAddress')} +
+
+
+ +
+
+ {/if} +
diff --git a/wcfsetup/install/files/lib/acp/page/EmailLogListPage.class.php b/wcfsetup/install/files/lib/acp/page/EmailLogListPage.class.php index e1ae17ab47..a908d08c61 100644 --- a/wcfsetup/install/files/lib/acp/page/EmailLogListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/EmailLogListPage.class.php @@ -61,6 +61,7 @@ class EmailLogListPage extends SortablePage public $filter = [ 'username' => null, 'status' => null, + 'email' => null, ]; /** @@ -105,6 +106,11 @@ class EmailLogListPage extends SortablePage if (!empty($this->filter['status'])) { $this->objectList->getConditionBuilder()->add('status = ?', [$this->filter['status']]); } + if (WCF::getSession()->getPermission('admin.user.canEditMailAddress')) { + if (!empty($this->filter['email'])) { + $this->objectList->getConditionBuilder()->add('recipient = ?', [$this->filter['email']]); + } + } } /** -- 2.20.1