From b7f83b2cfc384b2a734ab720c88596cb1606bb43 Mon Sep 17 00:00:00 2001 From: brunoais Date: Wed, 3 Dec 2014 16:04:32 +0000 Subject: [PATCH 1/5] [ticket/13148] Creating a final way to modify edit logs output PHPBB3-13148 --- phpBB/phpbb/log/log.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 2af8b50b54..23e39ba71a 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -708,6 +708,20 @@ class log implements \phpbb\log\log_interface } } + /** + * Allow modifying or execute extra final filter on log entries + * + * @event core.get_logs_after + * @var array log Array with all our log entries + * @var array topic_id_list Array of topic ids, for which we + * get the permission data + * @var array reportee_id_list Array of additional user IDs we + * get the username strings for + * @since 3.1.3-RC1 + */ + $vars = array('log', 'topic_id_list', 'reportee_id_list'); + extract($this->dispatcher->trigger_event('core.get_logs_after', compact($vars))); + return $log; } From cf036ea0e89b281a233e5cb861288b54357a86cd Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 28 Dec 2014 19:52:58 +0000 Subject: [PATCH 2/5] [ticket/13148] Added more variables as requested Added more variables as requested and some extra that may be of use. PHPBB3-13148 --- phpBB/phpbb/log/log.php | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 23e39ba71a..fd7db98a3a 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -717,9 +717,40 @@ class log implements \phpbb\log\log_interface * get the permission data * @var array reportee_id_list Array of additional user IDs we * get the username strings for - * @since 3.1.3-RC1 + * @var string mode Mode of the entries we display + * @var bool count_logs Do we count all matching entries? + * @var int limit Limit the number of entries + * @var int offset Offset when fetching the entries + * @var mixed forum_id Limit entries to the forum_id, + * can also be an array of forum_ids + * @var int topic_id Limit entries to the topic_id + * @var int user_id Limit entries to the user_id + * @var int log_time Limit maximum age of log entries + * @var string sort_by SQL order option + * @var string keywords Will only return entries that have the + * keywords in log_operation or log_data + * @var string profile_url URL to the users profile + * @var int log_type The type of logs it was filtered + * @since 3.1.0-a1 */ - $vars = array('log', 'topic_id_list', 'reportee_id_list'); + $vars = array( + 'log', + 'topic_id_list', + 'reportee_id_list' + 'mode', + 'count_logs', + 'limit', + 'offset', + 'forum_id', + 'topic_id', + 'user_id', + 'log_time', + 'sort_by', + 'keywords', + 'profile_url', + 'log_type', + ); + $vars = array(); extract($this->dispatcher->trigger_event('core.get_logs_after', compact($vars))); return $log; From d455dd68f6e338497ce07d711f3ee35cb75ad81f Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 28 Dec 2014 20:25:36 +0000 Subject: [PATCH 3/5] [ticket/13148] Fixed syntax error PHPBB3-13148 --- phpBB/phpbb/log/log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index fd7db98a3a..8dedc72e52 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -736,7 +736,7 @@ class log implements \phpbb\log\log_interface $vars = array( 'log', 'topic_id_list', - 'reportee_id_list' + 'reportee_id_list', 'mode', 'count_logs', 'limit', From 0104188074deb85c55f5edb7e4563afe2a0a3810 Mon Sep 17 00:00:00 2001 From: brunoais Date: Sun, 28 Dec 2014 20:35:16 +0000 Subject: [PATCH 4/5] [ticket/13148] Fixed my error PHPBB3-13148 --- phpBB/phpbb/log/log.php | 1 - 1 file changed, 1 deletion(-) diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index 8dedc72e52..d495707c70 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -750,7 +750,6 @@ class log implements \phpbb\log\log_interface 'profile_url', 'log_type', ); - $vars = array(); extract($this->dispatcher->trigger_event('core.get_logs_after', compact($vars))); return $log; From 92d7c16782eaa1e964f190e5913228cf7b42238c Mon Sep 17 00:00:00 2001 From: brunoais Date: Mon, 29 Dec 2014 08:23:31 +0000 Subject: [PATCH 5/5] [ticket/13148] Wrong version num; copy & paste fail PHPBB3-13148 --- phpBB/phpbb/log/log.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/phpbb/log/log.php b/phpBB/phpbb/log/log.php index d495707c70..0c5205530b 100644 --- a/phpBB/phpbb/log/log.php +++ b/phpBB/phpbb/log/log.php @@ -731,7 +731,7 @@ class log implements \phpbb\log\log_interface * keywords in log_operation or log_data * @var string profile_url URL to the users profile * @var int log_type The type of logs it was filtered - * @since 3.1.0-a1 + * @since 3.1.3-RC1 */ $vars = array( 'log',