diff --git a/calendar/inc/class.calendar_hooks.inc.php b/calendar/inc/class.calendar_hooks.inc.php index 84bad4cb81..9f7d15cfb0 100644 --- a/calendar/inc/class.calendar_hooks.inc.php +++ b/calendar/inc/class.calendar_hooks.inc.php @@ -960,6 +960,13 @@ END:VALARM'; return false; } + /** + * Returns a list of custom widgets classes for etemplate2 + */ + public static function widgets() + { + return array('calendar_owner_etemplate_widget'); + } } // Not part of the class, since config hooks are still using the old style diff --git a/calendar/inc/class.calendar_ui.inc.php b/calendar/inc/class.calendar_ui.inc.php index 47dd97da26..82ac0da521 100644 --- a/calendar/inc/class.calendar_ui.inc.php +++ b/calendar/inc/class.calendar_ui.inc.php @@ -16,8 +16,6 @@ use EGroupware\Api\Egw; use EGroupware\Api\Etemplate; use EGroupware\Api\Framework; -require_once("class.calendar_owner_etemplate_widget.inc.php"); - /** * Shared base-class of all calendar UserInterface classes * diff --git a/calendar/setup/setup.inc.php b/calendar/setup/setup.inc.php index 48c13e2ff2..97c5305354 100644 --- a/calendar/setup/setup.inc.php +++ b/calendar/setup/setup.inc.php @@ -46,6 +46,7 @@ $setup_info['calendar']['hooks']['acl_rights'] = 'calendar_hooks::acl_rights'; $setup_info['calendar']['hooks']['categories'] = 'calendar_hooks::categories'; $setup_info['calendar']['hooks']['mail_import'] = 'calendar_hooks::mail_import'; $setup_info['calendar']['hooks']['notifications_actions'] = 'calendar_hooks::notifications_actions'; +$setup_info['calendar']['hooks']['etemplate2_register_widgets'] = 'calendar_hooks::widgets'; /* Dependencies for this app to work */ $setup_info['calendar']['depends'][] = array(