Menu

#164 Problem with votes

open
nobody
poll (1)
5
2004-10-23
2002-08-08
Anonymous
No

Hey, all!

During one of my sessions where I invent new curse
words (trying to fix phpslash to work the way I want it) I
noticed that the polls are interfering with the way stories
are submitted. (Possibly other places as well).

In pollDisplay.tpl there is a line
<input type=hidden name=submit value="vote">

Every class that switches depending on a submit button
will possibly (if it's later in the HTML ?) see this instead
of the value of the submit button they're linked to. This
causes some forms on the same page to malfunction
(not do anything at all - since the value they see
is "vote" and not "edit" or "new" or whatever).

The quick fix to this problem is to change the above
mentioned line to (in pollDisplay.tpl):
<input type=hidden name=pollSubmit value="vote">

and poll.php (line 47) to:
switch ($ary['pollSubmit']) {

I am not sure if this is the 0.65 version (since I'm not
really sure which version I'm running any more (hybrid
0.66 ?;o) and I'm too tired to check with CVS. In any
case it should be fixed.

Thanks for a great job done!

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Is this possibly why in my version (0.7.1) which had exactly
    the same problem, a user would occasionally post a comment
    and see a blank page as opposed to the redirect?
    I have added this fix and will be able to post the results
    in a couple of days...

     
  • Joe Stewart

    Joe Stewart - 2004-10-23
    • labels: --> poll
     

Log in to post a comment.