mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9470 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -648,7 +648,7 @@ if ($submit || $preview || $refresh)
|
||||
$post_data['poll_length'] = request_var('poll_length', 0);
|
||||
$post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true));
|
||||
$post_data['poll_max_options'] = request_var('poll_max_options', 1);
|
||||
$post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
|
||||
$post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0;
|
||||
}
|
||||
|
||||
// If replying/quoting and last post id has changed
|
||||
@@ -1343,7 +1343,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_POLL_BOX' => true,
|
||||
'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id)),
|
||||
'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id)),
|
||||
'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))),
|
||||
'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false,
|
||||
|
||||
|
Reference in New Issue
Block a user