X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FMailingAB.php;h=0661d49f48f0565d7960493ce8bacc69f21c53f7;hb=8319cf114f26e04bb7586cd253af9d97b8cb3859;hp=8b66a562ea1f0dbb106448b1ca269d16a5ca6618;hpb=e44431fee3e48e503e8500ace6206f2d25c8956f;p=civicrm-core.git diff --git a/api/v3/MailingAB.php b/api/v3/MailingAB.php index 8b66a562ea..0661d49f48 100755 --- a/api/v3/MailingAB.php +++ b/api/v3/MailingAB.php @@ -1,8 +1,7 @@ array( 'count' => CRM_Mailing_Event_BAO_Opened::getTotalCount($mailingAB[$column], NULL, TRUE, $toDate), - 'time' => CRM_Utils_Date::customFormat($toDate) - ) + 'time' => CRM_Utils_Date::customFormat($toDate), + ), ); break; + case 'total unique clicks': $result = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows($mailingAB['mailing_id_a'], NULL, TRUE, 0, 1, "civicrm_mailing_event_trackable_url_open.time_stamp ASC"); $startDate = CRM_Utils_Date::processDate($result[0]['date']); @@ -235,10 +233,11 @@ function civicrm_api3_mailing_a_b_graph_stats($params) { $graphStats[$name] = array( $params['split_count_select'] => array( 'count' => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], NULL, FALSE, NULL, $toDate), - 'time' => CRM_Utils_Date::customFormat($toDate) - ) + 'time' => CRM_Utils_Date::customFormat($toDate), + ), ); break; + case 'total clicks on a particular link': if (empty($params['target_url'])) { throw new API_Exception("Provide url to get stats result for total clicks on a particular link"); @@ -254,8 +253,8 @@ function civicrm_api3_mailing_a_b_graph_stats($params) { $graphStats[$name] = array( $params['split_count_select'] => array( 'count' => CRM_Mailing_Event_BAO_TrackableURLOpen::getTotalCount($params['mailing_id'], NULL, FALSE, $url_id, $toDate), - 'time' => CRM_Utils_Date::customFormat($toDate) - ) + 'time' => CRM_Utils_Date::customFormat($toDate), + ), ); break; }