From 535958a2495f7ab8bd33778a6f49c25605f1351a Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Fri, 15 Oct 2010 18:04:14 +0200 Subject: [PATCH] Fixing tab bug when editing more than 2 elements see BT#1669 --- main/inc/banner.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main/inc/banner.inc.php b/main/inc/banner.inc.php index 39ba666fbc..d2bccba4dc 100755 --- a/main/inc/banner.inc.php +++ b/main/inc/banner.inc.php @@ -341,13 +341,15 @@ if (api_get_self() != '/main/admin/configure_homepage.php') { $home_menu = api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu))); $home_menu = explode("\n", $home_menu); } - foreach ($home_menu as $key => $enreg) { + $tab_counter = 0; + foreach ($home_menu as $enreg) { $enreg = trim($enreg); if (!empty($enreg)) { - $edit_link = ''.Display::return_icon('edit.gif', get_lang('Edit')).''; - $delete_link = ''.Display::return_icon('delete.gif', get_lang('Delete')).''; + $edit_link = ''.Display::return_icon('edit.gif', get_lang('Edit')).''; + $delete_link = ''.Display::return_icon('delete.gif', get_lang('Delete')).''; $tab_string = str_replace(array('href="'.api_get_path(WEB_PATH).'index.php?include=', ''), array('href="'.api_get_path(WEB_CODE_PATH).'admin/'.basename(api_get_self()).'?action=open_link&link=', $edit_link.$delete_link.''), $enreg); echo $tab_string; + $tab_counter++; } } echo '';