mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-25 16:18:57 +01:00
propagate data from settings hook to handlers, to fix failed installs because setup was not detected
This commit is contained in:
parent
2ba0b31c43
commit
2939d7bbf3
@ -868,15 +868,13 @@ class addressbook_groupdav extends groupdav_handler
|
||||
/**
|
||||
* Return appliction specific settings
|
||||
*
|
||||
* return array of array with settings
|
||||
* @param array $hook_data
|
||||
* @return array of array with settings
|
||||
*/
|
||||
static function get_settings()
|
||||
static function get_settings($hook_data)
|
||||
{
|
||||
if ($hook_data['setup'])
|
||||
{
|
||||
$addressbooks = array();
|
||||
}
|
||||
else
|
||||
$addressbooks = array();
|
||||
if (!isset($hook_data['setup']))
|
||||
{
|
||||
$user = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$addressbook_bo = new addressbook_bo();
|
||||
|
@ -1252,15 +1252,13 @@ class calendar_groupdav extends groupdav_handler
|
||||
/**
|
||||
* Return appliction specific settings
|
||||
*
|
||||
* return array of array with settings
|
||||
* @param array $hook_data
|
||||
* @return array of array with settings
|
||||
*/
|
||||
static function get_settings()
|
||||
static function get_settings($hook_data)
|
||||
{
|
||||
if ($hook_data['setup'])
|
||||
{
|
||||
$calendars = array();
|
||||
}
|
||||
else
|
||||
$calendars = array();
|
||||
if (!isset($hook_data['setup']))
|
||||
{
|
||||
$user = $GLOBALS['egw_info']['user']['account_id'];
|
||||
$cal_bo = new calendar_bo();
|
||||
|
@ -610,20 +610,23 @@ class infolog_groupdav extends groupdav_handler
|
||||
/**
|
||||
* Return appliction specific settings
|
||||
*
|
||||
* return array of array with settings
|
||||
* @param array $hook_data
|
||||
* @return array of array with settings
|
||||
*/
|
||||
static function get_settings()
|
||||
static function get_settings($hook_data)
|
||||
{
|
||||
translation::add_app('infolog');
|
||||
$infolog = new infolog_bo();
|
||||
|
||||
if (!($types = $infolog->enums['type']))
|
||||
if (!isset($hook_data['setup']))
|
||||
{
|
||||
translation::add_app('infolog');
|
||||
$infolog = new infolog_bo();
|
||||
$types = $infolog->enums['type'];
|
||||
}
|
||||
if (!isset($types))
|
||||
{
|
||||
$types = array(
|
||||
'task' => 'Tasks',
|
||||
);
|
||||
}
|
||||
|
||||
$settings = array();
|
||||
$settings['infolog-types'] = array(
|
||||
'type' => 'multiselect',
|
||||
|
@ -498,9 +498,10 @@ abstract class groupdav_handler
|
||||
/**
|
||||
* Return appliction specific settings
|
||||
*
|
||||
* return array of array with settings
|
||||
* @param array $hook_data
|
||||
* @return array of array with settings
|
||||
*/
|
||||
static function get_settings()
|
||||
static function get_settings($hook_data)
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
@ -65,7 +65,7 @@ class groupdav_hooks
|
||||
$class_name = $app.'_groupdav';
|
||||
if (class_exists($class_name, true))
|
||||
{
|
||||
$settings += call_user_func(array($class_name,'get_settings'));
|
||||
$settings += call_user_func(array($class_name,'get_settings'), $hook_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user