@@ -47,20 +47,20 @@ discard block |
||
47 | 47 | $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
48 | 48 | $navigation['myprofile']['title'] = get_lang('ModifyProfile'); |
49 | 49 | $navigation['myprofile']['key'] = 'profile'; |
50 | - // Link to my agenda |
|
50 | + // Link to my agenda |
|
51 | 51 | $navigation['myagenda']['url'] = api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=personal'; |
52 | 52 | $navigation['myagenda']['title'] = get_lang('MyAgenda'); |
53 | 53 | $navigation['myagenda']['key'] = 'agenda'; |
54 | 54 | |
55 | - // Gradebook |
|
56 | - if (api_get_setting('gradebook_enable') == 'true') { |
|
55 | + // Gradebook |
|
56 | + if (api_get_setting('gradebook_enable') == 'true') { |
|
57 | 57 | $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
58 | 58 | $navigation['mygradebook']['title'] = get_lang('MyGradebook'); |
59 | 59 | $navigation['mygradebook']['key'] = 'gradebook'; |
60 | - } |
|
60 | + } |
|
61 | 61 | |
62 | - // Reporting |
|
63 | - if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) { |
|
62 | + // Reporting |
|
63 | + if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) { |
|
64 | 64 | // Link to my space |
65 | 65 | $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':''); |
66 | 66 | $navigation['session_my_space']['title'] = get_lang('MySpace'); |
@@ -84,21 +84,21 @@ discard block |
||
84 | 84 | $navigation['session_my_progress']['key'] = 'my-progress'; |
85 | 85 | } |
86 | 86 | |
87 | - // Social |
|
88 | - if (api_get_setting('allow_social_tool')=='true') { |
|
87 | + // Social |
|
88 | + if (api_get_setting('allow_social_tool')=='true') { |
|
89 | 89 | $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php'; |
90 | 90 | $navigation['social']['title'] = get_lang('SocialNetwork'); |
91 | 91 | $navigation['social']['key'] = 'social-network'; |
92 | - } |
|
92 | + } |
|
93 | 93 | |
94 | - // Dashboard |
|
95 | - if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) { |
|
94 | + // Dashboard |
|
95 | + if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) { |
|
96 | 96 | $navigation['dashboard']['url'] = api_get_path(WEB_CODE_PATH).'dashboard/index.php'; |
97 | 97 | $navigation['dashboard']['title'] = get_lang('Dashboard'); |
98 | 98 | $navigation['dashboard']['key'] = 'dashboard'; |
99 | - } |
|
99 | + } |
|
100 | 100 | |
101 | - // Reports |
|
101 | + // Reports |
|
102 | 102 | /* |
103 | 103 | if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) { |
104 | 104 | $navigation['reports']['url'] = api_get_path(WEB_CODE_PATH).'reports/index.php'; |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | } |
122 | 122 | // End Custom Tabs |
123 | 123 | |
124 | - // Platform administration |
|
125 | - if (api_is_platform_admin(true)) { |
|
124 | + // Platform administration |
|
125 | + if (api_is_platform_admin(true)) { |
|
126 | 126 | $navigation['platform_admin']['url'] = api_get_path(WEB_CODE_PATH).'admin/'; |
127 | 127 | $navigation['platform_admin']['title'] = get_lang('PlatformAdmin'); |
128 | 128 | $navigation['platform_admin']['key'] = 'admin'; |
129 | - } |
|
129 | + } |
|
130 | 130 | |
131 | - return $navigation; |
|
131 | + return $navigation; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | if ($number && |
255 | 255 | (api_get_setting('showonline', 'world') == 'true' && !$user_id) || |
256 | 256 | (api_get_setting('showonline', 'users') == 'true' && $user_id) |
257 | - ) |
|
257 | + ) |
|
258 | 258 | { |
259 | 259 | $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php" target="_self" title="'.get_lang('UsersOnline').'" >'. |
260 | 260 | Display::return_icon('user.png', get_lang('UsersOnline'), array(), ICON_SIZE_TINY).' '.$number.'</a></li>'; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | (is_array($_course) && |
266 | 266 | api_get_setting('showonline', 'course') == 'true' && isset($_course['sysCode']) |
267 | 267 | ) |
268 | - ) |
|
268 | + ) |
|
269 | 269 | { |
270 | 270 | $html .= '<li><a href="'.api_get_path(WEB_PATH).'whoisonline.php?cidReq='.$_course['sysCode'].'" target="_self">'. |
271 | 271 | Display::return_icon('course.png', get_lang('UsersOnline').' '.get_lang('InThisCourse'), array(), ICON_SIZE_TINY).' '.$number_online_in_course.' </a></li>'; |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | } |
377 | 377 | } |
378 | 378 | |
379 | - // Reports |
|
379 | + // Reports |
|
380 | 380 | if (!empty($possible_tabs['reports'])) { |
381 | 381 | if (api_get_setting('show_tabs', 'reports') == 'true') { |
382 | 382 | if ((api_is_platform_admin() || api_is_drh() || api_is_session_admin()) && Rights::hasRight('show_tabs:reports')) { |
@@ -623,7 +623,7 @@ discard block |
||
623 | 623 | $navigation_item_my_courses['title'] = get_lang('MyCourses'); |
624 | 624 | $navigation_item_my_courses['url'] = api_get_path(WEB_PATH).'user_portal.php'; |
625 | 625 | $navigation[] = $navigation_item_my_courses; |
626 | - */ |
|
626 | + */ |
|
627 | 627 | $navigation[] = $navigation_item; |
628 | 628 | } |
629 | 629 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | |
52 | 52 | |
53 | 53 | // My Profile |
54 | - $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
|
54 | + $navigation['myprofile']['url'] = api_get_path(WEB_CODE_PATH).'auth/profile.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : ''); |
|
55 | 55 | $navigation['myprofile']['title'] = get_lang('ModifyProfile'); |
56 | 56 | $navigation['myprofile']['key'] = 'profile'; |
57 | 57 | $navigation['myprofile']['icon'] = 'profile.png'; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | |
64 | 64 | // Gradebook |
65 | 65 | if (api_get_setting('gradebook_enable') == 'true') { |
66 | - $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : '' ); |
|
66 | + $navigation['mygradebook']['url'] = api_get_path(WEB_CODE_PATH).'gradebook/gradebook.php'.(!empty($_course['path']) ? '?coursePath='.$_course['path'].'&courseCode='.$_course['official_code'] : ''); |
|
67 | 67 | $navigation['mygradebook']['title'] = get_lang('MyGradebook'); |
68 | 68 | $navigation['mygradebook']['key'] = 'gradebook'; |
69 | 69 | $navigation['mygradebook']['icon'] = 'gradebook.png'; |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | // Reporting |
73 | 73 | if (api_is_allowed_to_create_course() || api_is_drh() || api_is_session_admin()) { |
74 | 74 | // Link to my space |
75 | - $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh()?'session.php':''); |
|
75 | + $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/'.(api_is_drh() ? 'session.php' : ''); |
|
76 | 76 | $navigation['session_my_space']['title'] = get_lang('MySpace'); |
77 | 77 | $navigation['session_my_space']['key'] = 'my-space'; |
78 | 78 | $navigation['session_my_space']['icon'] = 'my-space.png'; |
79 | 79 | } else if (api_is_student_boss()) { |
80 | - $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH) . 'mySpace/student.php'; |
|
80 | + $navigation['session_my_space']['url'] = api_get_path(WEB_CODE_PATH).'mySpace/student.php'; |
|
81 | 81 | $navigation['session_my_space']['title'] = get_lang('MySpace'); |
82 | 82 | $navigation['session_my_space']['key'] = 'my-space'; |
83 | 83 | $navigation['session_my_space']['icon'] = 'my-space.png'; |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | } |
99 | 99 | |
100 | 100 | // Social |
101 | - if (api_get_setting('allow_social_tool')=='true') { |
|
101 | + if (api_get_setting('allow_social_tool') == 'true') { |
|
102 | 102 | $navigation['social']['url'] = api_get_path(WEB_CODE_PATH).'social/home.php'; |
103 | 103 | $navigation['social']['title'] = get_lang('SocialNetwork'); |
104 | 104 | $navigation['social']['key'] = 'social-network'; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $_course = api_get_course_info(); |
195 | 195 | $course_id = 0; |
196 | 196 | if (!empty($_course)) { |
197 | - $course_id = $_course['code']; |
|
197 | + $course_id = $_course['code']; |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | $user_id = api_get_user_id(); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | if (api_get_setting('gradebook_enable') == 'true') { |
291 | 291 | if (api_get_setting('show_tabs', 'my_gradebook') == 'true') { |
292 | 292 | $navigation['mygradebook'] = $possible_tabs['mygradebook']; |
293 | - } else{ |
|
293 | + } else { |
|
294 | 294 | $menu_navigation['mygradebook'] = $possible_tabs['mygradebook']; |
295 | 295 | } |
296 | 296 | } |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | if (api_get_setting('allow_social_tool') == 'true') { |
316 | 316 | $navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null; |
317 | 317 | } |
318 | - } else{ |
|
318 | + } else { |
|
319 | 319 | $menu_navigation['social'] = isset($possible_tabs['social']) ? $possible_tabs['social'] : null; |
320 | 320 | } |
321 | 321 | |
@@ -324,7 +324,7 @@ discard block |
||
324 | 324 | if (api_is_platform_admin() || api_is_drh() || api_is_session_admin()) { |
325 | 325 | $navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null; |
326 | 326 | } |
327 | - } else{ |
|
327 | + } else { |
|
328 | 328 | $menu_navigation['dashboard'] = isset($possible_tabs['dashboard']) ? $possible_tabs['dashboard'] : null; |
329 | 329 | } |
330 | 330 | |
@@ -422,34 +422,34 @@ discard block |
||
422 | 422 | $pageContent = ''; |
423 | 423 | // Get the extra page content, containing the links to add to the tabs |
424 | 424 | if (is_file($homepath.$menuTabs.'_'.$lang.$ext) && is_readable($homepath.$menuTabs.'_'.$lang.$ext)) { |
425 | - $pageContent = @(string) file_get_contents($homepath . $menuTabs . '_' . $lang . $ext); |
|
425 | + $pageContent = @(string) file_get_contents($homepath.$menuTabs.'_'.$lang.$ext); |
|
426 | 426 | } elseif (is_file($homepath.$menuTabs.$lang.$ext) && is_readable($homepath.$menuTabs.$lang.$ext)) { |
427 | - $pageContent = @(string) file_get_contents($homepath . $menuTabs . $lang . $ext); |
|
427 | + $pageContent = @(string) file_get_contents($homepath.$menuTabs.$lang.$ext); |
|
428 | 428 | } |
429 | 429 | // Sanitize page content |
430 | 430 | $pageContent = api_to_system_encoding($pageContent, api_detect_encoding(strip_tags($pageContent))); |
431 | - $open = str_replace('{rel_path}',api_get_path(REL_PATH), $pageContent); |
|
431 | + $open = str_replace('{rel_path}', api_get_path(REL_PATH), $pageContent); |
|
432 | 432 | $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
433 | 433 | // Get the extra page content, containing the links to add to the tabs |
434 | 434 | // that are only for users already logged in |
435 | 435 | $openMenuTabsLoggedIn = ''; |
436 | 436 | if (api_get_user_id() && !api_is_anonymous()) { |
437 | - if (is_file($homepath . $menuTabsLoggedIn . '_' . $lang . $ext) && is_readable($homepath . $menuTabsLoggedIn . '_' . $lang . $ext)) { |
|
438 | - $pageContent = @(string) file_get_contents($homepath . $menuTabsLoggedIn . '_' . $lang . $ext); |
|
437 | + if (is_file($homepath.$menuTabsLoggedIn.'_'.$lang.$ext) && is_readable($homepath.$menuTabsLoggedIn.'_'.$lang.$ext)) { |
|
438 | + $pageContent = @(string) file_get_contents($homepath.$menuTabsLoggedIn.'_'.$lang.$ext); |
|
439 | 439 | $pageContent = str_replace('::private', '', $pageContent); |
440 | - } elseif (is_file($homepath . $menuTabsLoggedIn . $lang . $ext) && is_readable($homepath . $menuTabsLoggedIn . $lang . $ext)) { |
|
441 | - $pageContent = @(string) file_get_contents($homepath . $menuTabsLoggedIn . $lang . $ext); |
|
440 | + } elseif (is_file($homepath.$menuTabsLoggedIn.$lang.$ext) && is_readable($homepath.$menuTabsLoggedIn.$lang.$ext)) { |
|
441 | + $pageContent = @(string) file_get_contents($homepath.$menuTabsLoggedIn.$lang.$ext); |
|
442 | 442 | $pageContent = str_replace('::private', '', $pageContent); |
443 | 443 | } |
444 | 444 | |
445 | 445 | $pageContent = api_to_system_encoding($pageContent, api_detect_encoding(strip_tags($pageContent))); |
446 | - $openMenuTabsLoggedIn = str_replace('{rel_path}',api_get_path(REL_PATH), $pageContent); |
|
446 | + $openMenuTabsLoggedIn = str_replace('{rel_path}', api_get_path(REL_PATH), $pageContent); |
|
447 | 447 | $openMenuTabsLoggedIn = api_to_system_encoding($openMenuTabsLoggedIn, api_detect_encoding(strip_tags($openMenuTabsLoggedIn))); |
448 | 448 | } |
449 | 449 | if (!empty($open) OR !empty($openMenuTabsLoggedIn)) { |
450 | 450 | if (strpos($open.$openMenuTabsLoggedIn, 'show_menu') === false) { |
451 | 451 | if (api_is_anonymous()) { |
452 | - $mainNavigation['navigation'][SECTION_CAMPUS] = null; |
|
452 | + $mainNavigation['navigation'][SECTION_CAMPUS] = null; |
|
453 | 453 | } |
454 | 454 | } else { |
455 | 455 | if (api_get_user_id() && !api_is_anonymous()) { |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | 'url' => $matches[1], |
463 | 463 | 'target' => $matches[2], |
464 | 464 | 'title' => $matches[3], |
465 | - 'key' => 'page-' . str_replace(' ', '-', strtolower($matches[3])) |
|
465 | + 'key' => 'page-'.str_replace(' ', '-', strtolower($matches[3])) |
|
466 | 466 | ); |
467 | 467 | } |
468 | 468 | } |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | 'url' => $matches[1], |
477 | 477 | 'target' => $matches[2], |
478 | 478 | 'title' => $matches[3], |
479 | - 'key' => 'page-' . str_replace(' ', '-', strtolower($matches[3])) |
|
479 | + 'key' => 'page-'.str_replace(' ', '-', strtolower($matches[3])) |
|
480 | 480 | ); |
481 | 481 | } |
482 | 482 | } |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | $activeSection = ''; |
490 | 490 | foreach ($mainNavigation['navigation'] as $section => $navigation_info) { |
491 | 491 | |
492 | - $key = (!empty($navigation_info['key'])?'tab-'.$navigation_info['key']:''); |
|
492 | + $key = (!empty($navigation_info['key']) ? 'tab-'.$navigation_info['key'] : ''); |
|
493 | 493 | |
494 | 494 | if (isset($GLOBALS['this_section'])) { |
495 | 495 | $tempSection = $section; |
@@ -503,7 +503,7 @@ discard block |
||
503 | 503 | // loaded |
504 | 504 | if ($GLOBALS['this_section'] == SECTION_CAMPUS) { |
505 | 505 | if (!empty($_GET['include'])) { |
506 | - $name = str_replace(' ', '-', strtolower($navigation_info['title'])) . '_' . $lang . $ext; |
|
506 | + $name = str_replace(' ', '-', strtolower($navigation_info['title'])).'_'.$lang.$ext; |
|
507 | 507 | if (strtolower($_GET['include']) == $name) { |
508 | 508 | $activeSection = $section; |
509 | 509 | } |
@@ -555,7 +555,7 @@ discard block |
||
555 | 555 | |
556 | 556 | if (!empty($_course) && !isset($_GET['hide_course_breadcrumb'])) { |
557 | 557 | |
558 | - $navigation_item['url'] = $web_course_path . $_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
558 | + $navigation_item['url'] = $web_course_path.$_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
559 | 559 | $_course['name'] = api_htmlentities($_course['name']); |
560 | 560 | $course_title = cut($_course['name'], MAX_LENGTH_BREADCRUMB); |
561 | 561 | |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name'].$my_session_name).' '.$course_title.$my_session_name; |
571 | 571 | break; |
572 | 572 | default: |
573 | - if (api_get_session_id() != -1 ) { |
|
573 | + if (api_get_session_id() != -1) { |
|
574 | 574 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name'].$my_session_name).' '.$course_title.$my_session_name; |
575 | 575 | } else { |
576 | 576 | $navigation_item['title'] = Display::img(api_get_path(WEB_IMG_PATH).'home.png', $_course['name']).' '.$course_title; |
@@ -605,22 +605,22 @@ discard block |
||
605 | 605 | // titles for shared folders |
606 | 606 | if ($breadcrumb_step['name'] == 'shared_folder') { |
607 | 607 | $navigation_item['title'] = get_lang('UserFolders'); |
608 | - } elseif(strstr($breadcrumb_step['name'], 'shared_folder_session_')) { |
|
608 | + } elseif (strstr($breadcrumb_step['name'], 'shared_folder_session_')) { |
|
609 | 609 | $navigation_item['title'] = get_lang('UserFolders'); |
610 | - } elseif(strstr($breadcrumb_step['name'], 'sf_user_')) { |
|
610 | + } elseif (strstr($breadcrumb_step['name'], 'sf_user_')) { |
|
611 | 611 | $userinfo = api_get_user_info(substr($breadcrumb_step['name'], 8)); |
612 | 612 | $navigation_item['title'] = $userinfo['complete_name']; |
613 | - } elseif($breadcrumb_step['name'] == 'chat_files') { |
|
613 | + } elseif ($breadcrumb_step['name'] == 'chat_files') { |
|
614 | 614 | $navigation_item['title'] = get_lang('ChatFiles'); |
615 | - } elseif($breadcrumb_step['name'] == 'images') { |
|
615 | + } elseif ($breadcrumb_step['name'] == 'images') { |
|
616 | 616 | $navigation_item['title'] = get_lang('Images'); |
617 | - } elseif($breadcrumb_step['name'] == 'video') { |
|
617 | + } elseif ($breadcrumb_step['name'] == 'video') { |
|
618 | 618 | $navigation_item['title'] = get_lang('Video'); |
619 | - } elseif($breadcrumb_step['name'] == 'audio') { |
|
619 | + } elseif ($breadcrumb_step['name'] == 'audio') { |
|
620 | 620 | $navigation_item['title'] = get_lang('Audio'); |
621 | - } elseif($breadcrumb_step['name'] == 'flash') { |
|
621 | + } elseif ($breadcrumb_step['name'] == 'flash') { |
|
622 | 622 | $navigation_item['title'] = get_lang('Flash'); |
623 | - } elseif($breadcrumb_step['name'] == 'gallery') { |
|
623 | + } elseif ($breadcrumb_step['name'] == 'gallery') { |
|
624 | 624 | $navigation_item['title'] = get_lang('Gallery'); |
625 | 625 | } |
626 | 626 | // Fixes breadcrumb title now we applied the Security::remove_XSS and |
@@ -690,35 +690,35 @@ discard block |
||
690 | 690 | if (!empty($final_navigation)) { |
691 | 691 | // $home_link.= '<span class="divider">/</span>'; |
692 | 692 | if (!empty($home_link)) { |
693 | - $lis.= Display::tag('li', $home_link); |
|
693 | + $lis .= Display::tag('li', $home_link); |
|
694 | 694 | } |
695 | 695 | |
696 | 696 | foreach ($final_navigation as $bread) { |
697 | 697 | $bread_check = trim(strip_tags($bread)); |
698 | 698 | if (!empty($bread_check)) { |
699 | - if ($final_navigation_count-1 > $i) { |
|
699 | + if ($final_navigation_count - 1 > $i) { |
|
700 | 700 | $bread .= ''; |
701 | 701 | } |
702 | - $lis.= Display::tag('li', $bread,array('class'=>'active')); |
|
702 | + $lis .= Display::tag('li', $bread, array('class'=>'active')); |
|
703 | 703 | $i++; |
704 | 704 | } |
705 | 705 | } |
706 | 706 | } else { |
707 | 707 | if (!empty($home_link)) { |
708 | - $lis.= Display::tag('li', $home_link); |
|
708 | + $lis .= Display::tag('li', $home_link); |
|
709 | 709 | } |
710 | 710 | } |
711 | 711 | |
712 | 712 | // View as student/teacher link |
713 | 713 | $view = null; |
714 | 714 | if (!empty($view_as_student_link)) { |
715 | - $view .= Display::tag('div', $view_as_student_link, array('id' => 'view_as_link','class' => 'pull-right')); |
|
715 | + $view .= Display::tag('div', $view_as_student_link, array('id' => 'view_as_link', 'class' => 'pull-right')); |
|
716 | 716 | } |
717 | 717 | |
718 | 718 | if (!empty($navigation_right)) { |
719 | - foreach($navigation_right as $item){ |
|
719 | + foreach ($navigation_right as $item) { |
|
720 | 720 | $extra_class = isset($item['class']) ? $item['class'] : null; |
721 | - $lis.= Display::tag('li', $item['title'], array('class' => $extra_class.' pull-right')); |
|
721 | + $lis .= Display::tag('li', $item['title'], array('class' => $extra_class.' pull-right')); |
|
722 | 722 | } |
723 | 723 | } |
724 | 724 | |
@@ -770,7 +770,7 @@ discard block |
||
770 | 770 | if (!empty($_course['id'])) { |
771 | 771 | if ($cacheEnabled) { |
772 | 772 | $apc = apcu_cache_info(true); |
773 | - $apc_end = $apc['start_time']+$apc['ttl']; |
|
773 | + $apc_end = $apc['start_time'] + $apc['ttl']; |
|
774 | 774 | if (apcu_exists('my_campus_whoisonline_count_simple_'.$_course['id']) && |
775 | 775 | (time() < $apc_end) && |
776 | 776 | apcu_fetch('my_campus_whoisonline_count_simple_'.$_course['id']) > 0 |
@@ -782,7 +782,7 @@ discard block |
||
782 | 782 | api_get_setting('time_limit_whosonline'), |
783 | 783 | $_course['id'] |
784 | 784 | ); |
785 | - apcu_store('my_campus_whoisonline_count_simple_'.$_course['id'],$numberOnlineInCourse,15); |
|
785 | + apcu_store('my_campus_whoisonline_count_simple_'.$_course['id'], $numberOnlineInCourse, 15); |
|
786 | 786 | } |
787 | 787 | } else { |
788 | 788 | $numberOnlineInCourse = who_is_online_in_this_course_count( |
@@ -1415,7 +1415,7 @@ discard block |
||
1415 | 1415 | |
1416 | 1416 | /** |
1417 | 1417 | * Get the emoji list to include in chat |
1418 | - * @return array |
|
1418 | + * @return string[] |
|
1419 | 1419 | */ |
1420 | 1420 | public static function getEmojisToInclude() |
1421 | 1421 | { |
@@ -1738,7 +1738,7 @@ discard block |
||
1738 | 1738 | |
1739 | 1739 | /** |
1740 | 1740 | * Get the number of users connected in chat |
1741 | - * @return mixed |
|
1741 | + * @return integer |
|
1742 | 1742 | */ |
1743 | 1743 | public function countUsersOnline() |
1744 | 1744 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | return ''; |
63 | 63 | } |
64 | 64 | |
65 | - Emojione\Emojione::$imagePathPNG = api_get_path(WEB_LIBRARY_PATH) . 'javascript/emojione/png/'; |
|
65 | + Emojione\Emojione::$imagePathPNG = api_get_path(WEB_LIBRARY_PATH).'javascript/emojione/png/'; |
|
66 | 66 | Emojione\Emojione::$ascii = true; |
67 | 67 | |
68 | 68 | $message = trim($message); |
@@ -95,15 +95,15 @@ discard block |
||
95 | 95 | $user = $em->find('ChamiloUserBundle:User', $this->userId); |
96 | 96 | $courseInfo = api_get_course_info_by_id($this->courseId); |
97 | 97 | $isMaster = (bool) api_is_course_admin(); |
98 | - $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document'; |
|
98 | + $document_path = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'; |
|
99 | 99 | $basepath_chat = '/chat_files'; |
100 | 100 | |
101 | 101 | if (!$this->groupId) { |
102 | 102 | $group_info = GroupManager::get_group_properties($this->groupId); |
103 | - $basepath_chat = $group_info['directory'] . '/chat_files'; |
|
103 | + $basepath_chat = $group_info['directory'].'/chat_files'; |
|
104 | 104 | } |
105 | 105 | |
106 | - $chat_path = $document_path . $basepath_chat . '/'; |
|
106 | + $chat_path = $document_path.$basepath_chat.'/'; |
|
107 | 107 | |
108 | 108 | if (!is_dir($chat_path)) { |
109 | 109 | if (is_file($chat_path)) { |
@@ -113,25 +113,25 @@ discard block |
||
113 | 113 | |
114 | 114 | $date_now = date('Y-m-d'); |
115 | 115 | $timeNow = date('d/m/y H:i:s'); |
116 | - $basename_chat = 'messages-' . $date_now; |
|
116 | + $basename_chat = 'messages-'.$date_now; |
|
117 | 117 | |
118 | 118 | if ($this->groupId && !$friendId) { |
119 | - $basename_chat = 'messages-' . $date_now . '_gid-' . $this->groupId; |
|
119 | + $basename_chat = 'messages-'.$date_now.'_gid-'.$this->groupId; |
|
120 | 120 | } elseif ($this->sessionId && !$friendId) { |
121 | - $basename_chat = 'messages-' . $date_now . '_sid-' . $this->sessionId; |
|
121 | + $basename_chat = 'messages-'.$date_now.'_sid-'.$this->sessionId; |
|
122 | 122 | } elseif ($friendId) { |
123 | 123 | if ($this->userId < $friendId) { |
124 | - $basename_chat = 'messages-' . $date_now . '_uid-' . $this->userId . '-' . $friendId; |
|
124 | + $basename_chat = 'messages-'.$date_now.'_uid-'.$this->userId.'-'.$friendId; |
|
125 | 125 | } else { |
126 | - $basename_chat = 'messages-' . $date_now . '_uid-' . $friendId . '-' . $this->userId; |
|
126 | + $basename_chat = 'messages-'.$date_now.'_uid-'.$friendId.'-'.$this->userId; |
|
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | 130 | $message = self::prepareMessage($message); |
131 | 131 | |
132 | - $fileTitle = $basename_chat . '.log.html'; |
|
133 | - $filePath = $basepath_chat . '/' . $fileTitle; |
|
134 | - $absoluteFilePath = $chat_path . $fileTitle; |
|
132 | + $fileTitle = $basename_chat.'.log.html'; |
|
133 | + $filePath = $basepath_chat.'/'.$fileTitle; |
|
134 | + $absoluteFilePath = $chat_path.$fileTitle; |
|
135 | 135 | |
136 | 136 | if (!file_exists($absoluteFilePath)) { |
137 | 137 | $doc_id = add_document($courseInfo, $filePath, 'file', 0, $fileTitle); |
@@ -164,23 +164,23 @@ discard block |
||
164 | 164 | $fileContent = ' |
165 | 165 | <div class="message-teacher"> |
166 | 166 | <div class="content-message"> |
167 | - <div class="chat-message-block-name">' . $user->getCompleteName() . '</div> |
|
168 | - <div class="chat-message-block-content">' . $message . '</div> |
|
169 | - <div class="message-date">' . $timeNow . '</div> |
|
167 | + <div class="chat-message-block-name">' . $user->getCompleteName().'</div> |
|
168 | + <div class="chat-message-block-content">' . $message.'</div> |
|
169 | + <div class="message-date">' . $timeNow.'</div> |
|
170 | 170 | </div> |
171 | 171 | <div class="icon-message"></div> |
172 | - <img class="chat-image" src="' . $userPhoto . '"> |
|
172 | + <img class="chat-image" src="' . $userPhoto.'"> |
|
173 | 173 | </div> |
174 | 174 | '; |
175 | 175 | } else { |
176 | 176 | $fileContent = ' |
177 | 177 | <div class="message-student"> |
178 | - <img class="chat-image" src="' . $userPhoto . '"> |
|
178 | + <img class="chat-image" src="' . $userPhoto.'"> |
|
179 | 179 | <div class="icon-message"></div> |
180 | 180 | <div class="content-message"> |
181 | - <div class="chat-message-block-name">' . $user->getCompleteName() . '</div> |
|
182 | - <div class="chat-message-block-content">' . $message . '</div> |
|
183 | - <div class="message-date">' . $timeNow . '</div> |
|
181 | + <div class="chat-message-block-name">' . $user->getCompleteName().'</div> |
|
182 | + <div class="chat-message-block-content">' . $message.'</div> |
|
183 | + <div class="message-date">' . $timeNow.'</div> |
|
184 | 184 | </div> |
185 | 185 | </div> |
186 | 186 | '; |
@@ -275,9 +275,9 @@ discard block |
||
275 | 275 | $extraCondition = null; |
276 | 276 | |
277 | 277 | if ($this->groupId) { |
278 | - $extraCondition = 'AND ccc.toGroupId = ' . intval($this->groupId); |
|
278 | + $extraCondition = 'AND ccc.toGroupId = '.intval($this->groupId); |
|
279 | 279 | } else { |
280 | - $extraCondition = 'AND ccc.sessionId = ' . intval($this->sessionId); |
|
280 | + $extraCondition = 'AND ccc.sessionId = '.intval($this->sessionId); |
|
281 | 281 | } |
282 | 282 | |
283 | 283 | $currentTime = new DateTime(api_get_utc_datetime(), new DateTimeZone('UTC')); |
@@ -1413,7 +1413,7 @@ discard block |
||
1413 | 1413 | { |
1414 | 1414 | return [ |
1415 | 1415 | ':bowtie:', |
1416 | - ':smile:'| |
|
1416 | + ':smile:' | |
|
1417 | 1417 | ':laughing:', |
1418 | 1418 | ':blush:', |
1419 | 1419 | ':smiley:', |
@@ -1487,17 +1487,17 @@ discard block |
||
1487 | 1487 | { |
1488 | 1488 | $date = date('Y-m-d'); |
1489 | 1489 | |
1490 | - $base = 'messages-' . $date . '.log.html'; |
|
1490 | + $base = 'messages-'.$date.'.log.html'; |
|
1491 | 1491 | |
1492 | 1492 | if ($this->groupId && !$friendId) { |
1493 | - $base = 'messages-' . $date . '_gid-' . $this->groupId . '.log.html'; |
|
1493 | + $base = 'messages-'.$date.'_gid-'.$this->groupId.'.log.html'; |
|
1494 | 1494 | } elseif ($this->sessionId && !$friendId) { |
1495 | - $base = 'messages-' . $date . '_sid-' . $this->sessionId . '.log.html'; |
|
1495 | + $base = 'messages-'.$date.'_sid-'.$this->sessionId.'.log.html'; |
|
1496 | 1496 | } elseif ($friendId) { |
1497 | 1497 | if ($this->userId < $friendId) { |
1498 | - $base = 'messages-' . $date . '_uid-' . $this->userId . '-' . $friendId . '.log.html'; |
|
1498 | + $base = 'messages-'.$date.'_uid-'.$this->userId.'-'.$friendId.'.log.html'; |
|
1499 | 1499 | } else { |
1500 | - $base = 'messages-' . $date . '_uid-' . $friendId . '-' . $this->userId . '.log.html'; |
|
1500 | + $base = 'messages-'.$date.'_uid-'.$friendId.'-'.$this->userId.'.log.html'; |
|
1501 | 1501 | } |
1502 | 1502 | } |
1503 | 1503 | |
@@ -1506,16 +1506,16 @@ discard block |
||
1506 | 1506 | } |
1507 | 1507 | |
1508 | 1508 | $courseInfo = api_get_course_info_by_id($this->courseId); |
1509 | - $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document'; |
|
1509 | + $document_path = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'; |
|
1510 | 1510 | |
1511 | - $chatPath = $document_path . '/chat_files/'; |
|
1511 | + $chatPath = $document_path.'/chat_files/'; |
|
1512 | 1512 | |
1513 | 1513 | if ($this->groupId) { |
1514 | 1514 | $group_info = GroupManager::get_group_properties($this->groupId); |
1515 | - $chatPath = $document_path . $group_info['directory'] . '/chat_files/'; |
|
1515 | + $chatPath = $document_path.$group_info['directory'].'/chat_files/'; |
|
1516 | 1516 | } |
1517 | 1517 | |
1518 | - return $chatPath . $base; |
|
1518 | + return $chatPath.$base; |
|
1519 | 1519 | } |
1520 | 1520 | |
1521 | 1521 | /** |
@@ -1528,16 +1528,16 @@ discard block |
||
1528 | 1528 | { |
1529 | 1529 | $courseInfo = api_get_course_info_by_id($this->courseId); |
1530 | 1530 | $date_now = date('Y-m-d'); |
1531 | - $isMaster = (bool)api_is_course_admin(); |
|
1531 | + $isMaster = (bool) api_is_course_admin(); |
|
1532 | 1532 | $basepath_chat = '/chat_files'; |
1533 | - $document_path = api_get_path(SYS_COURSE_PATH) . $courseInfo['path'] . '/document'; |
|
1533 | + $document_path = api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/document'; |
|
1534 | 1534 | |
1535 | 1535 | if ($this->groupId) { |
1536 | 1536 | $group_info = GroupManager:: get_group_properties($this->groupId); |
1537 | - $basepath_chat = $group_info['directory'] . '/chat_files'; |
|
1537 | + $basepath_chat = $group_info['directory'].'/chat_files'; |
|
1538 | 1538 | } |
1539 | 1539 | |
1540 | - $chat_path = $document_path . $basepath_chat . '/'; |
|
1540 | + $chat_path = $document_path.$basepath_chat.'/'; |
|
1541 | 1541 | |
1542 | 1542 | if (!is_dir($chat_path)) { |
1543 | 1543 | if (is_file($chat_path)) { |
@@ -1564,24 +1564,24 @@ discard block |
||
1564 | 1564 | } |
1565 | 1565 | } |
1566 | 1566 | |
1567 | - $filename_chat = 'messages-' . $date_now . '.log.html'; |
|
1567 | + $filename_chat = 'messages-'.$date_now.'.log.html'; |
|
1568 | 1568 | |
1569 | 1569 | if ($this->groupId && !$friendId) { |
1570 | - $filename_chat = 'messages-' . $date_now . '_gid-' . $this->groupId . '.log.html'; |
|
1570 | + $filename_chat = 'messages-'.$date_now.'_gid-'.$this->groupId.'.log.html'; |
|
1571 | 1571 | } else if ($this->sessionId && !$friendId) { |
1572 | - $filename_chat = 'messages-' . $date_now . '_sid-' . $this->sessionId . '.log.html'; |
|
1572 | + $filename_chat = 'messages-'.$date_now.'_sid-'.$this->sessionId.'.log.html'; |
|
1573 | 1573 | } elseif ($friendId) { |
1574 | 1574 | if ($this->userId < $friendId) { |
1575 | - $filename_chat = 'messages-' . $date_now . '_uid-' . $this->userId . '-' . $friendId . '.log.html'; |
|
1575 | + $filename_chat = 'messages-'.$date_now.'_uid-'.$this->userId.'-'.$friendId.'.log.html'; |
|
1576 | 1576 | } else { |
1577 | - $filename_chat = 'messages-' . $date_now . '_uid-' . $friendId . '-' . $this->userId . '.log.html'; |
|
1577 | + $filename_chat = 'messages-'.$date_now.'_uid-'.$friendId.'-'.$this->userId.'.log.html'; |
|
1578 | 1578 | } |
1579 | 1579 | } |
1580 | 1580 | |
1581 | - if (!file_exists($chat_path . $filename_chat)) { |
|
1582 | - @fclose(fopen($chat_path . $filename_chat, 'w')); |
|
1581 | + if (!file_exists($chat_path.$filename_chat)) { |
|
1582 | + @fclose(fopen($chat_path.$filename_chat, 'w')); |
|
1583 | 1583 | if (!api_is_anonymous()) { |
1584 | - $doc_id = add_document($courseInfo, $basepath_chat . '/' . $filename_chat, 'file', 0, $filename_chat); |
|
1584 | + $doc_id = add_document($courseInfo, $basepath_chat.'/'.$filename_chat, 'file', 0, $filename_chat); |
|
1585 | 1585 | api_item_property_update( |
1586 | 1586 | $courseInfo, |
1587 | 1587 | TOOL_DOCUMENT, |
@@ -1610,17 +1610,17 @@ discard block |
||
1610 | 1610 | } |
1611 | 1611 | } |
1612 | 1612 | |
1613 | - $basename_chat = 'messages-' . $date_now; |
|
1613 | + $basename_chat = 'messages-'.$date_now; |
|
1614 | 1614 | |
1615 | 1615 | if ($this->groupId && !$friendId) { |
1616 | - $basename_chat = 'messages-' . $date_now . '_gid-' . $this->groupId; |
|
1616 | + $basename_chat = 'messages-'.$date_now.'_gid-'.$this->groupId; |
|
1617 | 1617 | } else if ($this->sessionId && !$friendId) { |
1618 | - $basename_chat = 'messages-' . $date_now . '_sid-' . $this->sessionId; |
|
1618 | + $basename_chat = 'messages-'.$date_now.'_sid-'.$this->sessionId; |
|
1619 | 1619 | } elseif ($friendId) { |
1620 | 1620 | if ($this->userId < $friendId) { |
1621 | - $basename_chat = 'messages-' . $date_now . '_uid-' . $this->userId . '-' . $friendId; |
|
1621 | + $basename_chat = 'messages-'.$date_now.'_uid-'.$this->userId.'-'.$friendId; |
|
1622 | 1622 | } else { |
1623 | - $basename_chat = 'messages-' . $date_now . '_uid-' . $friendId . '-' . $this->userId; |
|
1623 | + $basename_chat = 'messages-'.$date_now.'_uid-'.$friendId.'-'.$this->userId; |
|
1624 | 1624 | } |
1625 | 1625 | } |
1626 | 1626 | |
@@ -1628,19 +1628,19 @@ discard block |
||
1628 | 1628 | |
1629 | 1629 | $i = 1; |
1630 | 1630 | |
1631 | - while (file_exists($chat_path . $basename_chat . '-' . $i . '.log.html')) { |
|
1631 | + while (file_exists($chat_path.$basename_chat.'-'.$i.'.log.html')) { |
|
1632 | 1632 | $i++; |
1633 | 1633 | } |
1634 | 1634 | |
1635 | - @rename($chat_path . $basename_chat . '.log.html', $chat_path . $basename_chat . '-' . $i . '.log.html'); |
|
1636 | - @fclose(fopen($chat_path . $basename_chat . '.log.html', 'w')); |
|
1635 | + @rename($chat_path.$basename_chat.'.log.html', $chat_path.$basename_chat.'-'.$i.'.log.html'); |
|
1636 | + @fclose(fopen($chat_path.$basename_chat.'.log.html', 'w')); |
|
1637 | 1637 | |
1638 | 1638 | $doc_id = add_document( |
1639 | 1639 | $courseInfo, |
1640 | - $basepath_chat . '/' . $basename_chat . '-' . $i . '.log.html', |
|
1640 | + $basepath_chat.'/'.$basename_chat.'-'.$i.'.log.html', |
|
1641 | 1641 | 'file', |
1642 | - filesize($chat_path . $basename_chat . '-' . $i . '.log.html'), |
|
1643 | - $basename_chat . '-' . $i . '.log.html' |
|
1642 | + filesize($chat_path.$basename_chat.'-'.$i.'.log.html'), |
|
1643 | + $basename_chat.'-'.$i.'.log.html' |
|
1644 | 1644 | ); |
1645 | 1645 | |
1646 | 1646 | api_item_property_update( |
@@ -1671,7 +1671,7 @@ discard block |
||
1671 | 1671 | |
1672 | 1672 | $doc_id = DocumentManager::get_document_id( |
1673 | 1673 | $courseInfo, |
1674 | - $basepath_chat . '/' . $basename_chat . '.log.html' |
|
1674 | + $basepath_chat.'/'.$basename_chat.'.log.html' |
|
1675 | 1675 | ); |
1676 | 1676 | |
1677 | 1677 | update_existing_document($courseInfo, $doc_id, 0); |
@@ -1680,8 +1680,8 @@ discard block |
||
1680 | 1680 | $remove = 0; |
1681 | 1681 | $content = array(); |
1682 | 1682 | |
1683 | - if (file_exists($chat_path . $basename_chat . '.log.html')) { |
|
1684 | - $content = file($chat_path . $basename_chat . '.log.html'); |
|
1683 | + if (file_exists($chat_path.$basename_chat.'.log.html')) { |
|
1684 | + $content = file($chat_path.$basename_chat.'.log.html'); |
|
1685 | 1685 | $nbr_lines = sizeof($content); |
1686 | 1686 | $remove = $nbr_lines - 100; |
1687 | 1687 | } |
@@ -1694,7 +1694,7 @@ discard block |
||
1694 | 1694 | |
1695 | 1695 | if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonline') { |
1696 | 1696 | //the caller |
1697 | - $content[0] = get_lang('CallSent') . '<br />' . $content[0]; |
|
1697 | + $content[0] = get_lang('CallSent').'<br />'.$content[0]; |
|
1698 | 1698 | } |
1699 | 1699 | if (isset($_GET['origin']) && $_GET['origin'] == 'whoisonlinejoin') { |
1700 | 1700 | //the joiner (we have to delete the chat request to him when he joins the chat) |
@@ -1719,7 +1719,7 @@ discard block |
||
1719 | 1719 | $history .= ' |
1720 | 1720 | <div id="clear-chat"> |
1721 | 1721 | <button type="button" id="chat-reset" class="btn btn-danger btn-sm"> |
1722 | - ' . get_lang('ClearList') . ' |
|
1722 | + ' . get_lang('ClearList').' |
|
1723 | 1723 | </button> |
1724 | 1724 | </div> |
1725 | 1725 | '; |
@@ -1740,9 +1740,9 @@ discard block |
||
1740 | 1740 | $extraCondition = null; |
1741 | 1741 | |
1742 | 1742 | if ($this->groupId) { |
1743 | - $extraCondition = 'AND ccc.toGroupId = ' . intval($this->groupId); |
|
1743 | + $extraCondition = 'AND ccc.toGroupId = '.intval($this->groupId); |
|
1744 | 1744 | } else { |
1745 | - $extraCondition = 'AND ccc.sessionId = ' . intval($this->sessionId); |
|
1745 | + $extraCondition = 'AND ccc.sessionId = '.intval($this->sessionId); |
|
1746 | 1746 | } |
1747 | 1747 | |
1748 | 1748 | $number = Database::getManager() |
@@ -1772,9 +1772,9 @@ discard block |
||
1772 | 1772 | $extraCondition = null; |
1773 | 1773 | |
1774 | 1774 | if ($this->groupId) { |
1775 | - $extraCondition = 'AND ccc.toGroupId = ' . intval($this->groupId); |
|
1775 | + $extraCondition = 'AND ccc.toGroupId = '.intval($this->groupId); |
|
1776 | 1776 | } else { |
1777 | - $extraCondition = 'AND ccc.sessionId = ' . intval($this->sessionId); |
|
1777 | + $extraCondition = 'AND ccc.sessionId = '.intval($this->sessionId); |
|
1778 | 1778 | } |
1779 | 1779 | |
1780 | 1780 | $number = Database::getManager() |
@@ -1810,7 +1810,7 @@ discard block |
||
1810 | 1810 | 'lastname' => $user->getLastname(), |
1811 | 1811 | 'status' => !$this->sessionId ? $subscription->getStatus() : $user->getStatus(), |
1812 | 1812 | 'image_url' => UserManager::getUserPicture($user->getId(), USER_IMAGE_SIZE_MEDIUM), |
1813 | - 'profile_url' => api_get_path(WEB_CODE_PATH) . 'social/profile.php?u=' . $user->getId(), |
|
1813 | + 'profile_url' => api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$user->getId(), |
|
1814 | 1814 | 'complete_name' => $user->getCompleteName(), |
1815 | 1815 | 'username' => $user->getUsername(), |
1816 | 1816 | 'email' => $user->getEmail(), |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | ]; |
18 | 18 | |
19 | 19 | foreach ($externalCSS as $css) { |
20 | - $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH) . $css); |
|
20 | + $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_JS_PATH).$css); |
|
21 | 21 | } |
22 | 22 | |
23 | -$htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH) . 'chat.css'); |
|
24 | -$htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH) . 'markdown.css'); |
|
23 | +$htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css'); |
|
24 | +$htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'markdown.css'); |
|
25 | 25 | |
26 | 26 | $externalJS = [ |
27 | 27 | 'highlight/highlight.pack.js', |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | continue; |
42 | 42 | } |
43 | 43 | |
44 | - $iconList[$key] = strtoupper($icon) . '.png'; |
|
44 | + $iconList[$key] = strtoupper($icon).'.png'; |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | $view = new Template(get_lang('Chat'), false, false, false, true, false); |
@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | |
17 | 17 | if (isset($_GET['extra_field'])) { |
18 | 18 | $extraField = $em->find('ChamiloCoreBundle:ExtraField', intval($_GET['extra_field'])); |
19 | - $variableLanguage = '$' . api_underscore_to_camel_case($extraField->getVariable()); |
|
19 | + $variableLanguage = '$'.api_underscore_to_camel_case($extraField->getVariable()); |
|
20 | 20 | $originalName = $extraField->getDisplayText(false); |
21 | 21 | } elseif (isset($_GET['extra_field_option'])) { |
22 | 22 | $extraFieldOption = $em->find('ChamiloCoreBundle:ExtraFieldOptions', intval($_GET['extra_field_option'])); |
23 | 23 | $extraField = $extraFieldOption->getField(); |
24 | - $variableLanguage = '$' . ExtraFieldOption::getLanguageVariable($extraFieldOption->getDisplayText()); |
|
24 | + $variableLanguage = '$'.ExtraFieldOption::getLanguageVariable($extraFieldOption->getDisplayText()); |
|
25 | 25 | $originalName = $extraFieldOption->getDisplayText(false); |
26 | 26 | } |
27 | 27 | |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $languagesOptions[$language->getId()] = $language->getOriginalName(); |
42 | 42 | } |
43 | 43 | |
44 | -$translateUrl = api_get_path(WEB_CODE_PATH) . 'admin/sub_language_ajax.inc.php'; |
|
44 | +$translateUrl = api_get_path(WEB_CODE_PATH).'admin/sub_language_ajax.inc.php'; |
|
45 | 45 | |
46 | 46 | $form = new FormValidator('new_lang_variable', 'POST', $translateUrl); |
47 | 47 | $form->addHeader(get_lang('AddWordForTheSubLanguage')); |
@@ -70,24 +70,24 @@ discard block |
||
70 | 70 | $form->addRule('sub_language', get_lang('Required'), 'required'); |
71 | 71 | $form->freeze(['variable_language', 'original_name']); |
72 | 72 | |
73 | -$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH) . 'admin', 'name' => get_lang('Administration')]; |
|
73 | +$interbreadcrumb[] = ['url' => api_get_path(WEB_CODE_PATH).'admin', 'name' => get_lang('Administration')]; |
|
74 | 74 | |
75 | 75 | switch ($extraField->getExtraFieldType()) { |
76 | 76 | case \Chamilo\CoreBundle\Entity\ExtraField::USER_FIELD_TYPE: |
77 | 77 | $interbreadcrumb[] = [ |
78 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=user', |
|
78 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=user', |
|
79 | 79 | 'name' => get_lang('UserFields') |
80 | 80 | ]; |
81 | 81 | break; |
82 | 82 | case \Chamilo\CoreBundle\Entity\ExtraField::COURSE_FIELD_TYPE: |
83 | 83 | $interbreadcrumb[] = [ |
84 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=course', |
|
84 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=course', |
|
85 | 85 | 'name' => get_lang('CourseFields') |
86 | 86 | ]; |
87 | 87 | break; |
88 | 88 | case \Chamilo\CoreBundle\Entity\ExtraField::SESSION_FIELD_TYPE: |
89 | 89 | $interbreadcrumb[] = [ |
90 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type=session', |
|
90 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type=session', |
|
91 | 91 | 'name' => get_lang('SessionFields') |
92 | 92 | ]; |
93 | 93 | break; |
@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | |
10 | 10 | api_protect_admin_script(); |
11 | 11 | |
12 | -$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
13 | -$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
14 | -$file_id = intval($_REQUEST['file_id']); |
|
12 | +$new_language = Security::remove_XSS($_REQUEST['new_language']); |
|
13 | +$language_variable = Security::remove_XSS($_REQUEST['variable_language']); |
|
14 | +$file_id = intval($_REQUEST['file_id']); |
|
15 | 15 | /** |
16 | 16 | * Code |
17 | 17 | */ |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | |
28 | 28 | //update variable language |
29 | 29 | // Replace double quotes to avoid parse errors |
30 | - $new_language = str_replace('"', '\"',$new_language); |
|
30 | + $new_language = str_replace('"', '\"', $new_language); |
|
31 | 31 | // Replace new line signs to avoid parse errors - see #6773 |
32 | - $new_language = str_replace("\n","\\n",$new_language); |
|
33 | - $all_file_of_directory[$language_variable]="\"".$new_language."\";"; |
|
32 | + $new_language = str_replace("\n", "\\n", $new_language); |
|
33 | + $all_file_of_directory[$language_variable] = "\"".$new_language."\";"; |
|
34 | 34 | $result_array = array(); |
35 | 35 | |
36 | 36 | foreach ($all_file_of_directory as $key_value=>$value_info) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | if (!empty($result_array)) { |
41 | 41 | foreach ($result_array as $key => $result) { |
42 | 42 | if ($result == false) { |
43 | - $variables_with_problems .=$key.' <br />'; |
|
43 | + $variables_with_problems .= $key.' <br />'; |
|
44 | 44 | } |
45 | 45 | } |
46 | 46 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | Display::return_message(get_lang('TheNewWordHasBeenAdded'), 'success') |
51 | 51 | ); |
52 | 52 | |
53 | - $redirectUrl = api_get_path(WEB_CODE_PATH) . 'admin/extra_fields.php?type='; |
|
53 | + $redirectUrl = api_get_path(WEB_CODE_PATH).'admin/extra_fields.php?type='; |
|
54 | 54 | |
55 | 55 | switch ($_REQUEST['extra_field_type']) { |
56 | 56 | case \Chamilo\CoreBundle\Entity\ExtraField::USER_FIELD_TYPE: |
@@ -26,19 +26,19 @@ discard block |
||
26 | 26 | ); |
27 | 27 | |
28 | 28 | public $ops = array( |
29 | - 'eq' => '=', //equal |
|
30 | - 'ne' => '<>', //not equal |
|
31 | - 'lt' => '<', //less than |
|
32 | - 'le' => '<=', //less than or equal |
|
33 | - 'gt' => '>', //greater than |
|
34 | - 'ge' => '>=', //greater than or equal |
|
35 | - 'bw' => 'LIKE', //begins with |
|
29 | + 'eq' => '=', //equal |
|
30 | + 'ne' => '<>', //not equal |
|
31 | + 'lt' => '<', //less than |
|
32 | + 'le' => '<=', //less than or equal |
|
33 | + 'gt' => '>', //greater than |
|
34 | + 'ge' => '>=', //greater than or equal |
|
35 | + 'bw' => 'LIKE', //begins with |
|
36 | 36 | 'bn' => 'NOT LIKE', //doesn't begin with |
37 | - 'in' => 'LIKE', //is in |
|
37 | + 'in' => 'LIKE', //is in |
|
38 | 38 | 'ni' => 'NOT LIKE', //is not in |
39 | - 'ew' => 'LIKE', //ends with |
|
39 | + 'ew' => 'LIKE', //ends with |
|
40 | 40 | 'en' => 'NOT LIKE', //doesn't end with |
41 | - 'cn' => 'LIKE', //contains |
|
41 | + 'cn' => 'LIKE', //contains |
|
42 | 42 | 'nc' => 'NOT LIKE' //doesn't contain |
43 | 43 | ); |
44 | 44 | |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | */ |
344 | 344 | public static function get_extra_fields_by_handler($handler) |
345 | 345 | { |
346 | - $types= array(); |
|
346 | + $types = array(); |
|
347 | 347 | $types[self::FIELD_TYPE_TEXT] = get_lang('FieldTypeText'); |
348 | 348 | $types[self::FIELD_TYPE_TEXTAREA] = get_lang('FieldTypeTextarea'); |
349 | 349 | $types[self::FIELD_TYPE_RADIO] = get_lang('FieldTypeRadio'); |
@@ -1027,7 +1027,7 @@ discard block |
||
1027 | 1027 | // chzn-select doesn't work for sessions?? |
1028 | 1028 | $form->addElement( |
1029 | 1029 | 'select', |
1030 | - 'extra_' . $field_details['variable'], |
|
1030 | + 'extra_'.$field_details['variable'], |
|
1031 | 1031 | $field_details['display_text'], |
1032 | 1032 | $options, |
1033 | 1033 | array('id' => 'extra_'.$field_details['variable']) |
@@ -1086,7 +1086,7 @@ discard block |
||
1086 | 1086 | |
1087 | 1087 | if (!$admin_permissions) { |
1088 | 1088 | if ($field_details['visible'] == 0) { |
1089 | - $form->freeze('extra_' . $field_details['variable']); |
|
1089 | + $form->freeze('extra_'.$field_details['variable']); |
|
1090 | 1090 | } |
1091 | 1091 | } |
1092 | 1092 | break; |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | } |
1164 | 1164 | });'; |
1165 | 1165 | |
1166 | - $first_id = null; |
|
1166 | + $first_id = null; |
|
1167 | 1167 | if (!empty($extraData)) { |
1168 | 1168 | if (isset($extraData['extra_'.$field_details['variable']])) { |
1169 | 1169 | $first_id = $extraData['extra_'.$field_details['variable']]['extra_'.$field_details['variable']]; |
@@ -1424,9 +1424,9 @@ discard block |
||
1424 | 1424 | |
1425 | 1425 | if (is_array($extraData) && array_key_exists($fieldVariable, $extraData)) { |
1426 | 1426 | |
1427 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1427 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1428 | 1428 | $fieldTexts[] = Display::img( |
1429 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1429 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1430 | 1430 | $field_details['display_text'], |
1431 | 1431 | ['width' => '300'] |
1432 | 1432 | ); |
@@ -1450,7 +1450,7 @@ discard block |
||
1450 | 1450 | $allowed_picture_types = ['jpg', 'jpeg', 'png', 'gif']; |
1451 | 1451 | $form->addRule( |
1452 | 1452 | 'extra_'.$field_details['variable'], |
1453 | - get_lang('OnlyImagesAllowed') . ' ('.implode(',', $allowed_picture_types).')', |
|
1453 | + get_lang('OnlyImagesAllowed').' ('.implode(',', $allowed_picture_types).')', |
|
1454 | 1454 | 'filetype', |
1455 | 1455 | $allowed_picture_types |
1456 | 1456 | ); |
@@ -1492,10 +1492,10 @@ discard block |
||
1492 | 1492 | if (is_array($extraData) && |
1493 | 1493 | array_key_exists($fieldVariable, $extraData) |
1494 | 1494 | ) { |
1495 | - if (file_exists(api_get_path(SYS_UPLOAD_PATH) . $extraData[$fieldVariable])) { |
|
1495 | + if (file_exists(api_get_path(SYS_UPLOAD_PATH).$extraData[$fieldVariable])) { |
|
1496 | 1496 | $fieldTexts[] = Display::url( |
1497 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1498 | - api_get_path(WEB_UPLOAD_PATH) . $extraData[$fieldVariable], |
|
1497 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1498 | + api_get_path(WEB_UPLOAD_PATH).$extraData[$fieldVariable], |
|
1499 | 1499 | array( |
1500 | 1500 | 'title' => $field_details['display_text'], |
1501 | 1501 | 'target' => '_blank' |
@@ -1535,12 +1535,12 @@ discard block |
||
1535 | 1535 | "extra_{$field_details['variable']}", |
1536 | 1536 | $field_details['display_text'] |
1537 | 1537 | ); |
1538 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1538 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1539 | 1539 | |
1540 | 1540 | if (!$admin_permissions) { |
1541 | 1541 | if ($field_details['visible'] == 0) { |
1542 | 1542 | $form->freeze( |
1543 | - 'extra_' . $field_details['variable'] |
|
1543 | + 'extra_'.$field_details['variable'] |
|
1544 | 1544 | ); |
1545 | 1545 | } |
1546 | 1546 | } |
@@ -1551,13 +1551,13 @@ discard block |
||
1551 | 1551 | $field_details['display_text'] |
1552 | 1552 | ); |
1553 | 1553 | $form->applyFilter( |
1554 | - 'extra_' . $field_details['variable'], |
|
1554 | + 'extra_'.$field_details['variable'], |
|
1555 | 1555 | 'stripslashes' |
1556 | 1556 | ); |
1557 | 1557 | if (!$admin_permissions) { |
1558 | 1558 | if ($field_details['visible'] == 0) { |
1559 | 1559 | $form->freeze( |
1560 | - 'extra_' . $field_details['variable'] |
|
1560 | + 'extra_'.$field_details['variable'] |
|
1561 | 1561 | ); |
1562 | 1562 | } |
1563 | 1563 | } |
@@ -1567,12 +1567,12 @@ discard block |
||
1567 | 1567 | "extra_{$field_details['variable']}", |
1568 | 1568 | $field_details['display_text'] |
1569 | 1569 | ); |
1570 | - $form->applyFilter('extra_' . $field_details['variable'], 'stripslashes'); |
|
1570 | + $form->applyFilter('extra_'.$field_details['variable'], 'stripslashes'); |
|
1571 | 1571 | |
1572 | 1572 | if (!$admin_permissions) { |
1573 | 1573 | if ($field_details['visible'] == 0) { |
1574 | 1574 | $form->freeze( |
1575 | - 'extra_' . $field_details['variable'] |
|
1575 | + 'extra_'.$field_details['variable'] |
|
1576 | 1576 | ); |
1577 | 1577 | } |
1578 | 1578 | } |
@@ -1583,13 +1583,13 @@ discard block |
||
1583 | 1583 | $field_details['display_text'] |
1584 | 1584 | ); |
1585 | 1585 | $form->applyFilter( |
1586 | - 'extra_' . $field_details['variable'], |
|
1586 | + 'extra_'.$field_details['variable'], |
|
1587 | 1587 | 'stripslashes' |
1588 | 1588 | ); |
1589 | 1589 | if (!$admin_permissions) { |
1590 | 1590 | if ($field_details['visible'] == 0) { |
1591 | 1591 | $form->freeze( |
1592 | - 'extra_' . $field_details['variable'] |
|
1592 | + 'extra_'.$field_details['variable'] |
|
1593 | 1593 | ); |
1594 | 1594 | } |
1595 | 1595 | } |
@@ -1618,7 +1618,7 @@ discard block |
||
1618 | 1618 | '<script> |
1619 | 1619 | $(document).ready(function() { |
1620 | 1620 | |
1621 | - var address = "' . $dataValue . '"; |
|
1621 | + var address = "' . $dataValue.'"; |
|
1622 | 1622 | initializeGeo'.$field_details['variable'].'(address, false); |
1623 | 1623 | |
1624 | 1624 | $("#geolocalization_extra_'.$field_details['variable'].'").on("click", function() { |
@@ -1650,7 +1650,7 @@ discard block |
||
1650 | 1650 | }; |
1651 | 1651 | |
1652 | 1652 | var geoError = function(error) { |
1653 | - alert("Geocode ' . get_lang('Error') . ': " + error); |
|
1653 | + alert("Geocode ' . get_lang('Error').': " + error); |
|
1654 | 1654 | }; |
1655 | 1655 | |
1656 | 1656 | var geoOptions = { |
@@ -1701,11 +1701,11 @@ discard block |
||
1701 | 1701 | infowindow.open(map_'.$field_details['variable'].', marker); |
1702 | 1702 | }); |
1703 | 1703 | } else { |
1704 | - alert("' . get_lang("NotFound") . '"); |
|
1704 | + alert("' . get_lang("NotFound").'"); |
|
1705 | 1705 | } |
1706 | 1706 | |
1707 | 1707 | } else { |
1708 | - alert("Geocode ' . get_lang('Error') . ': " + status); |
|
1708 | + alert("Geocode ' . get_lang('Error').': " + status); |
|
1709 | 1709 | } |
1710 | 1710 | }); |
1711 | 1711 | } |
@@ -1893,7 +1893,7 @@ discard block |
||
1893 | 1893 | $form->addElement('header', $header); |
1894 | 1894 | |
1895 | 1895 | if ($action == 'edit') { |
1896 | - $translateUrl = api_get_path(WEB_CODE_PATH) . 'extrafield/translate.php?' . http_build_query([ |
|
1896 | + $translateUrl = api_get_path(WEB_CODE_PATH).'extrafield/translate.php?'.http_build_query([ |
|
1897 | 1897 | 'extra_field' => $id |
1898 | 1898 | ]); |
1899 | 1899 | $translateButton = Display::toolbarButton(get_lang('TranslateThisTerm'), $translateUrl, 'language', 'link'); |
@@ -2224,7 +2224,7 @@ discard block |
||
2224 | 2224 | foreach ($extra_fields as $extra_info) { |
2225 | 2225 | $extra_field_info = $extra_info['extra_field_info']; |
2226 | 2226 | $inject_joins .= " INNER JOIN $this->table_field_values fv$counter |
2227 | - ON (s." . $this->primaryKey . " = fv$counter." . $this->handler_id . ") "; |
|
2227 | + ON (s.".$this->primaryKey." = fv$counter.".$this->handler_id.") "; |
|
2228 | 2228 | // Add options |
2229 | 2229 | if (isset($extra_field_info['field_type']) && in_array( |
2230 | 2230 | $extra_field_info['field_type'], |
@@ -2237,7 +2237,7 @@ discard block |
||
2237 | 2237 | ) { |
2238 | 2238 | $options['where'] = str_replace( |
2239 | 2239 | $extra_info['field'], |
2240 | - 'fv' . $counter . '.field_id = ' . $extra_info['id'] . ' AND fvo' . $counter . '.option_value', |
|
2240 | + 'fv'.$counter.'.field_id = '.$extra_info['id'].' AND fvo'.$counter.'.option_value', |
|
2241 | 2241 | $options['where'] |
2242 | 2242 | ); |
2243 | 2243 | $inject_joins .= " |
@@ -2252,13 +2252,13 @@ discard block |
||
2252 | 2252 | ) { |
2253 | 2253 | $options['where'] = str_replace( |
2254 | 2254 | $extra_info['field'], |
2255 | - 'tag' . $counter . '.tag ', |
|
2255 | + 'tag'.$counter.'.tag ', |
|
2256 | 2256 | $options['where'] |
2257 | 2257 | ); |
2258 | 2258 | |
2259 | 2259 | $inject_joins .= " |
2260 | 2260 | INNER JOIN $this->table_field_rel_tag tag_rel$counter |
2261 | - ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s." . $this->primaryKey.") |
|
2261 | + ON (tag_rel$counter.field_id = ".$extra_info['id']." AND tag_rel$counter.item_id = s.".$this->primaryKey.") |
|
2262 | 2262 | INNER JOIN $this->table_field_tag tag$counter |
2263 | 2263 | ON (tag$counter.id = tag_rel$counter.tag_id) |
2264 | 2264 | "; |
@@ -2463,19 +2463,19 @@ discard block |
||
2463 | 2463 | break; |
2464 | 2464 | } |
2465 | 2465 | |
2466 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2466 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2467 | 2467 | break; |
2468 | 2468 | } |
2469 | 2469 | |
2470 | 2470 | $image = Display::img( |
2471 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2471 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2472 | 2472 | $field['display_text'], |
2473 | 2473 | array('width' => '300') |
2474 | 2474 | ); |
2475 | 2475 | |
2476 | 2476 | $displayedValue = Display::url( |
2477 | 2477 | $image, |
2478 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2478 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2479 | 2479 | array('target' => '_blank') |
2480 | 2480 | ); |
2481 | 2481 | break; |
@@ -2484,13 +2484,13 @@ discard block |
||
2484 | 2484 | break; |
2485 | 2485 | } |
2486 | 2486 | |
2487 | - if (!file_exists(api_get_path(SYS_UPLOAD_PATH) . $valueData['value'])) { |
|
2487 | + if (!file_exists(api_get_path(SYS_UPLOAD_PATH).$valueData['value'])) { |
|
2488 | 2488 | break; |
2489 | 2489 | } |
2490 | 2490 | |
2491 | 2491 | $displayedValue = Display::url( |
2492 | 2492 | get_lang('Download'), |
2493 | - api_get_path(WEB_UPLOAD_PATH) . $valueData['value'], |
|
2493 | + api_get_path(WEB_UPLOAD_PATH).$valueData['value'], |
|
2494 | 2494 | array( |
2495 | 2495 | 'title' => $field['display_text'], |
2496 | 2496 | 'target' => '_blank' |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * @return array |
|
143 | + * @return string[] |
|
144 | 144 | */ |
145 | 145 | public static function getValidExtraFieldTypes() |
146 | 146 | { |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | |
218 | 218 | /** |
219 | 219 | * @param array $conditions |
220 | - * @param null $order_field_options_by |
|
220 | + * @param string $order_field_options_by |
|
221 | 221 | * |
222 | 222 | * @return array |
223 | 223 | */ |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | /** |
376 | 376 | * @param string $handler |
377 | 377 | * |
378 | - * @return array |
|
378 | + * @return string[] |
|
379 | 379 | */ |
380 | 380 | public static function get_extra_fields_by_handler($handler) |
381 | 381 | { |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * @return array |
|
577 | + * @return string[] |
|
578 | 578 | */ |
579 | 579 | public function get_field_types() |
580 | 580 | { |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | /** |
585 | 585 | * @param int $id |
586 | 586 | * |
587 | - * @return null |
|
587 | + * @return string|null |
|
588 | 588 | */ |
589 | 589 | public function get_field_type_by_id($id) |
590 | 590 | { |
@@ -1826,7 +1826,7 @@ discard block |
||
1826 | 1826 | } |
1827 | 1827 | |
1828 | 1828 | /** |
1829 | - * @return array |
|
1829 | + * @return string[] |
|
1830 | 1830 | */ |
1831 | 1831 | public function getJqgridColumnNames() |
1832 | 1832 | { |
@@ -2086,7 +2086,7 @@ discard block |
||
2086 | 2086 | } |
2087 | 2087 | |
2088 | 2088 | /** |
2089 | - * @param array $columns |
|
2089 | + * @param string[] $columns |
|
2090 | 2090 | * @param array $column_model |
2091 | 2091 | * @param array $extraFields |
2092 | 2092 | * @return array |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | 'changeable', |
21 | 21 | 'filter', |
22 | 22 | 'extra_field_type', |
23 | - /* Enable this when field_loggeable is introduced as a table field (2.0) |
|
23 | + /* Enable this when field_loggeable is introduced as a table field (2.0) |
|
24 | 24 | 'field_loggeable', |
25 | 25 | */ |
26 | 26 | 'created_at' |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | foreach ($orderFields as $order) { |
813 | 813 | foreach ($extra as $field_details) { |
814 | 814 | if ($order == $field_details['variable']) { |
815 | - $newOrder[] = $field_details; |
|
815 | + $newOrder[] = $field_details; |
|
816 | 816 | } |
817 | 817 | } |
818 | 818 | } |
@@ -1883,7 +1883,7 @@ discard block |
||
1883 | 1883 | 'align' => 'left', |
1884 | 1884 | 'sortable' => 'true', |
1885 | 1885 | ), |
1886 | - array( |
|
1886 | + array( |
|
1887 | 1887 | 'name' => 'visible_to_others', |
1888 | 1888 | 'index' => 'visible_to_others', |
1889 | 1889 | 'width' => '40', |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | * @param string $message confirmation message(optional) |
63 | 63 | * @param string $error error message(optional) |
64 | 64 | */ |
65 | - public function categories_list($action, $message='', $error='') |
|
65 | + public function categories_list($action, $message = '', $error = '') |
|
66 | 66 | { |
67 | 67 | $data = array(); |
68 | 68 | $data['user_course_categories'] = $this->model->get_user_course_categories(); |
@@ -393,13 +393,13 @@ discard block |
||
393 | 393 | $html .= '</strong>'; |
394 | 394 | } else { |
395 | 395 | if (!empty($categoryCourses)) { |
396 | - $html .= '<a href="' . CourseCategory::getCourseCategoryUrl( |
|
396 | + $html .= '<a href="'.CourseCategory::getCourseCategoryUrl( |
|
397 | 397 | 1, |
398 | 398 | $limit['length'], |
399 | 399 | $categoryCode, |
400 | 400 | $hiddenLinks, |
401 | 401 | $action |
402 | - ) . '">'; |
|
402 | + ).'">'; |
|
403 | 403 | $html .= "$categoryName ($categoryCourses)"; |
404 | 404 | $html .= '</a>'; |
405 | 405 | } else { |
@@ -420,13 +420,13 @@ discard block |
||
420 | 420 | if ($code == $subCategory1Code) { |
421 | 421 | $html .= "<strong>$subCategory1Name ($subCategory1Courses)</strong>"; |
422 | 422 | } else { |
423 | - $html .= '<a href="' . CourseCategory::getCourseCategoryUrl( |
|
423 | + $html .= '<a href="'.CourseCategory::getCourseCategoryUrl( |
|
424 | 424 | 1, |
425 | 425 | $limit['length'], |
426 | 426 | $categoryCode, |
427 | 427 | $hiddenLinks, |
428 | 428 | $action |
429 | - ) . '">'; |
|
429 | + ).'">'; |
|
430 | 430 | $html .= "$subCategory1Name ($subCategory1Courses)"; |
431 | 431 | $html .= '</a>'; |
432 | 432 | } |
@@ -444,13 +444,13 @@ discard block |
||
444 | 444 | if ($code == $subCategory2Code) { |
445 | 445 | $html .= "<strong>$subCategory2Name ($subCategory2Courses)</strong>"; |
446 | 446 | } else { |
447 | - $html .= '<a href="' . CourseCategory::getCourseCategoryUrl( |
|
447 | + $html .= '<a href="'.CourseCategory::getCourseCategoryUrl( |
|
448 | 448 | 1, |
449 | 449 | $limit['length'], |
450 | 450 | $categoryCode, |
451 | 451 | $hiddenLinks, |
452 | 452 | $action |
453 | - ) . '">'; |
|
453 | + ).'">'; |
|
454 | 454 | $html .= "$subCategory2Name ($subCategory2Courses)"; |
455 | 455 | $html .= '</a>'; |
456 | 456 | } |
@@ -468,13 +468,13 @@ discard block |
||
468 | 468 | if ($code == $subCategory3Code) { |
469 | 469 | $html .= "<strong>$subCategory3Name ($subCategory3Courses)</strong>"; |
470 | 470 | } else { |
471 | - $html .= '<a href="' . CourseCategory::getCourseCategoryUrl( |
|
471 | + $html .= '<a href="'.CourseCategory::getCourseCategoryUrl( |
|
472 | 472 | 1, |
473 | 473 | $limit['length'], |
474 | 474 | $categoryCode, |
475 | 475 | $hiddenLinks, |
476 | 476 | $action |
477 | - ) . '">'; |
|
477 | + ).'">'; |
|
478 | 478 | $html .= "$subCategory3Name ($subCategory3Courses)"; |
479 | 479 | $html .= '</a>'; |
480 | 480 | } |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | */ |
616 | 616 | public function getSessionIcon($sessionName) |
617 | 617 | { |
618 | - return Display::return_icon('window_list.png', $sessionName, null,ICON_SIZE_MEDIUM); |
|
618 | + return Display::return_icon('window_list.png', $sessionName, null, ICON_SIZE_MEDIUM); |
|
619 | 619 | } |
620 | 620 | |
621 | 621 | /** |
@@ -636,8 +636,7 @@ discard block |
||
636 | 636 | $pageTotal = intval(ceil(intval($countSessions) / $limit['length'])); |
637 | 637 | // Do NOT show pagination if only one page or less |
638 | 638 | $cataloguePagination = $pageTotal > 1 ? |
639 | - CourseCategory::getCatalogPagination($limit['current'], $limit['length'], $pageTotal) : |
|
640 | - ''; |
|
639 | + CourseCategory::getCatalogPagination($limit['current'], $limit['length'], $pageTotal) : ''; |
|
641 | 640 | $sessionsBlocks = $this->getFormatedSessionsBlock($sessions); |
642 | 641 | |
643 | 642 | // Get session list catalogue URL |
@@ -648,13 +647,13 @@ discard block |
||
648 | 647 | $tpl = new Template(); |
649 | 648 | $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses()); |
650 | 649 | $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions()); |
651 | - $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
650 | + $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
652 | 651 | $tpl->assign('course_url', $courseUrl); |
653 | 652 | $tpl->assign('catalog_pagination', $cataloguePagination); |
654 | 653 | $tpl->assign('hidden_links', $hiddenLinks); |
655 | 654 | $tpl->assign('search_token', Security::get_token()); |
656 | 655 | $tpl->assign('search_date', $date); |
657 | - $tpl->assign('web_session_courses_ajax_url', api_get_path(WEB_AJAX_PATH) . 'course.ajax.php'); |
|
656 | + $tpl->assign('web_session_courses_ajax_url', api_get_path(WEB_AJAX_PATH).'course.ajax.php'); |
|
658 | 657 | $tpl->assign('sessions', $sessionsBlocks); |
659 | 658 | $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel()); |
660 | 659 | |
@@ -681,7 +680,7 @@ discard block |
||
681 | 680 | |
682 | 681 | $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses()); |
683 | 682 | $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions()); |
684 | - $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
683 | + $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
685 | 684 | $tpl->assign('course_url', $courseUrl); |
686 | 685 | $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel()); |
687 | 686 | $tpl->assign('hidden_links', $hiddenLinks); |
@@ -712,7 +711,7 @@ discard block |
||
712 | 711 | $tpl = new Template(); |
713 | 712 | $tpl->assign('show_courses', CoursesAndSessionsCatalog::showCourses()); |
714 | 713 | $tpl->assign('show_sessions', CoursesAndSessionsCatalog::showSessions()); |
715 | - $tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
714 | + $tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
716 | 715 | $tpl->assign('course_url', $courseUrl); |
717 | 716 | $tpl->assign('already_subscribed_label', $this->getAlreadyRegisteredInSessionLabel()); |
718 | 717 | $tpl->assign('hidden_links', $hiddenLinks); |
@@ -810,7 +809,7 @@ discard block |
||
810 | 809 | $coachName = $session->getGeneralCoach()->getCompleteName(); |
811 | 810 | $actions = null; |
812 | 811 | if (api_is_platform_admin()) { |
813 | - $actions = api_get_path(WEB_CODE_PATH) .'session/resume_session.php?id_session='.$session->getId(); |
|
812 | + $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session->getId(); |
|
814 | 813 | } |
815 | 814 | |
816 | 815 | $isThisSessionOnSale = $session->getBuyCoursePluginPrice(); |
@@ -822,7 +821,7 @@ discard block |
||
822 | 821 | 'nbr_courses' => $session->getNbrCourses(), |
823 | 822 | 'nbr_users' => $session->getNbrUsers(), |
824 | 823 | 'coach_id' => $coachId, |
825 | - 'coach_url' => api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=get_user_popup&user_id=' . $coachId, |
|
824 | + 'coach_url' => api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_popup&user_id='.$coachId, |
|
826 | 825 | 'coach_name' => $coachName, |
827 | 826 | 'coach_avatar' => UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL), |
828 | 827 | 'is_subscribed' => SessionManager::isUserSubscribedAsStudent($session->getId(), $userId), |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * |
96 | 96 | * @param array $values Array of title + description (name => $title, description => $comment) |
97 | 97 | * |
98 | - * @return mixed Term id on success, false on failure |
|
98 | + * @return false|string Term id on success, false on failure |
|
99 | 99 | * |
100 | 100 | */ |
101 | 101 | public static function save_glossary($values, $showMessage = true) |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | |
449 | 449 | /** |
450 | 450 | * Display the glossary terms in a list |
451 | - * @return bool true |
|
451 | + * @return string true |
|
452 | 452 | */ |
453 | 453 | public static function displayGlossaryList() |
454 | 454 | { |
@@ -585,7 +585,7 @@ discard block |
||
585 | 585 | * Update action icons column |
586 | 586 | * |
587 | 587 | * @param integer $glossary_id |
588 | - * @param array $url_params Parameters to use to affect links |
|
588 | + * @param string $url_params Parameters to use to affect links |
|
589 | 589 | * @param array $row The line of results from a query on the glossary table |
590 | 590 | * |
591 | 591 | * @return string HTML string for the action icons columns |
@@ -47,9 +47,9 @@ discard block |
||
47 | 47 | * |
48 | 48 | * @return string The glossary description |
49 | 49 | */ |
50 | - public static function get_glossary_term_by_glossary_id ($glossary_id) |
|
50 | + public static function get_glossary_term_by_glossary_id($glossary_id) |
|
51 | 51 | { |
52 | - $glossary_table = Database::get_course_table(TABLE_GLOSSARY); |
|
52 | + $glossary_table = Database::get_course_table(TABLE_GLOSSARY); |
|
53 | 53 | $course_id = api_get_course_int_id(); |
54 | 54 | $sql = "SELECT description FROM $glossary_table |
55 | 55 | WHERE c_id = $course_id AND glossary_id =".intval($glossary_id); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public static function get_glossary_term_by_glossary_name($glossary_name) |
74 | 74 | { |
75 | - $glossary_table = Database::get_course_table(TABLE_GLOSSARY); |
|
75 | + $glossary_table = Database::get_course_table(TABLE_GLOSSARY); |
|
76 | 76 | $session_id = api_get_session_id(); |
77 | 77 | $course_id = api_get_course_int_id(); |
78 | 78 | $sql_filter = api_get_session_condition($session_id); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | $get_max = "SELECT MAX(display_order) FROM $t_glossary |
226 | 226 | WHERE c_id = $course_id "; |
227 | 227 | $res_max = Database::query($get_max); |
228 | - if (Database::num_rows($res_max)==0) { |
|
228 | + if (Database::num_rows($res_max) == 0) { |
|
229 | 229 | return 0; |
230 | 230 | } |
231 | 231 | $row = Database::fetch_array($res_max); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | WHERE |
255 | 255 | c_id = $course_id AND |
256 | 256 | name = '".Database::escape_string($term)."'"; |
257 | - if ($not_id<>'') { |
|
257 | + if ($not_id <> '') { |
|
258 | 258 | $sql .= " AND glossary_id <> '".intval($not_id)."'"; |
259 | 259 | } |
260 | 260 | $result = Database::query($sql); |
@@ -378,25 +378,25 @@ discard block |
||
378 | 378 | $actionsLeft = ''; |
379 | 379 | if (api_is_allowed_to_edit(null, true)) { |
380 | 380 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=addglossary&msg=add?'.api_get_cidreq().'">'. |
381 | - Display::return_icon('new_glossary_term.png',get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
381 | + Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=export">'. |
385 | - Display::return_icon('export_csv.png',get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
385 | + Display::return_icon('export_csv.png', get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
386 | 386 | if (api_is_allowed_to_edit(null, true)) { |
387 | 387 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=import">'. |
388 | - Display::return_icon('import_csv.png',get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
388 | + Display::return_icon('import_csv.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
389 | 389 | } |
390 | 390 | |
391 | 391 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=export_to_pdf">'. |
392 | - Display::return_icon('pdf.png',get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
392 | + Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
393 | 393 | |
394 | 394 | if (($view == 'table') || (!isset($view))) { |
395 | 395 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=list">'. |
396 | - Display::return_icon('view_detailed.png',get_lang('ListView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
396 | + Display::return_icon('view_detailed.png', get_lang('ListView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
397 | 397 | } else { |
398 | 398 | $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=table">'. |
399 | - Display::return_icon('view_text.png',get_lang('TableView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
399 | + Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
400 | 400 | } |
401 | 401 | |
402 | 402 | /* BUILD SEARCH FORM */ |
@@ -433,7 +433,7 @@ discard block |
||
433 | 433 | $table->set_header(1, get_lang('TermDefinition'), true); |
434 | 434 | if (api_is_allowed_to_edit(null, true)) { |
435 | 435 | $table->set_header(2, get_lang('Actions'), false, 'width=90px', array('class' => 'td_actions')); |
436 | - $table->set_column_filter(2, array('GlossaryManager','actions_filter')); |
|
436 | + $table->set_column_filter(2, array('GlossaryManager', 'actions_filter')); |
|
437 | 437 | } |
438 | 438 | $content .= $table->return_table(); |
439 | 439 | } |
@@ -455,8 +455,8 @@ discard block |
||
455 | 455 | $content = ''; |
456 | 456 | foreach ($glossary_data as $key => $glossary_item) { |
457 | 457 | $actions = ''; |
458 | - if (api_is_allowed_to_edit(null,true)) { |
|
459 | - $actions = '<div class="pull-right">'.self::actions_filter($glossary_item[2], '',$glossary_item).'</div>'; |
|
458 | + if (api_is_allowed_to_edit(null, true)) { |
|
459 | + $actions = '<div class="pull-right">'.self::actions_filter($glossary_item[2], '', $glossary_item).'</div>'; |
|
460 | 460 | } |
461 | 461 | $content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions); |
462 | 462 | } |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | * @return integer Count of glossary terms |
470 | 470 | * |
471 | 471 | */ |
472 | - public static function get_number_glossary_terms($session_id=0) |
|
472 | + public static function get_number_glossary_terms($session_id = 0) |
|
473 | 473 | { |
474 | 474 | // Database table definition |
475 | 475 | $t_glossary = Database :: get_course_table(TABLE_GLOSSARY); |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | while ($data = Database::fetch_array($res)) { |
564 | 564 | // Validation when belongs to a session |
565 | 565 | $session_img = api_get_session_image($data['session_id'], $_user['status']); |
566 | - $array[0] = $data[0] . $session_img; |
|
566 | + $array[0] = $data[0].$session_img; |
|
567 | 567 | |
568 | 568 | if (!$view || $view === 'table') { |
569 | 569 | $array[1] = str_replace(array('<p>', '</p>'), array('', '<br />'), $data[1]); |
@@ -593,13 +593,13 @@ discard block |
||
593 | 593 | { |
594 | 594 | $glossary_id = $row[2]; |
595 | 595 | $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'. |
596 | - Display::return_icon('edit.png',get_lang('Edit'),'',22).'</a>'; |
|
596 | + Display::return_icon('edit.png', get_lang('Edit'), '', 22).'</a>'; |
|
597 | 597 | $glossary_data = GlossaryManager::get_glossary_information($glossary_id); |
598 | 598 | $glossary_term = $glossary_data['name']; |
599 | 599 | if (api_is_allowed_to_edit(null, true)) { |
600 | 600 | if ($glossary_data['session_id'] == api_get_session_id()) { |
601 | 601 | $return .= '<a href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'" onclick="return confirmation(\''.$glossary_term.'\');">'. |
602 | - Display::return_icon('delete.png', get_lang('Delete'),'',22).'</a>'; |
|
602 | + Display::return_icon('delete.png', get_lang('Delete'), '', 22).'</a>'; |
|
603 | 603 | } else { |
604 | 604 | $return = get_lang('EditionNotAvailableFromSession'); |
605 | 605 | } |
@@ -139,7 +139,7 @@ |
||
139 | 139 | api_get_local_time($glossary_data['update_date']) |
140 | 140 | ); |
141 | 141 | } else { |
142 | - $glossary_data['update_date'] = ''; |
|
142 | + $glossary_data['update_date'] = ''; |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $form->addLabel(get_lang('CreationDate'), $glossary_data['insert_date']); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (!api_is_allowed_to_edit(null, true)) { |
54 | 54 | api_not_allowed(true); |
55 | 55 | } |
56 | - $tool_name = get_lang('Add'); |
|
56 | + $tool_name = get_lang('Add'); |
|
57 | 57 | $form = new FormValidator( |
58 | 58 | 'glossary', |
59 | 59 | 'post', |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | if (!api_is_allowed_to_edit(null, true)) { |
191 | 191 | api_not_allowed(true); |
192 | 192 | } |
193 | - $tool_name = get_lang('ImportGlossary'); |
|
193 | + $tool_name = get_lang('ImportGlossary'); |
|
194 | 194 | $form = new FormValidator( |
195 | 195 | 'glossary', |
196 | 196 | 'post', |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | foreach (GlossaryManager::get_glossary_terms() as $term) { |
219 | 219 | if (!GlossaryManager::delete_glossary($term['id'], false)) { |
220 | 220 | Display::addFlash( |
221 | - Display::return_message(get_lang("CannotDeleteGlossary") . ':' . $term['id'], 'error') |
|
221 | + Display::return_message(get_lang("CannotDeleteGlossary").':'.$term['id'], 'error') |
|
222 | 222 | ); |
223 | 223 | } else { |
224 | 224 | $termsDeleted[] = $term['name']; |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | if (count($badList) > 0) { |
316 | 316 | Display::addFlash( |
317 | 317 | Display::return_message( |
318 | - get_lang("GlossaryTermAlreadyExists").': ' . implode(', ', $badList), |
|
318 | + get_lang("GlossaryTermAlreadyExists").': '.implode(', ', $badList), |
|
319 | 319 | 'error' |
320 | 320 | ) |
321 | 321 | ); |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | GlossaryManager::export_to_pdf(); |
359 | 359 | break; |
360 | 360 | case 'changeview': |
361 | - if (in_array($_GET['view'], array('list','table'))) { |
|
361 | + if (in_array($_GET['view'], array('list', 'table'))) { |
|
362 | 362 | Session::write('glossary_view', $_GET['view']); |
363 | 363 | } else { |
364 | 364 | $view = Session::read('glossary_view'); |