Changeset 9351


Ignore:
Timestamp:
02/22/11 16:38:40 (9 years ago)
Author:
patdenice
Message:

Better menubar management.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/AdditionalPages/main.inc.php

    r9350 r9351  
    6262function register_ap_menubar_blocks($menu_ref_arr) 
    6363{ 
     64  global $conf, $user; 
     65 
    6466  $menu = & $menu_ref_arr[0]; 
    6567  if ($menu->get_id() != 'menubar') return; 
    66   $menu->register_block( new RegisteredBlock( 'mbAdditionalPages', 'Additional Pages', 'P@t')); 
     68 
     69  $conf['AP']['block_title'] = isset($conf['AP']['languages'][$user['language']]) ? 
     70    $conf['AP']['languages'][$user['language']] : @$conf['AP']['languages']['default']; 
     71 
     72  if (empty($conf['AP']['block_title'])) 
     73    $conf['AP']['block_title'] = 'Additional Pages'; 
     74 
     75  $menu->register_block( new RegisteredBlock( 'mbAdditionalPages', $conf['AP']['block_title'], 'Additional Pages')); 
    6776} 
    6877 
     
    96105    if (!empty($data)) 
    97106    { 
    98       $title = isset($conf['AP']['languages'][$user['language']]) ? 
    99         $conf['AP']['languages'][$user['language']] : 
    100         @$conf['AP']['languages']['default']; 
    101  
    102107      $template->set_template_dir(AP_PATH.'template/'); 
    103       $block->set_title($title); 
     108      $block->set_title($conf['AP']['block_title']); 
    104109      $block->template = 'menubar_additional_pages.tpl'; 
    105110      $block->data = $data; 
Note: See TracChangeset for help on using the changeset viewer.