index
:
drakx
distro/mdv2007.1
distro/mdv2008.0
distro/mdv2008.1
distro/mdv2009.0
distro/mdv2009.1
distro/mdv2010.0
distro/mes5
distro/mes5-2.6.33
distro/mes6
distro/mga1
distro/mga2
distro/mga3
distro/mga4
distro/mga5
distro/mga6
distro/mga7
distro/mga8
distro/mga9
master
topic/Corpo_2_1
topic/KA9_0
topic/MDK-10-update
topic/MDK-10_1-update
topic/MDK-10_2-update
topic/MDK-2006_0-update
topic/MDK92-branch
topic/MDKC_1_0
topic/PCMCIA_CS_DISTRO
topic/R9_0-64bit-branch
topic/R9_1_HP-branch
topic/a
topic/before_matchbox_wm
topic/bug-13680
topic/dietlibc
topic/efi
topic/extlinux
topic/firewall
topic/gdk-pixbuf-0-branch
topic/gi-ppc
topic/ia64-8_1
topic/mandrakesoft
topic/mlcd4
topic/ppp
topic/rp-pppoe
topic/switching_to_dnf
topic/switching_to_urpmi
topic/unlabeled-1.1.1
topic/v_webmin_0_87
topic/x86_64-branch
user/animtim/designWork
user/bcornec/fixntp
user/colin/rescue-systemd
user/ennael/mga6
user/erwan/bug-13680
user/jibz/aarch64
user/martinw/mga6
user/pterjan/arm64
Mageia Installer and base platform for many utilities
Thierry Vignaud [tv]
summary
refs
log
tree
commit
diff
stats
log msg
author
committer
range
path:
root
/
perl-install
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace
phpbb\log
;
/**
* The interface for the log-system.
*/
interface
log_interface
{
/**
* This function returns the state of the log system.
*
* @param string $type The log type we want to check. Empty to get
* global log status.
*
* @return bool True if log for the type is enabled
*/
public function
is_enabled
(
$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.
*
* @param mixed $type The log type we want to disable. Empty to
* disable all logs. Can also be an array of types.
*
* @return null
*/
public function
disable
(
$type
=
''
);
/**
* Enable log
*
* This function allows re-enabling the log system.
*
* @param mixed $type The log type we want to enable. Empty to
* enable all logs. Can also be an array of types.
*
* @return null
*/
public function
enable
(
$type
=
''
);
/**
* 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
*
* @return int|bool Returns the log_id, if the entry was added to the database, false otherwise.
*/
public function
add
(
$mode
,
$user_id
,
$log_ip
,
$log_operation
,
$log_time
=
false
,
$additional_data
=
array
());
/**
* 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
* 1) <key> => <value> transformed into 'AND <key> = <value>' (value should be an integer)
* 2) <key> => array(<operator>, <value>) transformed into 'AND <key> <operator> <value>' (values can't be an array)
* 3) <key> => array('IN' => array(<values>)) transformed into 'AND <key> IN <values>'
* A special field, keywords, can also be defined. In this case only the log entries that have the keywords in log_operation or log_data will be deleted.
*/
public function
delete
(
$mode
,
$conditions
=
array
());
/**
* 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
*/
public function
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
=
''
);
/**
* Get total log count
*
* @return int Returns the number of matching logs from the last call to get_logs()
*/
public function
get_log_count
();
/**
* Get offset of the last valid page
*
* @return int Returns the offset of the last valid page from the last call to get_logs()
*/
public function
get_valid_offset
();
}