[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/phpbb/log/ -> log_interface.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 114 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

log_interface:: (8 methods):
  is_enabled()
  disable()
  enable()
  add()
  delete()
  get_logs()
  get_log_count()
  get_valid_offset()


Interface: log_interface  - X-Ref

The interface for the log-system.

is_enabled($type = '')   X-Ref
This function returns the state of the log system.

param: string    $type    The log type we want to check. Empty to get
return: bool    True if log for the type is enabled

disable($type = '')   X-Ref
Disable log

This function allows disabling the log system or parts of it, for this
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
return: null

enable($type = '')   X-Ref
Enable log

This function allows re-enabling the log system.

param: mixed    $type    The log type we want to enable. Empty to
return: null

add($mode, $user_id, $log_ip, $log_operation, $log_time = false, $additional_data = array()   X-Ref
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|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.

delete($mode, $conditions = array()   X-Ref
Delete entries in the logs

param: string    $mode        The mode defines which log_type is used and from which log the entries are deleted
param: array    $conditions    An array of conditions, 3 different  forms are accepted

get_logs($mode, $count_logs = true, $limit = 0, $offset = 0, $forum_id = 0, $topic_id = 0, $user_id = 0, $log_time = 0, $sort_by = 'l.log_time DESC', $keywords = '')   X-Ref
Grab the logs from the database

param: string    $mode            The mode defines which log_type is used and ifrom which log the entry is retrieved
param: bool    $count_logs        Shall we count all matching log entries?
param: int        $limit            Limit the number of entries that are returned
param: int        $offset            Offset when fetching the log entries, f.e. when paginating
param: mixed    $forum_id        Restrict the log entries to the given forum_id (can also be an array of forum_ids)
param: int        $topic_id        Restrict the log entries to the given topic_id
param: int        $user_id        Restrict the log entries to the given user_id
param: int        $log_time        Only get log entries newer than the given timestamp
param: string    $sort_by        SQL order option, e.g. 'l.log_time DESC'
param: string    $keywords        Will only return log entries that have the keywords in log_operation or log_data
return: array            The result array with the logs

get_log_count()   X-Ref
Get total log count

return: int            Returns the number of matching logs from the last call to get_logs()

get_valid_offset()   X-Ref
Get offset of the last valid page

return: int            Returns the offset of the last valid page from the last call to get_logs()



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1