From 4835611da456a831bd07dfe1d4877e9b5a31d44a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 5 Apr 2016 12:56:10 +0000 Subject: [PATCH] remember newly set options from get_rows method for server-side validation of nextmatch filters --- api/src/Etemplate/Widget/Nextmatch.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/Etemplate/Widget/Nextmatch.php b/api/src/Etemplate/Widget/Nextmatch.php index 7776114e0c..9c268ce163 100644 --- a/api/src/Etemplate/Widget/Nextmatch.php +++ b/api/src/Etemplate/Widget/Nextmatch.php @@ -658,8 +658,11 @@ class Nextmatch extends Etemplate\Widget { if($n == 'sel_options') { - foreach($row as &$options) + foreach($row as $name => &$options) { + // remember newly set options for validation of nextmatch filters + self::$request->sel_options[$name] = $options; + Select::fix_encoded_options($options, true); } } @@ -1020,7 +1023,7 @@ class 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 + // Some (most) nextmatch 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);