Permalink
Browse files

Update link_goto.php

  • Loading branch information...
jmontoyaa committed May 13, 2015
1 parent f414513 commit aa052c08b9f4bbde686572c66dc0301ac7a480b8
Showing with 10 additions and 6 deletions.
  1. +10 −6 main/link/link_goto.php
@@ -21,16 +21,20 @@
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']);
require_once api_get_path(LIBRARY_PATH).'link.lib.php';
$this_section = SECTION_COURSES;
$linkId = intval($_GET['link_id']);
$linkInfo = Link::get_link_info($linkId);
$linkUrl = html_entity_decode(Security::remove_XSS($linkInfo['url']));
// Launch 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;

0 comments on commit aa052c0

Please sign in to comment.