1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-09 18:26:32 +02:00

[ticket/10899] Using Delete All in log viewer with keyword search

https://tracker.phpbb.com/browse/PHPBB3-10899

PHPBB3-10899
This commit is contained in:
Tristan Darricau
2014-05-10 16:58:11 +02:00
parent d4fc060bcd
commit c5a4ad3d31
3 changed files with 23 additions and 8 deletions

View File

@@ -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}