Prevent select widget from loading when running setup-cli. Fixes travis failure.

This commit is contained in:
Hadi Nategh 2018-12-14 11:15:28 +01:00
parent 40fe3c0ce2
commit e52f3493f1
2 changed files with 2 additions and 4 deletions

View File

@ -335,9 +335,6 @@ class Widget
*/ */
public static function scanForWidgets() public static function scanForWidgets()
{ {
//try fixing loading order by explicitly select widget to load first
class_exists(__NAMESPACE__.'\Widget\Select');
$widget_registry = Api\Cache::getInstance('etemplate', 'widget_registry'); $widget_registry = Api\Cache::getInstance('etemplate', 'widget_registry');
if (!$widget_registry) // not in instance cache --> rescan from filesystem if (!$widget_registry) // not in instance cache --> rescan from filesystem

View File

@ -171,6 +171,7 @@ class calendar_hooks
if (!isset($hook_data['setup'])) if (!isset($hook_data['setup']))
{ {
$times = Api\Etemplate\Widget\Select::typeOptions('select-hour', ''); $times = Api\Etemplate\Widget\Select::typeOptions('select-hour', '');
$default_cat_seloptions = Api\Etemplate\Widget\Select::typeOptions('select-cat', ',,,calendar');
} }
for ($i = 2; $i <= 9; ++$i) for ($i = 2; $i <= 9; ++$i)
{ {
@ -368,7 +369,7 @@ class calendar_hooks
'label' => 'New event category', 'label' => 'New event category',
'name' => 'default_category', 'name' => 'default_category',
'help' => 'Category automatically added to new events', 'help' => 'Category automatically added to new events',
'values' => Api\Etemplate\Widget\Select::typeOptions('select-cat', ',,,calendar'), 'values' => $default_cat_seloptions,
'default' => '', 'default' => '',
'xmlrpc' => False, 'xmlrpc' => False,
'admin' => False 'admin' => False