[ticket/15951] Add requested changes

Revert changes with $topic_info
Add $quickmod to the event
Change since versions to latest

PHPBB3-15951
This commit is contained in:
Alec 2020-08-11 08:08:17 -04:00
parent ebc4912ada
commit c903381154
2 changed files with 6 additions and 6 deletions

View file

@ -895,7 +895,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
* @var string soft_delete_reason The reason we're soft deleting * @var string soft_delete_reason The reason we're soft deleting
* @var string action The current delete action * @var string action The current delete action
* @var array check_permission The array with a permission to check for, can be set to false to not check them * @var array check_permission The array with a permission to check for, can be set to false to not check them
* @since 3.2.6-RC1 * @since 3.3.2-RC1
*/ */
$vars = array( $vars = array(
'topic_ids', 'topic_ids',
@ -1034,7 +1034,7 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
* @var int forum_id The current forum ID * @var int forum_id The current forum ID
* @var bool only_softdeleted If the topic_ids are all soft deleted, this is true * @var bool only_softdeleted If the topic_ids are all soft deleted, this is true
* @var bool only_shadow If the topic_ids are all shadow topics, this is true * @var bool only_shadow If the topic_ids are all shadow topics, this is true
* @since 3.2.6-RC1 * @since 3.3.2-RC1
*/ */
$vars = array( $vars = array(
'l_confirm', 'l_confirm',

View file

@ -116,9 +116,9 @@ if (!$auth->acl_getf_global('m_'))
); );
$allow_user = false; $allow_user = false;
$topic_info = phpbb_get_topic_data(array($topic_id));
if ($quickmod && isset($user_quickmod_actions[$action]) && $user->data['is_registered'] && $auth->acl_gets($user_quickmod_actions[$action], $forum_id)) if ($quickmod && isset($user_quickmod_actions[$action]) && $user->data['is_registered'] && $auth->acl_gets($user_quickmod_actions[$action], $forum_id))
{ {
$topic_info = phpbb_get_topic_data(array($topic_id));
if ($topic_info[$topic_id]['topic_poster'] == $user->data['user_id']) if ($topic_info[$topic_id]['topic_poster'] == $user->data['user_id'])
{ {
$allow_user = true; $allow_user = true;
@ -130,15 +130,15 @@ if (!$auth->acl_getf_global('m_'))
* *
* @event core.mcp_modify_permissions * @event core.mcp_modify_permissions
* @var array user_quickmod_actions Array holding the quickmod actions and their respectiev permissions * @var array user_quickmod_actions Array holding the quickmod actions and their respectiev permissions
* @var array topic_info An array of the current topic's data * @var bool quickmod Whether or not the action is performed via QuickMod
* @var bool allow_user Boolean holding if the user can access the mcp * @var bool allow_user Boolean holding if the user can access the mcp
* @var int forum_id The current forum ID * @var int forum_id The current forum ID
* @var int topic_id The current topic ID * @var int topic_id The current topic ID
* @since 3.2.6-RC1 * @since 3.3.2-RC1
*/ */
$vars = array( $vars = array(
'user_quickmod_actions', 'user_quickmod_actions',
'topic_info', 'quickmod',
'allow_user', 'allow_user',
'forum_id', 'forum_id',
'topic_id', 'topic_id',