Merge pull request #6360 from monishdeb/search-fixes-master
[civicrm-core.git] / CRM / Logging / Reverter.php
index 4ec19735afacfc2d628d2f2dbdba0570daf081bf..9b95118a3268f9587e80aa7257ea7dd0f4caf7ee 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.6                                                |
+ | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
  | 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-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
@@ -116,7 +116,7 @@ class CRM_Logging_Reverter {
         // DAO-based tables
 
         case in_array($table, array_keys($daos)):
-          $dao = new $daos[$table];
+          $dao = new $daos[$table]();
           foreach ($row as $id => $changes) {
             $dao->id = $id;
             foreach ($changes as $field => $value) {
@@ -189,7 +189,7 @@ class CRM_Logging_Reverter {
         return;
       }
 
-      $dao = new CRM_Contact_DAO_Contact;
+      $dao = new CRM_Contact_DAO_Contact();
       $dao->id = $cid;
       if ($dao->find(TRUE)) {
         // CRM-8102: MySQL can’t parse its own dates
@@ -199,4 +199,5 @@ class CRM_Logging_Reverter {
       }
     }
   }
+
 }