Changeset 8223 for trunk


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

merge r8222 from branch 2.1 to trunk
bug 2078: Links must not be displayed in menubar if empty.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/include/menubar.inc.php

    r6951 r8223  
    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.