Only need the id to load the link URL.

1.10.x
Julio Montoya 11 years ago
parent d2a5c9f695
commit c28f045481
  1. 11
      main/link/link_goto.php

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

Loading…
Cancel
Save