diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-04-18 17:22:41 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-04-18 17:22:41 +0000 |
commit | e3bdaea2656f788dd58e04d62896435246b6f23b (patch) | |
tree | 35441d4a27d7cf129a162d5348767f5953289beb | |
parent | b4388d0ed1a64c58de87bf2dbacf6ff01a099c38 (diff) | |
download | forums-e3bdaea2656f788dd58e04d62896435246b6f23b.tar forums-e3bdaea2656f788dd58e04d62896435246b6f23b.tar.gz forums-e3bdaea2656f788dd58e04d62896435246b6f23b.tar.bz2 forums-e3bdaea2656f788dd58e04d62896435246b6f23b.tar.xz forums-e3bdaea2656f788dd58e04d62896435246b6f23b.zip |
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
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/posting.php | 4 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 62c64a9c2a..81a85eb3ad 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -142,6 +142,7 @@ <li>[Fix] PM Export uses ISO 8601 date now. (Bug #32645)</li> <li>[Fix] Apply append_sid() to newest/latest post links in viewforum/search and UCP main module. (Bug #26815)</li> <li>[Fix] Do not create thumbnail if thumbnail would've the same size as the original image. (Bug #30725)</li> + <li>[Fix] Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925)</li> <li>[Change] Default difference view is now 'inline' instead of 'side by side'</li> <li>[Change] Added new option for merging differences to conflicting files in automatic updater</li> <li>[Change] Add link to user profile in the MCP for user notes and warn user.</li> diff --git a/phpBB/posting.php b/phpBB/posting.php index 1342b74642..cc98e9c496 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -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, diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index b76f6c5e88..2bc8086efe 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -679,8 +679,8 @@ if (!empty($topic_data['poll_start'])) } } - $s_can_vote = (((!sizeof($cur_voted_id) && $auth->acl_get('f_vote', $forum_id)) || - ($auth->acl_get('f_votechg', $forum_id) && $topic_data['poll_vote_change'])) && + // Can not vote at all if no vote permission + $s_can_vote = ($auth->acl_get('f_vote', $forum_id) && (($topic_data['poll_length'] != 0 && $topic_data['poll_start'] + $topic_data['poll_length'] > time()) || $topic_data['poll_length'] == 0) && $topic_data['topic_status'] != ITEM_LOCKED && $topic_data['forum_status'] != ITEM_LOCKED) ? true : false; |