File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/* For licensing terms, see /license.txt */
3
3
4
+ use Symfony \Component \HttpFoundation \Request as HttpRequest ;
5
+
4
6
$ cidReset = true ;
5
7
6
8
require_once __DIR__ .'/../inc/global.inc.php ' ;
10
12
api_protect_admin_script (false , true );
11
13
Skill::isAllowed ();
12
14
15
+ $ httpRequest = HttpRequest::createFromGlobals ();
16
+
13
17
//Adds the JS needed to use the jqgrid
14
18
$ htmlHeadXtra [] = api_get_js ('d3/d3.v3.5.4.min.js ' );
15
19
$ htmlHeadXtra [] = api_get_js ('d3/colorbrewer.js ' );
24
28
25
29
$ skill_condition = '' ;
26
30
if (isset ($ _GET ['skill_id ' ])) {
27
- $ skill_condition = '&skill_id= ' .intval ($ _GET ['skill_id ' ]);
28
- $ tpl ->assign ('skill_id_to_load ' , $ _GET ['skill_id ' ]);
31
+ $ skillId = $ httpRequest ->query ->getInt ('skill_id ' );
32
+ $ skill_condition = "&skill_id= $ skillId " ;
33
+ $ tpl ->assign ('skill_id_to_load ' , $ skillId );
29
34
}
30
35
31
36
$ url = api_get_path (WEB_AJAX_PATH )."skill.ajax.php?a=get_skills_tree_json&load_user= $ load_user " ;
You can’t perform that action at this time.
0 commit comments