mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/12639] Handle $conditions['keywords'] outside of the loop
PHPBB3-12639
This commit is contained in:
parent
3e31764007
commit
f980fed5d2
1 changed files with 17 additions and 16 deletions
|
@ -391,13 +391,15 @@ class log implements \phpbb\log\log_interface
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql_where = 'WHERE log_type = ' . $log_type;
|
$sql_where = 'WHERE log_type = ' . $log_type;
|
||||||
foreach ($conditions as $field => $field_value)
|
|
||||||
|
if (isset($conditions['keywords']))
|
||||||
{
|
{
|
||||||
if ($field == 'keywords')
|
$sql_where .= $this->generate_sql_keyword($conditions['keywords'], '', ' AND');
|
||||||
{
|
|
||||||
$sql_where .= $this->generate_sql_keyword($field_value, '', ' AND');
|
unset($conditions['keywords']);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
foreach ($conditions as $field => $field_value)
|
||||||
{
|
{
|
||||||
$sql_where .= ' AND ';
|
$sql_where .= ' AND ';
|
||||||
|
|
||||||
|
@ -414,7 +416,6 @@ class log implements \phpbb\log\log_interface
|
||||||
$sql_where .= $field . ' = ' . $field_value;
|
$sql_where .= $field . ' = ' . $field_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$sql = 'DELETE FROM ' . LOG_TABLE . "
|
$sql = 'DELETE FROM ' . LOG_TABLE . "
|
||||||
$sql_where";
|
$sql_where";
|
||||||
|
|
Loading…
Add table
Reference in a new issue