File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 14
14
$ cidReset = true ;
15
15
require_once __DIR__ .'/../inc/global.inc.php ' ;
16
16
17
- if (api_get_configuration_value ('allow_career_diagram ' ) == false ) {
17
+ if (false === api_get_configuration_value ('allow_career_diagram ' )) {
18
18
api_not_allowed (true );
19
19
}
20
20
21
+ $ careerId = isset ($ _GET ['id ' ]) ? (int ) $ _GET ['id ' ] : 0 ;
22
+ //$userId = isset($_GET['user_id']) ? $_GET['user_id'] : api_get_user_id();
23
+
24
+ if (empty ($ careerId )) {
25
+ api_not_allowed (true );
26
+ }
27
+
28
+ // Redirect to user/career_diagram.php if not admin/drh BT#18720
29
+ if (!(api_is_platform_admin () || api_is_drh ())) {
30
+ $ url = api_get_path (WEB_CODE_PATH ).'user/career_diagram.php?career_id= ' .$ careerId ;
31
+ api_location ($ url );
32
+ }
33
+
21
34
$ this_section = SECTION_PLATFORM_ADMIN ;
22
35
23
36
$ allowCareer = api_get_configuration_value ('allow_session_admin_read_careers ' );
24
37
api_protect_admin_script ($ allowCareer );
25
38
26
39
$ htmlHeadXtra [] = api_get_js ('jsplumb2.js ' );
27
40
28
- $ careerId = isset ($ _GET ['id ' ]) ? $ _GET ['id ' ] : 0 ;
29
- if (empty ($ careerId )) {
30
- api_not_allowed (true );
31
- }
32
41
33
42
$ career = new Career ();
34
43
$ careerInfo = $ career ->get ($ careerId );
You can’t perform that action at this time.
0 commit comments