mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10714] Remove fallback code from previous commits and move global
PHPBB3-10714
This commit is contained in:
parent
e8fd8b9a4b
commit
447e845274
1 changed files with 2 additions and 10 deletions
|
@ -3512,16 +3512,9 @@ function parse_cfg_file($filename, $lines = false)
|
||||||
*/
|
*/
|
||||||
function add_log()
|
function add_log()
|
||||||
{
|
{
|
||||||
global $phpbb_log;
|
global $phpbb_log, $user;
|
||||||
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
$log = (isset($args[0])) ? $args[0] : false;
|
|
||||||
|
|
||||||
if ($log === false)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$mode = array_shift($args);
|
$mode = array_shift($args);
|
||||||
|
|
||||||
// This looks kind of dirty, but add_log has some additional data before the log_operation
|
// This looks kind of dirty, but add_log has some additional data before the log_operation
|
||||||
|
@ -3539,11 +3532,10 @@ function add_log()
|
||||||
$additional_data['reportee_id'] = array_shift($args);
|
$additional_data['reportee_id'] = array_shift($args);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$log_operation = array_shift($args);
|
$log_operation = array_shift($args);
|
||||||
$additional_data = array_merge($additional_data, $args);
|
$additional_data = array_merge($additional_data, $args);
|
||||||
|
|
||||||
global $user;
|
|
||||||
|
|
||||||
$user_id = (empty($user->data)) ? ANONYMOUS : $user->data['user_id'];
|
$user_id = (empty($user->data)) ? ANONYMOUS : $user->data['user_id'];
|
||||||
$user_ip = (empty($user->ip)) ? '' : $user->ip;
|
$user_ip = (empty($user->ip)) ? '' : $user->ip;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue