Blocking the new agenda tool when user is not logged in

skala
Julio Montoya 13 years ago
parent 9a721965d3
commit 3883a75e65
  1. 3
      main/calendar/agenda_js.php

@ -25,6 +25,7 @@ $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/fullcal
$htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css'); $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/qtip2/jquery.qtip.min.css');
$type = isset($_REQUEST['type']) && in_array($_REQUEST['type'], array('personal', 'course', 'admin')) ? $_REQUEST['type'] : 'personal'; $type = isset($_REQUEST['type']) && in_array($_REQUEST['type'], array('personal', 'course', 'admin')) ? $_REQUEST['type'] : 'personal';
if (api_is_platform_admin() && $type == 'admin') { if (api_is_platform_admin() && $type == 'admin') {
$type = 'admin'; $type = 'admin';
} }
@ -39,9 +40,11 @@ $tpl->assign('use_google_calendar', 0);
switch($type) { switch($type) {
case 'admin': case 'admin':
api_protect_admin_script();
$this_section = SECTION_PLATFORM_ADMIN; $this_section = SECTION_PLATFORM_ADMIN;
break; break;
case 'course': case 'course':
api_protect_course_script();
$this_section = SECTION_COURSES; $this_section = SECTION_COURSES;
break; break;
case 'personal': case 'personal':

Loading…
Cancel
Save