From: elcapo Date: Thu, 9 Oct 2014 13:45:31 +0000 (+0200) Subject: CRM-15434 - Fix mailing search doesn't work in non-English languages X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d4ad3b222ae16c68a59373916597feebad0919bc;p=civicrm-core.git CRM-15434 - Fix mailing search doesn't work in non-English languages --- diff --git a/CRM/Mailing/Form/Search.php b/CRM/Mailing/Form/Search.php index d34df37c0d..bd8e4388a5 100644 --- a/CRM/Mailing/Form/Search.php +++ b/CRM/Mailing/Form/Search.php @@ -54,9 +54,14 @@ class CRM_Mailing_Form_Search extends CRM_Core_Form { CRM_Campaign_BAO_Campaign::addCampaignInComponentSearch($this); - $statusVals = array(ts('Scheduled'), ts('Complete'), ts('Running'), ts('Canceled')); - foreach ($statusVals as $status) { - $this->addElement('checkbox', "mailing_status[$status]", NULL, $status); + // CRM-15434 - Fix mailing search by status in non-English languages + $statusVals = array( + 'Scheduled' => ts('Scheduled'), + 'Complete' => ts('Complete'), + 'Running' => ts('Running'), + 'Canceled' => ts('Canceled')); + foreach ($statusVals as $statusId => $statusName) { + $this->addElement('checkbox', "mailing_status[$statusId]", NULL, $statusName); } $this->addElement('checkbox', 'status_unscheduled', NULL, ts('Draft / Unscheduled')); $this->addYesNo('is_archived', ts('Mailing is Archived'), TRUE);