propagate data from settings hook to handlers, to fix failed installs because setup was not detected

This commit is contained in:
Ralf Becker 2012-02-14 17:38:45 +00:00
parent 2ba0b31c43
commit 2939d7bbf3
5 changed files with 24 additions and 24 deletions

View File

@ -868,15 +868,13 @@ class addressbook_groupdav extends groupdav_handler
/** /**
* Return appliction specific settings * 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(); $addressbooks = array();
} if (!isset($hook_data['setup']))
else
{ {
$user = $GLOBALS['egw_info']['user']['account_id']; $user = $GLOBALS['egw_info']['user']['account_id'];
$addressbook_bo = new addressbook_bo(); $addressbook_bo = new addressbook_bo();

View File

@ -1252,15 +1252,13 @@ class calendar_groupdav extends groupdav_handler
/** /**
* Return appliction specific settings * 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(); $calendars = array();
} if (!isset($hook_data['setup']))
else
{ {
$user = $GLOBALS['egw_info']['user']['account_id']; $user = $GLOBALS['egw_info']['user']['account_id'];
$cal_bo = new calendar_bo(); $cal_bo = new calendar_bo();

View File

@ -610,20 +610,23 @@ class infolog_groupdav extends groupdav_handler
/** /**
* Return appliction specific settings * 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 (!isset($hook_data['setup']))
{ {
translation::add_app('infolog'); translation::add_app('infolog');
$infolog = new infolog_bo(); $infolog = new infolog_bo();
$types = $infolog->enums['type'];
if (!($types = $infolog->enums['type'])) }
if (!isset($types))
{ {
$types = array( $types = array(
'task' => 'Tasks', 'task' => 'Tasks',
); );
} }
$settings = array(); $settings = array();
$settings['infolog-types'] = array( $settings['infolog-types'] = array(
'type' => 'multiselect', 'type' => 'multiselect',

View File

@ -498,9 +498,10 @@ abstract class groupdav_handler
/** /**
* Return appliction specific settings * 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(); return array();
} }

View File

@ -65,7 +65,7 @@ class groupdav_hooks
$class_name = $app.'_groupdav'; $class_name = $app.'_groupdav';
if (class_exists($class_name, true)) 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);
} }
} }