X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FLog.php;h=a97eb547326036b25717ff159716365ddcaa34bd;hb=effbca4ff9428542add5a429ab3f492b07d52d92;hp=e5cd6bfa877065f92004a817e9e2b9ba45c38bf0;hpb=e9aca61e8b08d5ae372621c4397108b8f2ec28ba;p=civicrm-core.git diff --git a/CRM/Core/BAO/Log.php b/CRM/Core/BAO/Log.php index e5cd6bfa87..a97eb54732 100644 --- a/CRM/Core/BAO/Log.php +++ b/CRM/Core/BAO/Log.php @@ -23,7 +23,7 @@ | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://civicrm.org/licensing | +--------------------------------------------------------------------+ -*/ + */ /** * @@ -67,11 +67,11 @@ class CRM_Core_BAO_Log extends 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 */ public static function add(&$params) { @@ -86,7 +86,8 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { * @param int $tableID * @param int $userID */ - static function register($contactID, + public static function register( + $contactID, $tableName, $tableID, $userID = NULL @@ -131,11 +132,11 @@ class CRM_Core_BAO_Log extends CRM_Core_DAO_Log { $logData = "$tableName,$tableID"; if (!$log->id) { - $log->entity_table = 'civicrm_contact'; - $log->entity_id = $contactID; - $log->modified_id = $userID; + $log->entity_table = 'civicrm_contact'; + $log->entity_id = $contactID; + $log->modified_id = $userID; $log->modified_date = date("YmdHis"); - $log->data = $logData; + $log->data = $logData; $log->save(); } else { @@ -151,12 +152,12 @@ UPDATE civicrm_log } /** - * Get log record count for a Contact + * Get log record count for a Contact. * * @param int $contactID * - * @return int count of log records - * @static + * @return int + * count of log records */ public static function getContactLogCount($contactID) { $query = "SELECT count(*) FROM civicrm_log @@ -165,11 +166,11 @@ UPDATE civicrm_log } /** - * Function for find out whether to use logging schema entries for contact + * Function for find out whether to use logging schema entries for contact. * summary, instead of normal log entries. * - * @return int report id of Contact Logging Report (Summary) / false - * @static + * @return int + * report id of Contact Logging Report (Summary) / false */ public static function useLoggingReport() { // first check if logging is enabled @@ -196,4 +197,5 @@ UPDATE civicrm_log return FALSE; } + }