mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-15 20:17:36 +02:00
[ticket/12639] Delete entry in admin-log leads to mysql-error
PHPBB3-12639
This commit is contained in:
parent
f4dcb69dae
commit
36071ded9d
@ -78,8 +78,6 @@ class acp_logs
|
||||
$conditions['keywords'] = $keywords;
|
||||
}
|
||||
|
||||
$conditions['log_type'] = $this->log_type;
|
||||
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
$phpbb_log->delete($mode, $conditions);
|
||||
}
|
||||
|
@ -115,7 +115,6 @@ class mcp_logs
|
||||
if ($deletemark && sizeof($marked))
|
||||
{
|
||||
$conditions = array(
|
||||
'log_type' => LOG_MOD,
|
||||
'forum_id' => $forum_list,
|
||||
'log_id' => $marked,
|
||||
);
|
||||
@ -127,7 +126,6 @@ class mcp_logs
|
||||
$keywords = utf8_normalize_nfc(request_var('keywords', '', true));
|
||||
|
||||
$conditions = array(
|
||||
'log_type' => LOG_MOD,
|
||||
'forum_id' => $forum_list,
|
||||
'keywords' => $keywords,
|
||||
);
|
||||
|
@ -393,14 +393,14 @@ class log implements \phpbb\log\log_interface
|
||||
$sql_where = 'WHERE log_type = ' . $log_type;
|
||||
foreach ($conditions as $field => $field_value)
|
||||
{
|
||||
$sql_where .= ' AND ';
|
||||
|
||||
if ($field == 'keywords')
|
||||
{
|
||||
$sql_where .= $this->generate_sql_keyword($field_value, '', '');
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_where .= ' AND ';
|
||||
|
||||
if (is_array($field_value) && sizeof($field_value) == 2 && !is_array($field_value[1]))
|
||||
{
|
||||
$sql_where .= $field . ' ' . $field_value[0] . ' ' . $field_value[1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user