From d7f083ac8ef0ce614d23612110a9003aae7615e1 Mon Sep 17 00:00:00 2001 From: monishdeb Date: Mon, 6 Jan 2014 20:51:07 +0530 Subject: [PATCH] CRM-14037 fix - Class 'CRM_Activity_BAO_Contact' not found Activity.php /civicrm/CRM/Activity/BAO line 2366 DLTK Problem http://issues.civicrm.org/jira/browse/CRM-14037 --- CRM/Activity/BAO/Activity.php | 2 +- CRM/Contact/Page/View/Email.php | 107 ------------------------------ CRM/Contact/Page/View/SMS.php | 97 --------------------------- CRM/Upgrade/TwoTwo/Form/Step3.php | 3 +- 4 files changed, 3 insertions(+), 206 deletions(-) delete mode 100644 CRM/Contact/Page/View/Email.php delete mode 100644 CRM/Contact/Page/View/SMS.php diff --git a/CRM/Activity/BAO/Activity.php b/CRM/Activity/BAO/Activity.php index 8ab5ad2e29..684fc06bfc 100644 --- a/CRM/Activity/BAO/Activity.php +++ b/CRM/Activity/BAO/Activity.php @@ -2361,7 +2361,7 @@ INNER JOIN civicrm_option_group grp ON ( grp.id = val.option_group_id AND grp.n //get the assignee contacts. if ($allow) { - $assigneeContacts = CRM_Activity_BAO_Contact::retrieveContactIdsByActivityId($activity->id, $assigneeID); + $assigneeContacts = CRM_Activity_BAO_ActivityContact::retrieveContactIdsByActivityId($activity->id, $assigneeID); foreach ($assigneeContacts as $cnt => $contactId) { if (!CRM_Contact_BAO_Contact_Permission::allow($contactId, $permission)) { $allow = FALSE; diff --git a/CRM/Contact/Page/View/Email.php b/CRM/Contact/Page/View/Email.php deleted file mode 100644 index 99065b7f6e..0000000000 --- a/CRM/Contact/Page/View/Email.php +++ /dev/null @@ -1,107 +0,0 @@ -activity_id = $id; - $dao->activity_type = ts('Email Sent'); - if ($dao->find(TRUE)) { - $cid = $dao->entity_id; - } - - $dao = new CRM_Core_DAO_EmailHistory(); - $dao->id = $id; - - if ($dao->find(TRUE)) { - // get the display name and email for the contact - list($toContactName, $toContactEmail, $toDoNotEmail) = CRM_Contact_BAO_Contact::getContactDetails($cid); - - if (!trim($toContactName)) { - $toContactName = $toContactEmail; - } - - if (trim($toContactEmail)) { - $toContactName = "\"$toContactName\" <$toContactEmail>"; - } - - $this->assign('toName', $toContactName); - - // get the display name and email for the contact - list($fromContactName, $fromContactEmail, $toDoNotEmail) = CRM_Contact_BAO_Contact::getContactDetails($dao->contact_id); - - if (!trim($fromContactEmail)) { - CRM_Core_Error::statusBounce(ts('Your user record does not have a valid email address')); - } - - if (!trim($fromContactName)) { - $fromContactName = $fromContactEmail; - } - - $this->assign('fromName', "\"$fromContactName\" <$fromContactEmail>"); - - $this->assign('sentDate', $dao->sent_date); - $this->assign('subject', $dao->subject); - $this->assign('message', $dao->message); - - // get the display name and images for the contact - list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($dao->contact_id); - - CRM_Utils_System::setTitle($contactImage . ' ' . $displayName); - // also add the cid params to the Menu array - CRM_Core_Menu::addParam('cid', $cid); - } - return parent::run(); - } -} - diff --git a/CRM/Contact/Page/View/SMS.php b/CRM/Contact/Page/View/SMS.php deleted file mode 100644 index 48ede7f26b..0000000000 --- a/CRM/Contact/Page/View/SMS.php +++ /dev/null @@ -1,97 +0,0 @@ -activity_id = $id; - $dao->activity_type = ts('SMS Sent'); - if ($dao->find(TRUE)) { - $cid = $dao->entity_id; - } - - $dao = new CRM_SMS_DAO_History(); - $dao->id = $id; - - if ($dao->find(TRUE)) { - $this->assign('fromName', - CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', - $dao->contact_id, - 'display_name' - ) - ); - $this->assign('toName', - CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Contact', - $cid, - 'display_name' - ) - ); - $this->assign('sentDate', $dao->sent_date); - $this->assign('message', $dao->message); - - // get the display name and images for the contact - list($displayName, $contactImage) = CRM_Contact_BAO_Contact::getDisplayAndImage($dao->contact_id); - - CRM_Utils_System::setTitle($contactImage . ' ' . $displayName); - - // also add the cid params to the Menu array - CRM_Core_Menu::addParam('cid', $cid); - } - return parent::run(); - } -} - diff --git a/CRM/Upgrade/TwoTwo/Form/Step3.php b/CRM/Upgrade/TwoTwo/Form/Step3.php index f3f4507903..544885bd93 100644 --- a/CRM/Upgrade/TwoTwo/Form/Step3.php +++ b/CRM/Upgrade/TwoTwo/Form/Step3.php @@ -287,7 +287,8 @@ ALTER TABLE `civicrm_domain` $domain->config_backend = serialize($backendValues); $domain->save(); - $mailingDomain = new CRM_Core_DAO_Preferences(); + $sql = 'SELECT id, mailing_backend FROM civicrm_preferences'; + $mailingDomain = CRM_Core_DAO::executeQuery($sql); $mailingDomain->find(TRUE); $mailingDomain->mailing_backend = serialize($mailerValues); $mailingDomain->save(); -- 2.25.1