mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-02 14:57:37 +02:00
[ticket/12639] Handle $conditions['keywords'] outside of the loop
PHPBB3-12639
This commit is contained in:
@@ -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";
|
||||||
|
Reference in New Issue
Block a user