+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | 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$
*
*/
* @param $log_date
*/
public function __construct($log_conn_id, $log_date) {
- $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
- $this->db = $dsn['database'];
+ $dsn = defined('CIVICRM_LOGGING_DSN') ? DB::parseDSN(CIVICRM_LOGGING_DSN) : DB::parseDSN(CIVICRM_DSN);
+ $this->db = $dsn['database'];
$this->log_conn_id = $log_conn_id;
- $this->log_date = $log_date;
+ $this->log_date = $log_date;
}
/**
// 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) {
$dao->reset();
}
break;
+
// custom data tables
case in_array($table, array_keys($ctypes)):
foreach ($row as $id => $changes) {
$inserts = array('id' => '%1');
$updates = array();
- $params = array(1 => array($id, 'Integer'));
+ $params = array(1 => array($id, 'Integer'));
$counter = 2;
foreach ($changes as $field => $value) {
// don’t try reverting a field that’s no longer there
$value = CRM_Utils_Date::isoToMysql($value);
break;
}
- $inserts[$field] = "%$counter";
- $updates[] = "$field = %$counter";
+ $inserts[$field] = "%$counter";
+ $updates[] = "$field = %$counter";
$params[$counter] = array($value, $ctypes[$table][$field]);
$counter++;
}
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
}
}
}
+
}