Fixing bug when hiding tabs see #4269 (bis)

skala
Julio Montoya 13 years ago
parent a607aad647
commit 0ef3dedbda
  1. 3
      main/inc/lib/banner.lib.php
  2. 4
      main/inc/lib/template.lib.php
  3. 8
      main/inc/lib/userportal.lib.php

@ -358,8 +358,7 @@ function return_navigation_array() {
return array('menu_navigation' => $menu_navigation, 'navigation' => $navigation, 'possible_tabs' => $possible_tabs);
}
function show_header_3() {
$navigation = return_navigation_array();
$navigation = return_navigation_array();
//$menu_navigation = $navigation['menu_navigation'];
$navigation = $navigation['navigation'];
//$possible_tabs = $navigation['possible_tabs'];

@ -11,7 +11,7 @@ class Template extends Smarty {
var $show_header;
var $show_footer;
var $help;
var $navigation = null;
var $menu_navigation = array();
function __construct($title = '', $show_header = true, $show_footer = true) {
parent::__construct();
@ -198,7 +198,7 @@ class Template extends Smarty {
global $httpHeadXtra, $htmlHeadXtra, $_course, $_user, $text_dir, $plugins, $_user,
$_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF;
$navigation = return_navigation_array();
$navigation = return_navigation_array();
$this->menu_navigation = $navigation['menu_navigation'];
global $_configuration, $show_learn_path;

@ -18,9 +18,10 @@ class IndexManager {
if ($load_template) {
$this->tpl = new Template($title);
}
$this->home = api_get_home_path();
$this->user_id = api_get_user_id();
$this->home = api_get_home_path();
$this->user_id = api_get_user_id();
$this->load_directories_preview = false;
if (api_get_setting('show_documents_preview') == 'true') {
$this->load_directories_preview = true;
}
@ -896,11 +897,12 @@ class IndexManager {
if (api_get_setting('allow_social_tool') == 'true') {
unset($this->tpl->menu_navigation['myprofile']);
}
// Main navigation section.
// Tabs that are deactivated are added here.
if (!empty($this->tpl->menu_navigation)) {
$main_navigation_content .= '<ul class="menulist">';
foreach ($this->tpl->menu_navigation as $section => $navigation_info) {
$current = $section == $GLOBALS['this_section'] ? ' id="current"' : '';

Loading…
Cancel
Save