projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4887 from pratikshad/broken-webtest
[civicrm-core.git]
/
CRM
/
Core
/
BAO
/
Email.php
diff --git
a/CRM/Core/BAO/Email.php
b/CRM/Core/BAO/Email.php
index e5ee11cb204d3aff96aa0ba6f2caeb25cc1df2b7..7b459fbfe57745a141d6cbf92b7afe0b3706adbb 100644
(file)
--- a/
CRM/Core/BAO/Email.php
+++ b/
CRM/Core/BAO/Email.php
@@
-64,7
+64,8
@@
class CRM_Core_BAO_Email extends CRM_Core_DAO_Email {
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
*
- * @return object CRM_Core_BAO_Email object on success, null otherwise
+ * @return object
+ * CRM_Core_BAO_Email object on success, null otherwise
* @static
*/
public static function add(&$params) {
* @static
*/
public static function add(&$params) {
@@
-90,7
+91,7
@@
UPDATE civicrm_email
SET is_bulkmail = 0
WHERE contact_id = {$params['contact_id']}
";
SET is_bulkmail = 0
WHERE contact_id = {$params['contact_id']}
";
- if
($hook == 'edit')
{
+ if
($hook == 'edit')
{
$sql .= " AND id <> {$params['id']}";
}
CRM_Core_DAO::executeQuery($sql);
$sql .= " AND id <> {$params['id']}";
}
CRM_Core_DAO::executeQuery($sql);
@@
-132,7
+133,8
@@
WHERE contact_id = {$params['contact_id']}
*
* @param bool $updateBlankLocInfo
*
*
* @param bool $updateBlankLocInfo
*
- * @return array the array of email id's
+ * @return array
+ * the array of email id's
* @static
*/
public static function allEmails($id, $updateBlankLocInfo = FALSE) {
* @static
*/
public static function allEmails($id, $updateBlankLocInfo = FALSE) {
@@
-160,8
+162,8
@@
ORDER BY civicrm_email.is_primary DESC, email_id ASC ";
);
$emails = $values = array();
);
$emails = $values = array();
- $dao
= CRM_Core_DAO::executeQuery($query, $params);
- $count
= 1;
+ $dao = CRM_Core_DAO::executeQuery($query, $params);
+ $count = 1;
while ($dao->fetch()) {
$values = array(
'locationType' => $dao->locationType,
while ($dao->fetch()) {
$values = array(
'locationType' => $dao->locationType,
@@
-187,9
+189,10
@@
ORDER BY civicrm_email.is_primary DESC, email_id ASC ";
*
* @param array $entityElements
* The array containing entity_id and.
*
* @param array $entityElements
* The array containing entity_id and.
- * entity_table name
+ *
entity_table name
*
*
- * @return array the array of email id's
+ * @return array
+ * the array of email id's
* @static
*/
public static function allEntityEmails(&$entityElements) {
* @static
*/
public static function allEntityEmails(&$entityElements) {
@@
-266,8
+269,8
@@
AND reset_date IS NULL
";
if (CRM_Core_DAO::singleValueQuery($sql, $params)) {
//set reset date only if it is not set and if hold date is set
";
if (CRM_Core_DAO::singleValueQuery($sql, $params)) {
//set reset date only if it is not set and if hold date is set
- $email->on_hold
= FALSE;
- $email->hold_date
= 'null';
+ $email->on_hold = FALSE;
+ $email->hold_date = 'null';
$email->reset_date = date('YmdHis');
}
}
$email->reset_date = date('YmdHis');
}
}
@@
-283,12
+286,13
@@
AND reset_date IS NULL
* Build From Email as the combination of all the email ids of the logged in user and
* the domain email id
*
* Build From Email as the combination of all the email ids of the logged in user and
* the domain email id
*
- * @return array an array of email ids
+ * @return array
+ * an array of email ids
* @static
*/
public static function getFromEmail() {
* @static
*/
public static function getFromEmail() {
- $session
= CRM_Core_Session::singleton();
- $contactID
= $session->get('userID');
+ $session = CRM_Core_Session::singleton();
+ $contactID = $session->get('userID');
$fromEmailValues = array();
// add all configured FROM email addresses
$fromEmailValues = array();
// add all configured FROM email addresses