<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
class CRM_Core_BAO_Log extends CRM_Core_DAO_Log {
static $_processed = NULL;
- static function &lastModified($id, $table = 'civicrm_contact') {
+ /**
+ * @param int $id
+ * @param string $table
+ *
+ * @return array|null
+ */
+ public static function &lastModified($id, $table = 'civicrm_contact') {
$log = new CRM_Core_DAO_Log();
}
/**
- * add log to civicrm_log table
+ * Add log to civicrm_log table
*
- * @param array $params array of name-value pairs of log table.
+ * @param array $params
+ * Array of name-value pairs of log table.
*
* @static
*/
- static function add(&$params) {
+ public static function add(&$params) {
$log = new CRM_Core_DAO_Log();
$log->copyValues($params);
$log->save();
}
- static function register($contactID,
+ /**
+ * @param int $contactID
+ * @param string $tableName
+ * @param int $tableID
+ * @param int $userID
+ */
+ static function register(
+ $contactID,
$tableName,
$tableID,
$userID = NULL
}
/**
- * Function to get log record count for a Contact
- *
- * @param $contactID
+ * Get log record count for a Contact
*
- * @internal param int $contactId Contact ID
+ * @param int $contactID
*
* @return int count of log records
- * @access public
* @static
*/
- static function getContactLogCount($contactID) {
+ public static function getContactLogCount($contactID) {
$query = "SELECT count(*) FROM civicrm_log
WHERE civicrm_log.entity_table = 'civicrm_contact' AND civicrm_log.entity_id = {$contactID}";
return CRM_Core_DAO::singleValueQuery($query);
* summary, instead of normal log entries.
*
* @return int report id of Contact Logging Report (Summary) / false
- * @access public
* @static
*/
- static function useLoggingReport() {
+ public static function useLoggingReport() {
// first check if logging is enabled
$config = CRM_Core_Config::singleton();
if (!$config->logging) {
return FALSE;
}
}
-