From 9776ec576d567c33eb627786b6930d366af102a0 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 18 Apr 2001 17:33:56 +0000 Subject: [PATCH] Make navbar show a default image instead of a broken link --- phpgwapi/inc/class.common.inc.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 86fc8f1753..8be2c4ea27 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -669,18 +669,24 @@ { $phpgw_info['navbar'][$permission[0]]['title'] = $phpgw_info['apps'][$permission[0]]['title']; $phpgw_info['navbar'][$permission[0]]['url'] = $phpgw->link('/' . $permission[0] . '/index.php'); - $icon_file = PHPGW_SERVER_ROOT . '/'.$permission[0] . '/templates/'. $phpgw_info['server']['template_set']. '/images/navbar.gif'; + $icon_file = PHPGW_SERVER_ROOT . '/'.$permission[0] . '/templates/'. $phpgw_info['server']['template_set']. '/images/navbar.gif'; + $icon_default = PHPGW_SERVER_ROOT . '/'.$permission[0] . '/templates/default/images/navbar.gif'; if (file_exists($icon_file)) { $phpgw_info['navbar'][$permission[0]]['icon'] = $phpgw_info['server']['webserver_url'] . '/' . $permission[0] . '/templates/' . $phpgw_info['server']['template_set'] . '/images/navbar.gif'; } - else + elseif (file_exists($icon_default)) { $phpgw_info['navbar'][$permission[0]]['icon'] = $phpgw_info['server']['webserver_url'] . '/' . $permission[0] . '/templates/default/images/navbar.gif'; } + else + { + $phpgw_info['navbar'][$permission[0]]['icon'] = $phpgw_info['server']['webserver_url'] . '/' + . 'phpgwapi/templates/' . $phpgw_info['server']['template_set'] . '/images/nonav.gif'; + } } } $phpgw_info['navbar']['preferences']['title'] = 'preferences';