/** * @param bool $created */ public function log($created = FALSE) { static $cid = NULL; if (!$this->getLog()) { return; } if (!$cid) { $session = CRM_Core_Session::singleton(); $cid = $session->get('userID'); } // return is we dont have handle to FK if (!$cid) { return; } $dao = new CRM_Core_DAO_Log(); $dao->entity_table = $this->getTableName(); $dao->entity_id = $this->id; $dao->modified_id = $cid; $dao->modified_date = date("YmdHis"); $dao->insert(); }
function log($created = false) { static $cid = null; if (!$this->getLog()) { return; } if (!$cid) { $session =& CRM_Core_Session::singleton(); $cid = $session->get('userID'); } // return is we dont have handle to FK if (!$cid) { return; } require_once 'CRM/Core/DAO/Log.php'; $dao = new CRM_Core_DAO_Log(); $dao->entity_table = $this->getTableName(); $dao->entity_id = $this->id; $dao->modified_id = $cid; $dao->modified_date = date("YmdHis"); $dao->insert(); }