diff options
author | patdenice <patdenice@piwigo.org> | 2010-12-22 11:14:20 +0000 |
---|---|---|
committer | patdenice <patdenice@piwigo.org> | 2010-12-22 11:14:20 +0000 |
commit | 195c0b47730708f6cb4b1506d0f432565a762ef1 (patch) | |
tree | 3ced1ab46a3dd385bc873a8aa08cab3a922bf03e /include/menubar.inc.php | |
parent | 709515bccdafc26508e50f203fb89169885fd89e (diff) |
merge r8222 from branch 2.1 to trunk
bug 2078: Links must not be displayed in menubar if empty.
git-svn-id: http://piwigo.org/svn/trunk@8223 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | include/menubar.inc.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/menubar.inc.php b/include/menubar.inc.php index d341b6494..c50b34461 100644 --- a/include/menubar.inc.php +++ b/include/menubar.inc.php @@ -41,7 +41,7 @@ function initialize_menu() //--------------------------------------------------------------- external links if ( ($block=$menu->get_block('mbLinks')) and !empty($conf['links']) ) { - $data = array(); + $block->data = array(); foreach ($conf['links'] as $url => $url_data) { if (!is_array($url_data)) @@ -69,11 +69,13 @@ function initialize_menu() 'FEATURES' => (isset($url_data['nw_features']) ? $url_data['nw_features'] : '') ); } - $data[] = $tpl_var; + $block->data[] = $tpl_var; } } - $block->template = 'menubar_links.tpl'; - $block->data = $data; + if ( !empty($block->data) ) + { + $block->template = 'menubar_links.tpl'; + } } //-------------------------------------------------------------- categories |