mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/16207] Add form keys to actions in MCP
PHPBB3-16207
This commit is contained in:
parent
32543c40ba
commit
ee1cb783cb
2 changed files with 15 additions and 1 deletions
|
@ -50,10 +50,17 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
|
||||
$url = append_sid("{$phpbb_root_path}mcp.$phpEx?$url_extra");
|
||||
|
||||
add_form_key('mcp_forum');
|
||||
|
||||
// Resync Topics
|
||||
switch ($action)
|
||||
{
|
||||
case 'resync':
|
||||
if (!check_form_key('mcp_forum'))
|
||||
{
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
|
||||
$topic_ids = $request->variable('topic_id_list', array(0));
|
||||
mcp_resync_topics($topic_ids);
|
||||
break;
|
||||
|
|
|
@ -55,9 +55,16 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$submitted_id_list = $request->variable('post_ids', array(0));
|
||||
$checked_ids = $post_id_list = $request->variable('post_id_list', array(0));
|
||||
|
||||
add_form_key('mcp_topic');
|
||||
|
||||
// Resync Topic?
|
||||
if ($action == 'resync')
|
||||
{
|
||||
if (!check_form_key('mcp_topic'))
|
||||
{
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
|
||||
if (!function_exists('mcp_resync_topics'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/mcp/mcp_forum.' . $phpEx);
|
||||
|
@ -90,7 +97,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
$subject = $topic_info['topic_title'];
|
||||
}
|
||||
|
||||
// Restore or pprove posts?
|
||||
// Restore or approve posts?
|
||||
if (($action == 'restore' || $action == 'approve') && $auth->acl_get('m_approve', $topic_info['forum_id']))
|
||||
{
|
||||
if (!class_exists('mcp_queue'))
|
||||
|
|
Loading…
Add table
Reference in a new issue