From e6c5d6c8ae5f17aa36e172974e30ba1a8842f7bc Mon Sep 17 00:00:00 2001 From: epriestley Date: Sun, 10 Apr 2011 10:16:14 -0700 Subject: [PATCH] Properly support mailing lists, with actual testing! --- resources/sql/patches/024.mlistkeys.sql | 6 ++++++ .../parser/commitmessage/DifferentialCommitMessage.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 resources/sql/patches/024.mlistkeys.sql diff --git a/resources/sql/patches/024.mlistkeys.sql b/resources/sql/patches/024.mlistkeys.sql new file mode 100644 index 0000000000..57e8099937 --- /dev/null +++ b/resources/sql/patches/024.mlistkeys.sql @@ -0,0 +1,6 @@ +ALTER TABLE phabricator_metamta.metamta_mailinglist + ADD UNIQUE KEY (email); + +ALTER TABLE phabricator_metamta.metamta_mailinglist + ADD UNIQUE KEY (name); + diff --git a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php index 770dfa23df..726b7d1ac3 100644 --- a/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php +++ b/src/applications/differential/parser/commitmessage/DifferentialCommitMessage.php @@ -226,7 +226,8 @@ class DifferentialCommitMessage { if ($need_mail) { $mail = id(new PhabricatorMetaMTAMailingList())->loadAllWhere( - 'email in (%Ls)', + '(email in (%Ls)) OR (name IN (%Ls))', + $need_mail, $need_mail); $mail = mpull($mail, 'getPHID', 'getName') + mpull($mail, 'getPHID', 'getEmail');