Don't take away default action's onExecute, even if it does have children

This commit is contained in:
Nathan Gray 2014-03-25 16:47:27 +00:00
parent e36a7b17e3
commit 42272cf2e2

View File

@ -713,11 +713,15 @@ class etemplate_widget_nextmatch extends etemplate_widget
if ($action['children'])
{
static $inherit_attrs = array('url','popup','nm_action','onExecute','type','egw_open','allowOnMultiple','confirm','confirm_multiple');
$inherit_keys = array_flip($inherit_attrs);
$action['children'] = self::egw_actions($action['children'], $template_name, $action['prefix'], $action_links, $max_length,
array_intersect_key($action, array_flip($inherit_attrs)));
array_intersect_key($action, $inherit_keys));
unset($action['prefix']);
$action = array_diff_key($action, array_flip($inherit_attrs));
// Allow default actions to keep their onExecute
if($action['default']) unset($inherit_keys['onExecute']);
$action = array_diff_key($action, $inherit_keys);
}
// link or popup action