Mass SMS: Limit group selection to mailing groups
authorhighfalutin <highfalutin@users.noreply.github.com>
Sat, 15 Aug 2020 04:15:23 +0000 (21:15 -0700)
committerGitHub <noreply@github.com>
Sat, 15 Aug 2020 04:15:23 +0000 (21:15 -0700)
To populate the selector for mass SMS recipients, the form calls CRM_Core_PseudoConstant::nestedGroup(). However the function call was missing an argument, so all groups were being returned, not just mailing groups as intended. This PR corrects the mistake.

CRM/SMS/Form/Group.php

index 4a53b78852a8bd20957985174364d3f4eef6d1b8..9755626958142e612333687f3f1075af7d85289e 100644 (file)
@@ -102,7 +102,7 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task {
     );
 
     // Get the mailing groups.
-    $groups = CRM_Core_PseudoConstant::nestedGroup('Mailing');
+    $groups = CRM_Core_PseudoConstant::nestedGroup(TRUE, 'Mailing');
 
     // Get the sms mailing list.
     $mailings = CRM_Mailing_PseudoConstant::completed('sms');