aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/docs/CHANGELOG.html1
-rwxr-xr-xphpBB/includes/mcp/mcp_logs.php58
2 files changed, 40 insertions, 19 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html
index 4654cbe9ed..8212b0c7f4 100644
--- a/phpBB/docs/CHANGELOG.html
+++ b/phpBB/docs/CHANGELOG.html
@@ -267,6 +267,7 @@ p a {
<li>[Fix] Do not copy forum permissions from self (Bug #13663)</li>
<li>[Fix] Allow for polls to work during preview (Bug #13657) - thanks to Thatbitextra</li>
<li>[Fix] Finer error conditions for sending IM messages (Bugs #13681, #13683)</li>
+ <li>[Fix] Add a confirmation for log deletion in the MCP (Bug #13693)</li>
</ul>
diff --git a/phpBB/includes/mcp/mcp_logs.php b/phpBB/includes/mcp/mcp_logs.php
index 514aba5718..d16cdf0196 100755
--- a/phpBB/includes/mcp/mcp_logs.php
+++ b/phpBB/includes/mcp/mcp_logs.php
@@ -98,29 +98,49 @@ class mcp_logs
// Delete entries if requested and able
if (($deletemark || $deleteall) && $auth->acl_get('a_clearlogs'))
{
- if ($deletemark && sizeof($marked))
+ if (confirm_box(true))
{
- $sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE log_type = ' . LOG_MOD . '
- AND ' . $db->sql_in_set('forum_id', $forum_list) . '
- AND ' . $db->sql_in_set('log_id', $marked);
- $db->sql_query($sql);
-
- add_log('admin', 'LOG_CLEAR_MOD');
- }
- else if ($deleteall)
- {
- $sql = 'DELETE FROM ' . LOG_TABLE . '
- WHERE log_type = ' . LOG_MOD . '
- AND ' . $db->sql_in_set('forum_id', $forum_list);
-
- if ($mode == 'topic_logs')
+ if ($deletemark && sizeof($marked))
{
- $sql .= ' AND topic_id = ' . $topic_id;
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_MOD . '
+ AND ' . $db->sql_in_set('forum_id', $forum_list) . '
+ AND ' . $db->sql_in_set('log_id', $marked);
+ $db->sql_query($sql);
+
+ add_log('admin', 'LOG_CLEAR_MOD');
}
- $db->sql_query($sql);
+ else if ($deleteall)
+ {
+ $sql = 'DELETE FROM ' . LOG_TABLE . '
+ WHERE log_type = ' . LOG_MOD . '
+ AND ' . $db->sql_in_set('forum_id', $forum_list);
+
+ if ($mode == 'topic_logs')
+ {
+ $sql .= ' AND topic_id = ' . $topic_id;
+ }
+ $db->sql_query($sql);
- add_log('admin', 'LOG_CLEAR_MOD');
+ add_log('admin', 'LOG_CLEAR_MOD');
+ }
+ }
+ else
+ {
+ confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
+ 'f' => $forum_id,
+ 't' => $topic_id,
+ 'start' => $start,
+ 'delmarked' => $deletemark,
+ 'delall' => $deleteall,
+ 'mark' => $marked,
+ 'st' => $sort_days,
+ 'sk' => $sort_key,
+ 'sd' => $sort_dir,
+ 'i' => $id,
+ 'mode' => $mode,
+ 'action' => request_var('action', array('' => ''))))
+ );
}
}