Forum Moderators: coopster
...
$pid = $superCage->get->getInt('pid');
...
$ref = $CONFIG['site_url'] . (!empty($CPG_REFERER) ? $CPG_REFERER : "displayimage.php?pid={$pid}");
$ref = str_replace('&', '&', $ref);
//What is done above is essentially, just a $_GET of pid and referer
...
$header_location = (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) ? 'Refresh: 0; URL=' : 'Location: ';
header($header_location . $ref);
pageheader($lang_common['information'], "<meta http-equiv=\"refresh\" content=\"1;url=$ref\">");
//I think the line above is the key. It does a 302 redirect I think, but I'm not an expert
msg_box($lang_common['information'], $lang_rate_pic_php['rate_ok'], $lang_common['continue'], $ref);
//Apparently the line above is a msg_box, but I don't see any when I click on "add to favorites"
pagefooter();
//I don't know what pagefooter is, but I don't think it matters for the redirect.
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".$ref);