File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 21
21
require_once '../inc/global.inc.php ' ;
22
22
$ this_section = SECTION_COURSES ;
23
23
24
- $ link_url = html_entity_decode (Security::remove_XSS ($ _GET ['link_url ' ]));
25
- $ link_id = intval ($ _GET ['link_id ' ]);
24
+ require_once api_get_path (LIBRARY_PATH ).'link.lib.php ' ;
26
25
26
+ $ this_section = SECTION_COURSES ;
27
+
28
+ $ linkId = intval ($ _GET ['link_id ' ]);
29
+
30
+ $ linkInfo = Link::get_link_info ($ linkId );
31
+ $ linkUrl = html_entity_decode (Security::remove_XSS ($ linkInfo ['url ' ]));
27
32
// Launch event
28
- event_link ($ link_id );
33
+ Event:: event_link ($ linkId );
29
34
30
35
header ("Cache-Control: no-store, no-cache, must-revalidate " ); // HTTP/1.1
31
36
header ("Cache-Control: post-check=0, pre-check=0 " , false );
32
37
header ("Pragma: no-cache " ); // HTTP/1.0
33
- header ("Location: $ link_url " );
34
-
35
- // To be sure that the script stops running after the redirection
38
+ header ("Location: $ linkUrl " );
36
39
exit ;
40
+
You can’t perform that action at this time.
0 commit comments