Advertisement:

Author Topic: [4971] Edit poll reverts to "Show the poll's results to anyone."  (Read 2938 times)

Offline mint

  • Semi-Newbie
  • *
  • Posts: 47
[4971] Edit poll reverts to "Show the poll's results to anyone."
« on: February 21, 2012, 06:38:19 PM »
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.
« Last Edit: March 19, 2012, 05:29:48 AM by emanuele »

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • Gender: Male
  • THERE'S JUST ME
Re: Edit poll reverts to "Show the poll's results to anyone."
« Reply #1 on: February 21, 2012, 06:59:11 PM »
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.


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Offline mint

  • Semi-Newbie
  • *
  • Posts: 47
Re: Edit poll reverts to "Show the poll's results to anyone."
« Reply #2 on: February 21, 2012, 07:15:21 PM »
My bad. Just upgraded from 2.0.1 to 2.0.2 and it appears to have been fixed  :-[

Offline mint

  • Semi-Newbie
  • *
  • Posts: 47
Re: Edit poll reverts to "Show the poll's results to anyone."
« Reply #3 on: March 18, 2012, 07:00:01 PM »
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.

Cheers,
John

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,161
  • Gender: Male
  • THERE'S JUST ME
Re: Edit poll reverts to "Show the poll's results to anyone."
« Reply #4 on: March 19, 2012, 05:24:43 AM »
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: [Select]
$context['can_moderate_poll'] = isset($_REQUEST['add']) ? 1 : allowedTo('moderate_board');


Take a peek at what I'm doing! ;D



Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.