if ($groupType == 'Include') {
$includeSmartGroupIDs[] = $groupDAO->id;
}
- else {
+ elseif ($groupType == 'Exclude') {
$excludeSmartGroupIDs[] = $groupDAO->id;
}
+ //NOTE: Do nothing for base
}
}
$query = $query->select($selectClause)->orderBy($orderBy);
if (!CRM_Utils_System::isNull($aclFrom)) {
- $query = $query->from('acl', $aclFrom);
+ $query = $query->join('acl', $aclFrom);
}
if (!CRM_Utils_System::isNull($aclWhere)) {
$query = $query->where($aclWhere);
}
// add trailing quote since we've gobbled it up in a previous regex
// function getPatterns, line 431
- if (preg_match('/^href[ ]*=[ ]*\'/', $url)) {
+ if (preg_match("/^href[ ]*=[ ]*'.*[^']$/", $url)) {
$url .= "'";
}
- elseif (preg_match('/^href[ ]*=[ ]*\"/', $url)) {
+ elseif (preg_match('/^href[ ]*=[ ]*".*[^"]$/', $url)) {
$url .= '"';
}
$data = $url;
}
$mailing->domain_id = CRM_Utils_Array::value('domain_id', $params, CRM_Core_Config::domainID());
- if (!isset($params['replyto_email']) &&
+ if (((!$id && empty($params['replyto_email'])) || !isset($params['replyto_email'])) &&
isset($params['from_email'])
) {
$params['replyto_email'] = $params['from_email'];
// get all the groups that this user can access
// if they dont have universal access
$groupNames = civicrm_api3('Group', 'get', array(
- 'is_active' => 1,
'check_permissions' => TRUE,
'return' => array('title', 'id'),
'options' => array('limit' => 0),
}
/**
- * Delete Jobss and all its associated records
- * related to test Mailings
+ * @deprecated
+ * Use CRM_Mailing_BAO_MailingJob::del($id)
*
* @param int $id
* Id of the Job to delete.
CRM_Core_Error::fatal();
}
- $dao = new CRM_Mailing_BAO_MailingJob();
- $dao->id = $id;
- $dao->delete();
+ \Civi::log('This function is deprecated, use CRM_Mailing_BAO_MailingJob::del instead', ['civi.tag' => 'deprecated']);
+
+ CRM_Mailing_BAO_MailingJob::del($id);
}
/**