mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/10714] Rely on global instead of creating an instance
PHPBB3-10714
This commit is contained in:
parent
5213ee1829
commit
70d23380aa
2 changed files with 0 additions and 12 deletions
|
@ -3367,12 +3367,6 @@ function add_log()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// no log class set, create a temporary one ourselves to keep backwards compatibility
|
|
||||||
if ($phpbb_log === null)
|
|
||||||
{
|
|
||||||
$phpbb_log = new phpbb_log(LOG_TABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
$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
|
||||||
|
|
|
@ -2490,12 +2490,6 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||||
{
|
{
|
||||||
global $phpbb_log;
|
global $phpbb_log;
|
||||||
|
|
||||||
// no log class set, create a temporary one ourselves to keep backwards compatability
|
|
||||||
if ($phpbb_log === null)
|
|
||||||
{
|
|
||||||
$phpbb_log = new phpbb_log(LOG_TABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
$count_logs = ($log_count !== false);
|
$count_logs = ($log_count !== false);
|
||||||
|
|
||||||
$log = $phpbb_log->get_logs($mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $limit_days, $sort_by, $keywords);
|
$log = $phpbb_log->get_logs($mode, $count_logs, $limit, $offset, $forum_id, $topic_id, $user_id, $limit_days, $sort_by, $keywords);
|
||||||
|
|
Loading…
Add table
Reference in a new issue