aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/mcp/mcp_main.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-10-17 15:39:20 +0200
committerJoas Schilling <nickvergessen@gmx.de>2014-10-17 15:39:20 +0200
commit66342f5b89a97f9c41e5ea08ccd44abb3dfd569d (patch)
tree9826188673b011a7588ef87d6ef495f0490fee3c /phpBB/includes/mcp/mcp_main.php
parente1af6584d96302fdf531f6e139faaee67f13ff31 (diff)
downloadforums-66342f5b89a97f9c41e5ea08ccd44abb3dfd569d.tar
forums-66342f5b89a97f9c41e5ea08ccd44abb3dfd569d.tar.gz
forums-66342f5b89a97f9c41e5ea08ccd44abb3dfd569d.tar.bz2
forums-66342f5b89a97f9c41e5ea08ccd44abb3dfd569d.tar.xz
forums-66342f5b89a97f9c41e5ea08ccd44abb3dfd569d.zip
[ticket/13171] Check the correct (soft)delete permission when deleting in MCP
PHPBB3-13171
Diffstat (limited to 'phpBB/includes/mcp/mcp_main.php')
-rw-r--r--phpBB/includes/mcp/mcp_main.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index 74bf687fc8..19a0ee3051 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -754,7 +754,8 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_delete')))
+ $check_permission = ($is_soft) ? 'm_softdelete' : 'm_delete';
+ if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array($check_permission)))
{
return;
}
@@ -882,7 +883,8 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
{
global $auth, $user, $db, $phpEx, $phpbb_root_path, $request, $phpbb_container;
- if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array('m_softdelete')))
+ $check_permission = ($is_soft) ? 'm_softdelete' : 'm_delete';
+ if (!phpbb_check_ids($post_ids, POSTS_TABLE, 'post_id', array($check_permission)))
{
return;
}