mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 08:17:47 +02:00
Merge pull request #2526 from Nicofuma/ticket/12639
[ticket/12639] Delete entry in admin-log leads to mysql-error * Nicofuma/ticket/12639: [ticket/12639] Add a space in the code generated by generate_sql_keyword() [ticket/12639] Handle $conditions['keywords'] outside of the loop [ticket/12639] Don't make a copy of $marked when deleting logs in acp_logs [ticket/12639] Send a correct IN entry when deleting marked logs [ticket/12639] Use assertSame [ticket/12639] Remove old commented tests [ticket/12639] Order the results correctly in the test [ticket/12639] Fix tests on postgres [ticket/12639] Update tests to use a dataProvider [ticket/12639] Add a test case with an empty keywords list [ticket/12639] Delete entry in admin-log leads to mysql-error
This commit is contained in:
@@ -58,13 +58,7 @@ class acp_logs
|
||||
|
||||
if ($deletemark && sizeof($marked))
|
||||
{
|
||||
$sql_in = array();
|
||||
foreach ($marked as $mark)
|
||||
{
|
||||
$sql_in[] = $mark;
|
||||
}
|
||||
$conditions['log_id'] = $sql_in;
|
||||
unset($sql_in);
|
||||
$conditions['log_id'] = array('IN' => $marked);
|
||||
}
|
||||
|
||||
if ($deleteall)
|
||||
@@ -78,8 +72,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,9 +115,8 @@ class mcp_logs
|
||||
if ($deletemark && sizeof($marked))
|
||||
{
|
||||
$conditions = array(
|
||||
'log_type' => LOG_MOD,
|
||||
'forum_id' => $forum_list,
|
||||
'log_id' => $marked,
|
||||
'log_id' => array('IN' => $marked),
|
||||
);
|
||||
|
||||
$phpbb_log->delete('mod', $conditions);
|
||||
@@ -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,
|
||||
);
|
||||
|
Reference in New Issue
Block a user