Fixed issue with visibility of pages without link - refs BT#7008

1.9.x
Yannick Warnier 12 years ago
parent 9e9cc08faf
commit 9648c1f1f7
  1. 5
      index.php
  2. 6
      main/inc/lib/userportal.lib.php

@ -182,10 +182,7 @@ global $_configuration;
if ($_configuration['hide_global_announcements_when_not_connected'] && isset($_user['user_id'])) {
$controller->tpl->assign('announcements_block', $announcements_block);
}
//hiding home top whe user not connected
if ($_configuration['hide_home_top_when_connected'] && !isset($_user['user_id'])) {
$controller->tpl->assign('home_page_block', $controller->return_home_page());
}
$controller->tpl->assign('home_page_block', $controller->return_home_page());
$controller->tpl->assign('hot_courses', $hot_courses);
$controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());
$controller->tpl->assign('notice_block', $controller->return_notice());

@ -208,7 +208,7 @@ class IndexManager {
/* Includes a created page */
function return_home_page() {
global $_configuration;
// Including the page for the news
$html = '';
@ -216,6 +216,10 @@ class IndexManager {
$open = @(string)file_get_contents(api_get_path(SYS_PATH).$this->home.$_GET['include']);
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
} else {
//hiding home top when user not connected
if ($_configuration['hide_home_top_when_connected'] && isset($_user['user_id'])) {
return $html;
}
if (!empty($_SESSION['user_language_choice'])) {
$user_selected_language = $_SESSION['user_language_choice'];
} elseif (!empty($_SESSION['_user']['language'])) {

Loading…
Cancel
Save