Adding the $_configuration['allow_my_files_link_in_homepage'] see BT#6977

1.9.x
Julio Montoya 12 years ago
parent ed93152229
commit 6d3a26be57
  1. 5
      index.php
  2. 8
      main/inc/lib/userportal.lib.php
  3. 2
      user_portal.php

@ -9,7 +9,7 @@ use \ChamiloSession as Session;
define('CHAMILO_HOMEPAGE', true);
$language_file = array('courses', 'index');
$language_file = array('courses', 'index', 'userInfo');
/* Flag forcing the 'current course' reset, as we're not inside a course anymore. */
// Maybe we should change this into an api function? an example: CourseManager::unset();
@ -151,7 +151,6 @@ if (api_is_anonymous()) {
}
}
$controller->set_login_form($showLoginForm);
//@todo move this inside the IndexManager
@ -181,9 +180,7 @@ if (!isset($_REQUEST['include'])) {
$controller->tpl->assign('hot_courses', $hot_courses);
$controller->tpl->assign('announcements_block', $announcements_block);
$controller->tpl->assign('home_page_block', $controller->return_home_page());
$controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
$controller->tpl->assign('notice_block', $controller->return_notice());
$controller->tpl->assign('main_navigation_block', $controller->return_navigation_links());
$controller->tpl->assign('help_block', $controller->return_help());

@ -782,7 +782,9 @@ class IndexManager {
return $html;
}
function return_profile_block() {
function return_profile_block()
{
global $_configuration;
$user_id = api_get_user_id();
if (empty($user_id)) {
@ -818,6 +820,10 @@ class IndexManager {
$total_invitations = Display::badge($total_invitations);
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.get_lang('PendingInvitations').$total_invitations.'</a></li>';
}
if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) {
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/social/myfiles.php">'.get_lang('MyFiles').'</a></li>';
}
}
$profile_content .= '<li><a href="'.api_get_path(WEB_PATH).'main/auth/profile.php">'.get_lang('EditProfile').'</a></li>';
$profile_content .= '</ul>';

@ -23,7 +23,7 @@
use \ChamiloSession as Session;
$language_file = array('courses', 'index','admin');
$language_file = array('courses', 'index', 'admin', 'userInfo');
$cidReset = true; /* Flag forcing the 'current course' reset,
as we're not inside a course anymore */

Loading…
Cancel
Save