1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/13468] Update calls to add_log()

PHPBB3-13468
This commit is contained in:
Gaëtan Muller
2015-01-05 22:21:31 +01:00
parent e2786c37dc
commit 7fc586080b
58 changed files with 568 additions and 329 deletions

View File

@@ -27,7 +27,7 @@ class log implements \phpbb\log\log_interface
/**
* An array with the disabled log types. Logs of such types will not be
* added when add_log() is called.
* added when add() is called.
* @var array
*/
protected $disabled_types;
@@ -223,14 +223,14 @@ class log implements \phpbb\log\log_interface
return false;
}
if ($log_time == false)
if ($log_time === false)
{
$log_time = time();
}
$sql_ary = array(
'user_id' => $user_id,
'log_ip' => $log_ip,
'user_id' => $user_id ? (int) $user_id : ANONYMOUS,
'log_ip' => empty($log_ip) ? '' : $log_ip,
'log_time' => $log_time,
'log_operation' => $log_operation,
);

View File

@@ -32,8 +32,8 @@ interface log_interface
* Disable log
*
* This function allows disabling the log system or parts of it, for this
* page call. When add_log is called and the type is disabled,
* the log will not be added to the database.
* page call. When add() is called and the type is disabled, the log will
* not be added to the database.
*
* @param mixed $type The log type we want to disable. Empty to
* disable all logs. Can also be an array of types.
@@ -57,12 +57,12 @@ interface log_interface
/**
* Adds a log entry to the database
*
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
* @param int $user_id User ID of the user
* @param string $log_ip IP address of the user
* @param string $log_operation Name of the operation
* @param int $log_time Timestamp when the log entry was added, if empty time() will be used
* @param array $additional_data More arguments can be added, depending on the log_type
* @param string $mode The mode defines which log_type is used and from which log the entry is retrieved
* @param int $user_id User ID of the user
* @param string $log_ip IP address of the user
* @param string $log_operation Name of the operation
* @param int|bool $log_time Timestamp when the log entry was added. If false, time() will be used
* @param array $additional_data More arguments can be added, depending on the log_type
*
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
*/