mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
* All apps: fix broken group-favorites
This commit is contained in:
parent
1563f9d43a
commit
88293f3e72
@ -12,7 +12,7 @@
|
||||
/* Basic information about this app */
|
||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||
$setup_info['phpgwapi']['title'] = 'EGroupware API';
|
||||
$setup_info['phpgwapi']['version'] = '14.3.004';
|
||||
$setup_info['phpgwapi']['version'] = '14.3.005';
|
||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.29';
|
||||
$setup_info['phpgwapi']['enable'] = 3;
|
||||
$setup_info['phpgwapi']['app_order'] = 1;
|
||||
|
@ -826,7 +826,7 @@ function phpgwapi_upgrade14_3_002()
|
||||
{
|
||||
$value = array(
|
||||
'name' => substr($name, 9), // skip "favorite_"
|
||||
'group' => !($owner > 0),
|
||||
'group' => $owner < -2 ? $owner+2 : false,
|
||||
'state' => $state,
|
||||
);
|
||||
}
|
||||
@ -851,3 +851,26 @@ function phpgwapi_upgrade14_3_003()
|
||||
}
|
||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.004';
|
||||
}
|
||||
|
||||
/**
|
||||
* Fix by 14.3.003 broken group favorites
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function phpgwapi_upgrade14_3_004()
|
||||
{
|
||||
$GLOBALS['run-from-upgrade14_3_004'] = true;
|
||||
|
||||
preferences::change_preference(null, '/^favorite_/', function($name, $value, $owner)
|
||||
{
|
||||
unset($name); // not used, but required by function signature
|
||||
|
||||
if ($value['group'] === true)
|
||||
{
|
||||
$value['group'] = $owner+2;
|
||||
}
|
||||
return $value;
|
||||
});
|
||||
|
||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.005';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user