aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-10-18 17:59:48 -0400
committerMarc Alexander <admin@m-a-styles.de>2014-10-18 17:59:48 -0400
commitb3421e397dc8bff3571a6415a5e791a7baa84cd1 (patch)
treed4852c486bc982e1271ecb560de590bc2dbfb2d1
parentc6272fca075f55d089bbd0a4139bf05db7a0daab (diff)
parent66342f5b89a97f9c41e5ea08ccd44abb3dfd569d (diff)
downloadforums-b3421e397dc8bff3571a6415a5e791a7baa84cd1.tar
forums-b3421e397dc8bff3571a6415a5e791a7baa84cd1.tar.gz
forums-b3421e397dc8bff3571a6415a5e791a7baa84cd1.tar.bz2
forums-b3421e397dc8bff3571a6415a5e791a7baa84cd1.tar.xz
forums-b3421e397dc8bff3571a6415a5e791a7baa84cd1.zip
Merge pull request #3041 from nickvergessen/ticket/13171
[ticket/13171] Check the correct (soft)delete permission when deleting in MCP
-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;
}