CRM-15434 - Fix mailing search doesn't work in non-English languages
authorelcapo <mail@carloscapote.com>
Thu, 9 Oct 2014 13:45:31 +0000 (15:45 +0200)
committerelcapo <mail@carloscapote.com>
Thu, 9 Oct 2014 13:45:31 +0000 (15:45 +0200)
CRM/Mailing/Form/Search.php

index d34df37c0d97d51e761b3054d84c6014011e1c45..bd8e4388a55f1223b0bfb531d4c3375dc298323f 100644 (file)
@@ -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);