CRM-16063 - CiviMail - Don't fetch unused fields/options
authorColeman Watts <coleman@civicrm.org>
Fri, 6 Mar 2015 22:31:36 +0000 (17:31 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 6 Mar 2015 22:31:36 +0000 (17:31 -0500)
CRM/Mailing/Info.php

index 73c46ed109bb31c99e2d130fb64bcc802d594398..3b55e9ce403ed99c479ded3a2e418b9e5b3b1e69 100644 (file)
@@ -96,10 +96,8 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
     $contactID = $session->get('userID');
 
     $params = array('options' => array('limit' => 0));
-    $civiMails = civicrm_api3('Mailing', 'get', $params);
+    $civiMails = civicrm_api3('Mailing', 'get', $params + array('return' => array('id', 'name', 'scheduled_date')));
     $campNames = civicrm_api3('Campaign', 'get', $params);
-    $mailingabNames = civicrm_api3('MailingAB', 'get', $params);
-    $mailStatus = civicrm_api3('MailingJob', 'get', $params);
     $groupNames = civicrm_api3('Group', 'get', $params);
     $headerfooterList = civicrm_api3('MailingComponent', 'get', $params);
 
@@ -120,10 +118,8 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
     ));
     CRM_Core_Resources::singleton()->addSetting(array(
       'crmMailing' => array(
-        'mailingabNames' => array_values($mailingabNames['values']),
         'civiMails' => array_values($civiMails['values']),
         'campNames' => array_values($campNames['values']),
-        'mailStatus' => array_values($mailStatus['values']),
         'groupNames' => array_values($groupNames['values']),
         'headerfooterList' => array_values($headerfooterList['values']),
         'mesTemplate' => array_values($mesTemplate['values']),