Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Confirmation after vote  (Read 2366 times)

0 Members and 1 Guest are viewing this topic.

sjordan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Confirmation after vote
« on: August 08, 2006, 12:44:11 am »

Hello,

I'm working with a client. He wanted a confirmation of some sort after votes were cast. I noticed that ratepic.php uses two redirects:

lines 119 & 120
Quote
header($header_location . $location);
pageheader($lang_info, "<META http-equiv=\"refresh\" content=\"1;url=$location\">");

As line 119 uses the php header functionality, it seems that line 120 would never get executed. But looking at line 121 ...
Quote
msg_box($lang_info, $lang_rate_pic_php['rate_ok'], $lang_continue, $location);
it looks like at some point the mechanism to provide a confirmation and then redirect was supported.

Thus I commented out line 119, effectively re-instating the confirmation feature; things seemed to work as the client wanted, except for one thing -- in his browser IE 6, no redirect happened.

Security settings are at default. Nothing particularly special about them.

Any thoughts on all this?

Thanks in advance.

CPG v 1.4.8
« Last Edit: August 08, 2006, 01:31:29 am by sjordan »
Logged

sjordan

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: Confirmation after vote
« Reply #1 on: August 16, 2006, 05:37:43 am »

Any thoughts on the vote confirmation?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Confirmation after vote
« Reply #2 on: August 16, 2006, 08:09:08 am »

seems the header call has been forgotten to replace somewhen. However it's not the right place to add some sort of confirmation. That you'd need to have before the query that stores the vote into the db.

Seems to be pretty easy to do to me. In the code not only GET pic and rate but also eg. confirm. If confirm <> yes you call the new code, else execute the existing one.

In the new code block you have just a link or button that calls the page itself again ( ratepic.php?pic=xxx&rate=xxx&confirm=yes )

done
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 20 queries.