phpBB API Documentation
Interface

phpbb\log\log_interface

interface log_interface

The interface for the log-system.

Methods

is_enabled($type = '')

This function returns the state of the log system.

disable($type = '')

Disable log

enable($type = '')

Enable log

add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())

Adds a log entry to the database

delete(string $mode, array $conditions = array())

Delete entries in the logs

get_logs($mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '')

Grab the logs from the database

get_log_count()

Get total log count

get_valid_offset()

Get offset of the last valid page

Details

at line 29
public is_enabled($type = '')

This function returns the state of the log system.

Parameters

$type

at line 43
public disable($type = '')

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.

Parameters

$type

at line 55
public enable($type = '')

Enable log

This function allows re-enabling the log system.

Parameters

$type

at line 69
public add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array())

Adds a log entry to the database

Parameters

$mode
$user_id
$log_ip
$log_operation
$log_time
$additional_data

at line 81
public delete(string $mode, array $conditions = array())

Delete entries in the logs

Parameters

string $mode The mode defines which log_type is used and from which log the entries are deleted
array $conditions An array of conditions, 3 different forms are accepted 1) => transformed into 'AND = ' (value should be an integer) 2) => array(, ) transformed into 'AND ' (values can't be an array) 3) => array('IN' => array()) transformed into 'AND IN ' A special field, keywords, can also be defined. In this case only the log entries that have the keywords in logoperation or logdata will be deleted.

at line 99
public get_logs($mode, $count_logs = true, $limit, $offset, $forum_id, $topic_id, $user_id, $log_time, $sort_by = 'l.log_time DESC', $keywords = '')

Grab the logs from the database

Parameters

$mode
$count_logs
$limit
$offset
$forum_id
$topic_id
$user_id
$log_time
$sort_by
$keywords

at line 106
public get_log_count()

Get total log count

at line 113
public get_valid_offset()

Get offset of the last valid page