Merge branch '1.9.x' of ssh://github.com/chamilo/chamilo-lms into chamilo19

1.9.x
Julio Montoya 10 years ago
commit be8e6ea6db
  1. 7
      main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php
  2. 27
      main/inc/lib/redirect.class.php
  3. 2
      main/install/configuration.dist.php

@ -88,7 +88,12 @@ if(!empty($_course['path']) && $editor != "stand_alone") {
if($current_session_id==0) {
$PathChamiloAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/shared_folder/sf_user_'.api_get_user_id().'/';
} else {
$PathChamiloAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/shared_folder_session_'.$current_session_id.'/sf_user_'.api_get_user_id().'/';
$courseInfo = api_get_course_info();
$sessionId = api_get_session_id();
$groupId = api_get_group_id();
$PathChamiloAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document/shared_folder_session_'.$current_session_id.'/sf_user_'.api_get_user_id();
$PathChamiloAjaxFileManager .= DocumentManager::getDocumentSuffix($courseInfo, $sessionId, $groupId) . '/';
}
}
}

@ -91,18 +91,21 @@ class Redirect
break;
}
}
// If the user is a platform admin, redirect to the main admin page
if (api_is_multiple_url_enabled()) {
// if multiple URLs are enabled, make sure he's admin of the
// current URL before redirecting
$url = api_get_current_access_url_id();
if (api_is_platform_admin_by_id($user_id, $url)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
}
} else {
// if no multiple URL, then it's enough to be platform admin
if (api_is_platform_admin_by_id($user_id)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
global $_configuration;
if (empty($_configuration['redirect_admin_to_courses_list']) or $_configuration['redirect_admin_to_courses_list'] === 'false') {
// If the user is a platform admin, redirect to the main admin page
if (api_is_multiple_url_enabled()) {
// if multiple URLs are enabled, make sure he's admin of the
// current URL before redirecting
$url = api_get_current_access_url_id();
if (api_is_platform_admin_by_id($user_id, $url)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
}
} else {
// if no multiple URL, then it's enough to be platform admin
if (api_is_platform_admin_by_id($user_id)) {
self::navigate(api_get_path(WEB_CODE_PATH).'admin/index.php');
}
}
}
$page_after_login = api_get_setting('page_after_login');

@ -259,3 +259,5 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE;
//$_configuration['aspell_bin'] = '/usr/bin/hunspell';
//$_configuration['aspell_opts'] = '-a -d en_GB -H -i utf-8';
//$_configuration['aspell_temp_dir'] = './';
// Prevent redirecting admin to admin page
//$_configuration['redirect_admin_to_courses_list'] = true;

Loading…
Cancel
Save