View poll results gives extra option

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
View poll results gives extra option
« on March 31st, 2012, 03:35 AM »
When you have a poll, that you haven't yourself voted in but that you have permission (either because you're the poll starter or because you gave permission) to view the results, you get a 'View Results' button next to the Edit/Remove/Lock Voting buttons.

So far so good, but if you hit that button, you get the results, a Voting Options button to take you back - and you get another 'View Results' option, even though that's where you already are.

As far as I remember this is also a bug in SMF, too.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

agent47

  • Now I see the changes you're talking about.
  • Posts: 115

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278

Nao

  • Dadman with a boy
  • Posts: 16,079
Re: View poll results gives extra option
« Reply #3, on April 2nd, 2012, 05:33 PM »
Thanks! That was an easy fix... :lol:
Just needed to move a !$context['poll']['show_results'] to the beginning of the statement.