CRM-14037 fix - Class 'CRM_Activity_BAO_Contact' not found Activity.php /civicrm...
authormonishdeb <monish.deb@webaccess.co.in>
Mon, 6 Jan 2014 15:21:07 +0000 (20:51 +0530)
committermonishdeb <monish.deb@webaccess.co.in>
Mon, 6 Jan 2014 15:21:07 +0000 (20:51 +0530)
http://issues.civicrm.org/jira/browse/CRM-14037

CRM/Activity/BAO/Activity.php
CRM/Contact/Page/View/Email.php [deleted file]
CRM/Contact/Page/View/SMS.php [deleted file]
CRM/Upgrade/TwoTwo/Form/Step3.php

index 8ab5ad2e29925b609f4ef6e298c36f86fdabdefe..684fc06bfc116f8f06adbcda4c1092b292200afa 100644 (file)
@@ -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 (file)
index 99065b7..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
- |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-/**
- * Dummy page for details of Email
- *
- */
-class CRM_Contact_Page_View_Email extends CRM_Core_Page {
-
-  /**
-   * Run the page.
-   *
-   * This method is called after the page is created.
-   *
-   * @return void
-   * @access public
-   *
-   */
-  function run() {
-    // get the callback, module and activity id
-    $action = CRM_Utils_Request::retrieve('action', 'String', $this, FALSE, 'browse' );
-    $id = CRM_Utils_Request::retrieve('id', 'Positive', $this );
-
-    $dao                = new CRM_Core_DAO_ActivityHistory();
-    $dao->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 (file)
index 48ede7f..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-/*
- +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
- +--------------------------------------------------------------------+
- | This file is a part of CiviCRM.                                    |
- |                                                                    |
- | CiviCRM is free software; you can copy, modify, and distribute it  |
- | under the terms of the GNU Affero General Public License           |
- | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
- |                                                                    |
- | CiviCRM is distributed in the hope that it will be useful, but     |
- | WITHOUT ANY WARRANTY; without even the implied warranty of         |
- | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
- | See the GNU Affero General Public License for more details.        |
- |                                                                    |
- | You should have received a copy of the GNU Affero General Public   |
- | License and the CiviCRM Licensing Exception along                  |
- | with this program; if not, contact CiviCRM LLC                     |
- | at info[AT]civicrm[DOT]org. If you have questions about the        |
- | GNU Affero General Public License or the licensing of CiviCRM,     |
- | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
- +--------------------------------------------------------------------+
-*/
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
- *
- */
-
-/**
- * Dummy page for details of SMS
- *
- */
-class CRM_Contact_Page_View_SMS extends CRM_Core_Page {
-
-  /**
-   * Run the page.
-   *
-   * This method is called after the page is created.
-   *
-   * @return void
-   * @access public
-   *
-   */
-  function run() {
-    // get the callback, module and activity id
-    $action = CRM_Utils_Request::retrieve('action', 'String',
-      $this, FALSE, 'browse'
-    );
-    $id = CRM_Utils_Request::retrieve('id', 'Positive',
-      $this
-    );
-
-    $dao                = new CRM_Core_DAO_ActivityHistory();
-    $dao->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();
-  }
-}
-
index f3f45079036214679f624e661b93dffb08aff41f..544885bd9344ee306259f78d821aeb160575c3c3 100644 (file)
@@ -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();