Properly support mailing lists, with actual testing!
This commit is contained in:
6
resources/sql/patches/024.mlistkeys.sql
Normal file
6
resources/sql/patches/024.mlistkeys.sql
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
ALTER TABLE phabricator_metamta.metamta_mailinglist
|
||||||
|
ADD UNIQUE KEY (email);
|
||||||
|
|
||||||
|
ALTER TABLE phabricator_metamta.metamta_mailinglist
|
||||||
|
ADD UNIQUE KEY (name);
|
||||||
|
|
||||||
@@ -226,7 +226,8 @@ class DifferentialCommitMessage {
|
|||||||
|
|
||||||
if ($need_mail) {
|
if ($need_mail) {
|
||||||
$mail = id(new PhabricatorMetaMTAMailingList())->loadAllWhere(
|
$mail = id(new PhabricatorMetaMTAMailingList())->loadAllWhere(
|
||||||
'email in (%Ls)',
|
'(email in (%Ls)) OR (name IN (%Ls))',
|
||||||
|
$need_mail,
|
||||||
$need_mail);
|
$need_mail);
|
||||||
$mail = mpull($mail, 'getPHID', 'getName') +
|
$mail = mpull($mail, 'getPHID', 'getName') +
|
||||||
mpull($mail, 'getPHID', 'getEmail');
|
mpull($mail, 'getPHID', 'getEmail');
|
||||||
|
|||||||
Reference in New Issue
Block a user