From 2bf0f966028263fd10a1fe04eb25112c2d64d4bc Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 3 Mar 2014 21:00:31 +0000 Subject: [PATCH] Nextmatch uses value to store most attributes, so get value from request to get access to those. Fixes unable to force infolog details column selection. --- etemplate/inc/class.etemplate_widget_nextmatch.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php index 08a43dd4a2..dfdcd80362 100644 --- a/etemplate/inc/class.etemplate_widget_nextmatch.inc.php +++ b/etemplate/inc/class.etemplate_widget_nextmatch.inc.php @@ -854,6 +854,11 @@ class etemplate_widget_nextmatch extends etemplate_widget { $form_name = self::form_name($cname, $this->id, $expand); $value = self::get_array($content, $form_name); + + // Some (most) extmatch settings are set in its value, not attributes, which aren't in + // $content. Fetch them from the request, so we actually have them. + $content_value = self::get_array(self::$request->content, $form_name); + list($app) = explode('.',$this->attrs['template']); unset($value['favorite']); @@ -872,7 +877,7 @@ class etemplate_widget_nextmatch extends etemplate_widget // Save current column settings as default, clear, or force (admins only) if($GLOBALS['egw_info']['user']['apps']['admin'] && $app) { - $pref_name = 'nextmatch-' . (isset($value['columnselection_pref']) ? $value['columnselection_pref'] : $this->attrs['template']); + $pref_name = 'nextmatch-' . (isset($content_value['columnselection_pref']) ? $content_value['columnselection_pref'] : $this->attrs['template']); $refresh_pref_name = $pref_name.'-autorefresh'; $pref_level = $value['nm_col_preference'] == 'force' ? 'forced' : 'default';