projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Major changes
[civicrm-core.git]
/
CRM
/
Mailing
/
Event
/
BAO
/
Bounce.php
diff --git
a/CRM/Mailing/Event/BAO/Bounce.php
b/CRM/Mailing/Event/BAO/Bounce.php
old mode 100644
(file)
new mode 100755
(executable)
index
9512830
..
130acf8
--- a/
CRM/Mailing/Event/BAO/Bounce.php
+++ b/
CRM/Mailing/Event/BAO/Bounce.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
3
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-28,7
+28,7
@@
/**
*
* @package CRM
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-129,9
+129,7
@@
class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
* @access public
* @static
*/
* @access public
* @static
*/
- public static function getTotalCount($mailing_id, $job_id = NULL,
- $is_distinct = FALSE
- ) {
+ public static function getTotalCount($mailing_id, $job_id = NULL, $is_distinct = FALSE, $toDate = NULL) {
$dao = new CRM_Core_DAO();
$bounce = self::getTableName();
$dao = new CRM_Core_DAO();
$bounce = self::getTableName();
@@
-150,6
+148,10
@@
class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
ON $job.mailing_id = $mailing.id
WHERE $mailing.id = " . CRM_Utils_Type::escape($mailing_id, 'Integer');
ON $job.mailing_id = $mailing.id
WHERE $mailing.id = " . CRM_Utils_Type::escape($mailing_id, 'Integer');
+ if (!empty($toDate)) {
+ $query .= " AND $bounce.time_stamp <= $toDate";
+ }
+
if (!empty($job_id)) {
$query .= " AND $job.id = " . CRM_Utils_Type::escape($job_id, 'Integer');
}
if (!empty($job_id)) {
$query .= " AND $job.id = " . CRM_Utils_Type::escape($job_id, 'Integer');
}
@@
-230,6
+232,7
@@
class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
$orderBy = "sort_name ASC, {$bounce}.time_stamp DESC";
if ($sort) {
if (is_string($sort)) {
$orderBy = "sort_name ASC, {$bounce}.time_stamp DESC";
if ($sort) {
if (is_string($sort)) {
+ $sort = CRM_Utils_Type::escape($sort, 'String');
$orderBy = $sort;
}
else {
$orderBy = $sort;
}
else {
@@
-265,4
+268,3
@@
class CRM_Mailing_Event_BAO_Bounce extends CRM_Mailing_Event_DAO_Bounce {
return $results;
}
}
return $results;
}
}
-