X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FSMS%2FForm%2FGroup.php;h=45064eac361110f8e9b361e5a97414adc99f76d3;hb=d25dd0ee5e47188c3ea9ad2918f627cfac97ddbd;hp=ca4ac6d06cb6afaf20ca3ee923e3f6fffc5c2e1c;hpb=e913987d303f2c51e60be23820fc8d1031e7eadd;p=civicrm-core.git diff --git a/CRM/SMS/Form/Group.php b/CRM/SMS/Form/Group.php index ca4ac6d06c..45064eac36 100644 --- a/CRM/SMS/Form/Group.php +++ b/CRM/SMS/Form/Group.php @@ -1,7 +1,7 @@ addFormRule(array('CRM_SMS_Form_Group', 'formRule')); $buttons = array( - array('type' => 'next', - 'name' => ts('Next >>'), + array( + 'type' => 'next', + 'name' => ts('Next'), 'spacing' => '                 ', 'isDefault' => TRUE, ), @@ -192,7 +190,10 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { $groups = array(); foreach (array( - 'name', 'group_id', 'is_sms') as $n) { + 'name', + 'group_id', + 'is_sms', + ) as $n) { if (!empty($values[$n])) { $params[$n] = $values[$n]; } @@ -201,9 +202,9 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { $qf_Group_submit = $this->controller->exportValue($this->_name, '_qf_Group_submit'); $this->set('name', $params['name']); - $inGroups = $values['includeGroups']; - $outGroups = $values['excludeGroups']; - $inMailings = $values['includeMailings']; + $inGroups = $values['includeGroups']; + $outGroups = $values['excludeGroups']; + $inMailings = $values['includeMailings']; $outMailings = $values['excludeMailings']; if (is_array($inGroups)) { @@ -237,10 +238,10 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { } } - $session = CRM_Core_Session::singleton(); - $params['groups'] = $groups; + $session = CRM_Core_Session::singleton(); + $params['groups'] = $groups; $params['mailings'] = $mailings; - $ids = array(); + $ids = array(); if ($this->get('mailing_id')) { // don't create a new mass sms if already exists @@ -251,9 +252,11 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { // delete previous includes/excludes, if mailing already existed foreach (array( - 'groups', 'mailings') as $entity) { - $mg = new CRM_Mailing_DAO_MailingGroup(); - $mg->mailing_id = $ids['mailing_id']; + 'groups', + 'mailings', + ) as $entity) { + $mg = new CRM_Mailing_DAO_MailingGroup(); + $mg->mailing_id = $ids['mailing_id']; $mg->entity_table = ($entity == 'groups') ? $groupTableName : $mailingTableName; $mg->find(); while ($mg->fetch()) { @@ -299,7 +302,6 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { /** * Display Name of the form * - * @access public * * @return string */ @@ -308,15 +310,15 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { } /** - * global validation rules for the form + * Global validation rules for the form * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * - * @return array list of errors to be posted back to the form - * @static - * @access public + * @return array + * list of errors to be posted back to the form */ - static function formRule($fields) { + public static function formRule($fields) { $errors = array(); if (isset($fields['includeGroups']) && is_array($fields['includeGroups']) && @@ -344,5 +346,5 @@ class CRM_SMS_Form_Group extends CRM_Contact_Form_Task { return empty($errors) ? TRUE : $errors; } -} +}