From 01adf460f3133dc28a0a9c74bc95c89c3be54511 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 12 Dec 2013 22:25:56 +0000 Subject: [PATCH] silently upgrade old calendar favorites --- phpgwapi/inc/class.egw_framework.inc.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index d2147ff480..a50780bbb7 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -984,7 +984,7 @@ abstract class egw_framework public function _get_css() { $app_css = ''; - + // Load these first // Cascade should go: // Libs < etemplate2 < framework/theme < app < print (?) @@ -1802,11 +1802,14 @@ $LAB.setOptions({AlwaysPreserveOrder:true,BasePath:"'.$GLOBALS['egw_info']['serv { if(strpos($pref_name, $pref_prefix) === 0) { - if(!is_array($pref)) + if(!is_array($pref)) // old favorite { - $GLOBALS['egw']->preferences->delete($app,$pref_name); - $GLOBALS['egw']->preferences->save_repository(false); - continue; + if (!($pref = unserialize($pref))) continue; + $pref = array( + 'name' => substr($pref_name,strlen($pref_prefix)), + 'group' => !isset($GLOBALS['egw']->preferences->user[$app][$pref_name]), + 'state' => $pref, + ); } $filters[substr($pref_name,strlen($pref_prefix))] = $pref; }