diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php
index 8d00e82b43..3213084c93 100644
--- a/phpgwapi/inc/class.common.inc.php
+++ b/phpgwapi/inc/class.common.inc.php
@@ -1346,13 +1346,11 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
$GLOBALS['phpgw_info']['navbar']['home']['icon'] = $this->image('phpgwapi',Array('home','nonav'));
$GLOBALS['phpgw_info']['navbar']['home']['icon_hover'] = $this->image_on('phpgwapi',Array('home','nonav'),'-over');
- reset($GLOBALS['phpgw_info']['user']['apps']);
- /* ksort($GLOBALS['phpgw_info']['user']['apps']); */
-
- if(is_array($GLOBALS['phpgw_info']['user']['apps']['admin']))
+ list($first) = each($GLOBALS['phpgw_info']['user']['apps']);
+ if(is_array($GLOBALS['phpgw_info']['user']['apps']['admin']) && $first != 'admin')
{
$newarray['admin'] = $GLOBALS['phpgw_info']['user']['apps']['admin'];
- while(list($index,$value) = each($GLOBALS['phpgw_info']['user']['apps']))
+ foreach($GLOBALS['phpgw_info']['user']['apps'] as $index => $value)
{
if($index != 'admin')
{
@@ -1375,14 +1373,14 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
$navbar = False;
}
- while (list($app,$data) = each($GLOBALS['phpgw_info']['user']['apps']))
+ foreach($GLOBALS['phpgw_info']['user']['apps'] as $app => $data)
{
if (is_long($app))
{
continue;
}
- if ($GLOBALS['phpgw_info']['apps'][$app]['status'] != 2 && $GLOBALS['phpgw_info']['apps'][$app]['status'] != 3)
+ if ($app == 'preferences' || $GLOBALS['phpgw_info']['apps'][$app]['status'] != 2 && $GLOBALS['phpgw_info']['apps'][$app]['status'] != 3)
{
$GLOBALS['phpgw_info']['navbar'][$app]['title'] = $data['title'];
$GLOBALS['phpgw_info']['navbar'][$app]['url'] = $GLOBALS['phpgw']->link('/' . $app . '/index.php');
@@ -1402,23 +1400,26 @@ if (!@is_file(PHPGW_SERVER_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info'
}
/* apps for the top menu */
- $GLOBALS['phpgw_info']['navbar']['preferences']['title'] = lang('preferences');
- $GLOBALS['phpgw_info']['navbar']['preferences']['url'] = $GLOBALS['phpgw']->link('/preferences/index.php');
- $GLOBALS['phpgw_info']['navbar']['preferences']['icon'] = $this->image('preferences',Array('navbar','nonav'));
- $GLOBALS['phpgw_info']['navbar']['preferences']['icon_hover'] = $this->image_on('preferences',Array('navbar','nonav'),'-over');
-
$GLOBALS['phpgw_info']['navbar']['help']['title'] = lang('manual');
$GLOBALS['phpgw_info']['navbar']['help']['url'] = $GLOBALS['phpgw']->link('/help.php');
$GLOBALS['phpgw_info']['navbar']['help']['icon'] = $this->image('phpgwapi',Array('help','nonav'));
$GLOBALS['phpgw_info']['navbar']['help']['icon_hover'] = $this->image_on('phpgwapi',Array('help','nonav'),'-over');
- if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home') //|| $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences')
+ if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home')
{
- $app = 'phpGroupWare';
+ $app = $app_title = 'phpGroupWare';
}
else
{
$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+ $app_title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
+ }
+
+ if ($GLOBALS['phpgw_info']['user']['apps']['preferences']) // preferences last
+ {
+ $prefs = $GLOBALS['phpgw_info']['navbar']['preferences'];
+ unset($GLOBALS['phpgw_info']['navbar']['preferences']);
+ $GLOBALS['phpgw_info']['navbar']['preferences'] = $prefs;
}
/* We handle this here becuase its special */
diff --git a/phpgwapi/inc/functions.inc.php b/phpgwapi/inc/functions.inc.php
index 252ca3157d..881d5e8591 100644
--- a/phpgwapi/inc/functions.inc.php
+++ b/phpgwapi/inc/functions.inc.php
@@ -370,7 +370,6 @@
$continue_app_data = True;
if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
- $GLOBALS['phpgw_info']['flags']['currentapp'] != 'preferences' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'about' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'help')
{
diff --git a/phpgwapi/templates/default/phpgw.xsl b/phpgwapi/templates/default/phpgw.xsl
index 2afd8315c6..ef094f06d2 100644
--- a/phpgwapi/templates/default/phpgw.xsl
+++ b/phpgwapi/templates/default/phpgw.xsl
@@ -82,7 +82,9 @@
|
- |
+
+ |
+
|
|
|
diff --git a/phpgwapi/templates/funkwerk/phpgw.xsl b/phpgwapi/templates/funkwerk/phpgw.xsl
index 20cf6d36b0..60103056f9 100644
--- a/phpgwapi/templates/funkwerk/phpgw.xsl
+++ b/phpgwapi/templates/funkwerk/phpgw.xsl
@@ -60,7 +60,9 @@
-
+
+
+
diff --git a/phpgwapi/templates/idsociety/phpgw.xsl b/phpgwapi/templates/idsociety/phpgw.xsl
index b07199133f..35a2992083 100644
--- a/phpgwapi/templates/idsociety/phpgw.xsl
+++ b/phpgwapi/templates/idsociety/phpgw.xsl
@@ -80,7 +80,9 @@
|
- |
+
+ |
+
|
|
|
diff --git a/phpgwapi/templates/justweb/phpgw.xsl b/phpgwapi/templates/justweb/phpgw.xsl
index faf5148725..c4cb1df2ea 100644
--- a/phpgwapi/templates/justweb/phpgw.xsl
+++ b/phpgwapi/templates/justweb/phpgw.xsl
@@ -50,7 +50,9 @@
|
|
|
- |
+
+ |
+
|
|
|
diff --git a/phpgwapi/templates/verdilak/phpgw.xsl b/phpgwapi/templates/verdilak/phpgw.xsl
index 13e2235e56..c3075e8d4c 100644
--- a/phpgwapi/templates/verdilak/phpgw.xsl
+++ b/phpgwapi/templates/verdilak/phpgw.xsl
@@ -56,7 +56,9 @@