Changeset 8222


Ignore:
Timestamp:
Dec 22, 2010, 12:12:44 PM (14 years ago)
Author:
patdenice
Message:

bug 2078: Links must not be displayed in menubar if empty.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/include/menubar.inc.php

    r6715 r8222  
    4242  if ( ($block=$menu->get_block('mbLinks')) and !empty($conf['links']) )
    4343  {
    44     $data = array();
     44    $block->data = array();
    4545    foreach ($conf['links'] as $url => $url_data)
    4646    {
     
    7070            );
    7171        }
    72         $data[] = $tpl_var;
     72        $block->data[] = $tpl_var;
    7373      }
    7474    }
    75     $block->template = 'menubar_links.tpl';
    76     $block->data = $data;
     75    if ( !empty($block->data) )
     76    {
     77      $block->template = 'menubar_links.tpl';
     78    }
    7779  }
    7880
Note: See TracChangeset for help on using the changeset viewer.