From fc253e25646aa0264fedc95a805cfe2acfaad38c Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 24 Jul 2012 17:48:55 +0000 Subject: [PATCH] Scan for widgets, or they won't all be read. ex: a template with listbox will never know to read etemplate_widget_menupopup --- etemplate/inc/class.etemplate.inc.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etemplate/inc/class.etemplate.inc.php b/etemplate/inc/class.etemplate.inc.php index fe01100b71..138c30cf5d 100644 --- a/etemplate/inc/class.etemplate.inc.php +++ b/etemplate/inc/class.etemplate.inc.php @@ -525,6 +525,22 @@ class etemplate_new extends etemplate_widget_template } } +// Try to discover all widgets, as names don't always match tags (eg: listbox is in menupopup) +$files = scandir(EGW_INCLUDE_ROOT . '/etemplate/inc'); +foreach($files as $filename) +{ + if(strpos($filename, 'class.etemplate_widget') === 0) + { + try + { + include_once($filename); + } + catch(Exception $e) + { + error_log($e->getMessage()); + } + } +} if ($GLOBALS['egw_info']['flags']['debug'] == 'etemplate') {