diff --git a/home.php b/home.php
index b3828a8897..b9f2a64fcf 100755
--- a/home.php
+++ b/home.php
@@ -238,8 +238,14 @@
'news_admin'
);
}
- //_debug_array($sorted_apps);
- @reset($sorted_apps);
+
+ // Now add the rest of the user's apps, to make sure we pick up any additions to the home display
+ @reset($GLOBALS['phpgw_info']['user']['apps']);
+ while (list(,$p) = each($GLOBALS['phpgw_info']['user']['apps']))
+ {
+ $sorted_apps[] = $p['name'];
+
+ }
//$GLOBALS['phpgw']->hooks->process('home',$sorted_apps);
function migrate_pref($appname,$var_old,$var_new,$type='user')
@@ -275,27 +281,26 @@
}
return $result;
}
+
$portal_oldvarnames = array('mainscreen_showevents', 'homeShowEvents','homeShowLatest','mainscreen_showmail','mainscreen_showbirthdays','mainscreen_show_new_updated');
$migrate_oldvarnames = false;
if($migrate_oldvarnames)
{
$_apps = $GLOBALS['phpgw_info']['user']['apps'];
+ @reset($_apps);
foreach($_apps as $_appname)
{
+ @reset($portal_oldvarnames);
foreach($portal_oldvarnames as $varname)
{
- migrate_pref($appname,$varname,'homepage_display','all');
+ //echo "Want to migrate '$appname' from '$varname' to 'homepage_display'.
";
+ //migrate_pref($appname,$varname,'homepage_display','all');
}
}
}
- $displayapps = $sorted_apps;
- $_myapps = $GLOBALS['phpgw_info']['user']['apps'];
- foreach($_myapps as $app)
- {
- $displayapps[] = $app['name'];
- }
- $shown = array();
+ $neworder = array();
+ $done = array();
// Display elements, within appropriate table cells
print '
'; $result = $GLOBALS['phpgw']->hooks->single('home',$appname); - $shown[$appname] = 1; print ' | '; if(($thisd!=2 || ($thisd==2&&$lastd==2)) && $tropen) { @@ -345,20 +361,24 @@ $curcol = 1; } $lastd = $thisd; + $neworder[] = $appname; } + $done[$appname] = 1; } print '