SMF Development > Fixed or Bogus Bugs

[4971] Edit poll reverts to "Show the poll's results to anyone."


When you edit a previously created poll the privacy settings for who can see the results defaults to "Show the poll's results to anyone." regardless of the original setting.

Version of SMF?
Mods installed?
What do you change when you see such behaviour?

I tried to replicate it in SMF 2, but I didn't succeeded.

My bad. Just upgraded from 2.0.1 to 2.0.2 and it appears to have been fixed  :-[

I'd like to re-open this bug report as it's just happened again. I have set up a fresh install of 2.0.2 with no mods installed to test the bug. Heres how it occurs.

Create a new default registered user.

Log in as the new user and create a poll with a set voting length and click the third radio button to not allow users to see the results until the poll has ended.

post the poll

edit the poll

The third radio button is still the default option. it's also greyed out but this is easily missed.

Once the poll is edited all users are now able to see poll results! clicking edit again now sees button 1 as the default option but the third radio button is stilled greyed.

The administrator can change the options but the OP cannot.


Ok, last bit of details to reproduce the bug: you must be a non-admin and non-moderator (editing your own poll).

Confirmed in 2.0.2.
The problem is in the way $context['can_moderate_poll'] is set: it takes into account only the permission and the "adding" a new poll to a topic:

--- Code: ---$context['can_moderate_poll'] = isset($_REQUEST['add']) ? 1 : allowedTo('moderate_board');
--- End code ---


[0] Message Index

Go to full version