diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-05-10 16:58:11 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-05-10 17:03:09 +0200 |
commit | c5a4ad3d31047f9580b19b3401ef523b0fd53733 (patch) | |
tree | 57210bb8e0b10b8d9eb39c033eea549796bcd50d /phpBB/includes/acp/acp_logs.php | |
parent | d4fc060bcd61228fdf78da4f2d290a7a17546c46 (diff) | |
download | forums-c5a4ad3d31047f9580b19b3401ef523b0fd53733.tar forums-c5a4ad3d31047f9580b19b3401ef523b0fd53733.tar.gz forums-c5a4ad3d31047f9580b19b3401ef523b0fd53733.tar.bz2 forums-c5a4ad3d31047f9580b19b3401ef523b0fd53733.tar.xz forums-c5a4ad3d31047f9580b19b3401ef523b0fd53733.zip |
[ticket/10899] Using Delete All in log viewer with keyword search
https://tracker.phpbb.com/browse/PHPBB3-10899
PHPBB3-10899
Diffstat (limited to 'phpBB/includes/acp/acp_logs.php')
-rw-r--r-- | phpBB/includes/acp/acp_logs.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_logs.php b/phpBB/includes/acp/acp_logs.php index 2c795bb77b..4e5db058fb 100644 --- a/phpBB/includes/acp/acp_logs.php +++ b/phpBB/includes/acp/acp_logs.php @@ -26,7 +26,7 @@ class acp_logs { global $db, $user, $auth, $template, $cache, $phpbb_container; global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx; - global $request; + global $request, $phpbb_log; $user->add_lang('mcp'); @@ -66,7 +66,15 @@ class acp_logs unset($sql_in); } - if ($where_sql || $deleteall) + if ($deleteall) + { + $where_sql = ($sort_days) ? 'AND log_time >= ' . (time() - ($sort_days * 86400)) : ''; + $keywords = utf8_normalize_nfc(request_var('keywords', '', true)); + $keywords_where = $phpbb_log->generate_sql_keyword($keywords, ''); + $where_sql .= ' ' . $keywords_where; + } + + if ($where_sql) { $sql = 'DELETE FROM ' . LOG_TABLE . " WHERE log_type = {$this->log_type} |