Scan for widgets, or they won't all be read. ex: a template with listbox will never know to read etemplate_widget_menupopup

This commit is contained in:
Nathan Gray 2012-07-24 17:48:55 +00:00
parent 60c350b55e
commit fc253e2564

View File

@ -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') if ($GLOBALS['egw_info']['flags']['debug'] == 'etemplate')
{ {