|
@@ -21,16 +21,15 @@
|
|
|
require_once '../inc/global.inc.php';
|
|
|
$this_section = SECTION_COURSES;
|
|
|
|
|
|
-$link_url = html_entity_decode(Security::remove_XSS($_GET['link_url']));
|
|
|
-$link_id = intval($_GET['link_id']);
|
|
|
+$linkId = intval($_GET['link_id']);
|
|
|
|
|
|
+$linkInfo = Link::get_link_info($linkId);
|
|
|
+$linkUrl = html_entity_decode(Security::remove_XSS($linkInfo['url']));
|
|
|
// Launch event
|
|
|
-Event::event_link($link_id);
|
|
|
+Event::event_link($linkId);
|
|
|
|
|
|
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
|
|
|
header("Cache-Control: post-check=0, pre-check=0", false);
|
|
|
header("Pragma: no-cache"); // HTTP/1.0
|
|
|
-header("Location: $link_url");
|
|
|
-
|
|
|
-// To be sure that the script stops running after the redirection
|
|
|
+header("Location: $linkUrl");
|
|
|
exit;
|