mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 06:48:40 +01:00
* All apps: fix broken group-favorites
This commit is contained in:
parent
c7b5094d16
commit
e6cfa64686
@ -12,7 +12,7 @@
|
|||||||
/* Basic information about this app */
|
/* Basic information about this app */
|
||||||
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
$setup_info['phpgwapi']['name'] = 'phpgwapi';
|
||||||
$setup_info['phpgwapi']['title'] = 'EGroupware API';
|
$setup_info['phpgwapi']['title'] = 'EGroupware API';
|
||||||
$setup_info['phpgwapi']['version'] = '14.3.903';
|
$setup_info['phpgwapi']['version'] = '14.3.904';
|
||||||
$setup_info['phpgwapi']['versions']['current_header'] = '1.29';
|
$setup_info['phpgwapi']['versions']['current_header'] = '1.29';
|
||||||
$setup_info['phpgwapi']['enable'] = 3;
|
$setup_info['phpgwapi']['enable'] = 3;
|
||||||
$setup_info['phpgwapi']['app_order'] = 1;
|
$setup_info['phpgwapi']['app_order'] = 1;
|
||||||
|
@ -836,7 +836,7 @@ function phpgwapi_upgrade14_3_002()
|
|||||||
{
|
{
|
||||||
$value = array(
|
$value = array(
|
||||||
'name' => substr($name, 9), // skip "favorite_"
|
'name' => substr($name, 9), // skip "favorite_"
|
||||||
'group' => !($owner > 0),
|
'group' => $owner < -2 ? $owner+2 : false,
|
||||||
'state' => $state,
|
'state' => $state,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -862,6 +862,29 @@ function phpgwapi_upgrade14_3_003()
|
|||||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.004';
|
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';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates on the way to 15.1
|
* Updates on the way to 15.1
|
||||||
*/
|
*/
|
||||||
@ -871,7 +894,7 @@ function phpgwapi_upgrade14_3_003()
|
|||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function phpgwapi_upgrade14_3_004()
|
function phpgwapi_upgrade14_3_005()
|
||||||
{
|
{
|
||||||
$GLOBALS['egw_setup']->oProc->DropTable('egw_api_content_history');
|
$GLOBALS['egw_setup']->oProc->DropTable('egw_api_content_history');
|
||||||
|
|
||||||
@ -923,3 +946,15 @@ function phpgwapi_upgrade14_3_902()
|
|||||||
|
|
||||||
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.903';
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.903';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Run 14.3.004 upgrade for everyone who was already on 14.3.900
|
||||||
|
*/
|
||||||
|
function phpgwapi_upgrade14_3_903()
|
||||||
|
{
|
||||||
|
if (empty($GLOBALS['run-from-upgrade14_3_004']))
|
||||||
|
{
|
||||||
|
phpgwapi_upgrade14_3_004();
|
||||||
|
}
|
||||||
|
return $GLOBALS['setup_info']['phpgwapi']['currentver'] = '14.3.904';
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user