Menu

#139 No protection against activating an active survey

v1.7
closed-accepted
Admin (87)
5
2007-11-27
2005-08-26
Jeff Bearer
No

If a user goes to the query string url that activates a
survey for a survey that is already active it purges
all of the response data.

This fix would be just to protect stupid people (like
me) from themselves.

This can happen easily by mistake like in my instance.
I wanted to view the results so I started typing in
the url in firefox. Ever Helpful Firefox populated the
url for me and I hit enter. But this time firefox
choose the url to activate the survey, whoops.

A few lines of code that would keep you from accidently
activating already active survey's would keep people
from losing lots of data, like I had the unfortunate
experience of having. Thankfully I have the email to
recreate the responses.

Discussion

  • Kon Angelopoulos

    • assigned_to: nobody --> angek
     
  • Kon Angelopoulos

    Logged In: YES
    user_id=198398

    I'll take a look at it in the next couple of days and see
    what I can come up with.

     
  • Leonard Chan

    Leonard Chan - 2006-12-29

    Logged In: YES
    user_id=645294
    Originator: NO

    I happened to look at this today.

    All that's needed is to change line 70 of the most recent status.inc file in CVS (revision 1.24):
    http://phpesp.cvs.sourceforge.net/phpesp/phpESP/admin/include/where/status.inc?revision=1.24&view=markup

    From:
    70: if($old_status & ( STATUS_DELETED | STATUS_DONE ) )

    To:
    70: if($old_status & ( STATUS_DELETED | STATUS_DONE | STATUS_ACTIVE) )

    Sorry, I'm too lazy to learn how to make a proper diff.

     
  • Franky Van Liedekerke

    Logged In: YES
    user_id=109671
    Originator: NO

    agreed and changed in CVS (also for some other states)

     
  • Franky Van Liedekerke

    • status: open --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB