projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Minor tidyup of api3 completetransaction; plus comments
[civicrm-core.git]
/
api
/
v3
/
MailingContact.php
diff --git
a/api/v3/MailingContact.php
b/api/v3/MailingContact.php
index b3f2d8bb2608234716260d5a95d40f343820564c..2ef5194da77674e0f6d8aff6f79fce69ba2b503c 100644
(file)
--- a/
api/v3/MailingContact.php
+++ b/
api/v3/MailingContact.php
@@
-43,6
+43,9
@@
function _civicrm_api3_mailing_contact_getresults($params, $count) {
}
$options = _civicrm_api3_get_options_from_params($params, TRUE, 'contribution', 'get');
$fnName = '_civicrm_api3_mailing_contact_get_' . strtolower($params['type']);
}
$options = _civicrm_api3_get_options_from_params($params, TRUE, 'contribution', 'get');
$fnName = '_civicrm_api3_mailing_contact_get_' . strtolower($params['type']);
+ if (!function_exists($fnName)) {
+ throw new API_Exception('Invalid mailing type: ' . $params['type']);
+ }
return $fnName(
$params['contact_id'],
$options['offset'],
return $fnName(
$params['contact_id'],
$options['offset'],
@@
-81,13
+84,13
@@
function _civicrm_api3_mailing_contact_get_spec(&$params) {
* Helper function for mailing contact queries.
*
* @param int $contactID
* Helper function for mailing contact queries.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $selectFields
- * @param $fromClause
- * @param $whereClause
- * @param $sort
- * @param $getCount
+ * @param
int
$offset
+ * @param
int
$limit
+ * @param
array|null
$selectFields
+ * @param
string|null
$fromClause
+ * @param
string|null
$whereClause
+ * @param
string|null
$sort
+ * @param
bool
$getCount
*
* @return array
*/
*
* @return array
*/
@@
-193,10
+196,10
@@
LIMIT %2, %3
* Get delivered mailing contacts.
*
* @param int $contactID
* Get delivered mailing contacts.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param
int
$offset
+ * @param
int
$limit
+ * @param
string|null
$sort
+ * @param
bool
$getCount
*
* @return array
*/
*
* @return array
*/
@@
-234,10
+237,10
@@
AND meb.id IS NULL
* Get bounced mailing contact records.
*
* @param int $contactID
* Get bounced mailing contact records.
*
* @param int $contactID
- * @param $offset
- * @param $limit
- * @param $sort
- * @param $getCount
+ * @param
int
$offset
+ * @param
int
$limit
+ * @param
string|null
$sort
+ * @param
bool
$getCount
*
* @return array
*/
*
* @return array
*/