From 1ee988357f9c391045ab601a2879e812ab2ff3a9 Mon Sep 17 00:00:00 2001 From: Daren Chandisingh Date: Wed, 2 Feb 2011 10:33:16 +0000 Subject: [PATCH] MDL-23872 Forms Library : Updated MoodleQuickForm to honour setConstant(), prevents injection. - resolved conflict --- lib/formslib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/formslib.php b/lib/formslib.php index 759f546d057..d0743c3f56e 100644 --- a/lib/formslib.php +++ b/lib/formslib.php @@ -1145,6 +1145,10 @@ class MoodleQuickForm extends HTML_QuickForm_DHTMLRulesTableless { } } + if (is_array($this->_constantValues)) { + $unfiltered = HTML_QuickForm::arrayMerge($unfiltered, $this->_constantValues); + } + if ($addslashes){ return $this->_recursiveFilter('addslashes', $unfiltered); } else {