ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: Ruth on July 18, 2016, 04:43:31 pm

Title: Poll shows different time after edit
Post by: Ruth on July 18, 2016, 04:43:31 pm
A Member started  a few polls in our forum today in the mornig. The polls should end 14 days later, which had been the first of august. It was necessary to edit the polls today to add some more options, etc.

It is now not possible to let the polls end to this time again, 14 days...they will end a few years later... ;)
It is not working, if I type 14 in this field, it always says 32710 days
Title: Re: Poll shows different time after edit
Post by: emanuele on July 18, 2016, 05:50:49 pm
hmm...
In Poll.subs.php, search for:
Code: [Select]
function modifyPoll($id_poll, $question, $max_votes = 1, $hide_results = 1, $expire = 0, $can_change_vote = 0, $can_guest_vote = 0)
{
$expire = empty($expire) ? 0 : time() + $expire * 3600 * 24;
and remove that last line.
Pay attention the line is present also in createPoll, but that one shall remain!
Title: Re: Poll shows different time after edit
Post by: Ruth on July 18, 2016, 06:09:55 pm
Thank you very much, Emanuele. It was working. Now I can edit them again and they will show the correct ending date.
Title: Re: Poll shows different time after edit
Post by: emanuele on July 18, 2016, 06:14:54 pm
:)

I'll put it in 1.0.8!