cvs: pear /HTML_QuickForm/QuickForm hidden.php
| From: | Jason Rust | Date: | Thu, 06 Jun 2002 19:34:31 +0000 |
| Subject: | cvs: pear /HTML_QuickForm/QuickForm hidden.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4456@lists.php.net to get a copy of this message | ||
jrust Thu Jun 6 15:34:31 2002 EDT
Modified files:
/pear/HTML_QuickForm/QuickForm hidden.php
Log:
Setting the value upon call was overriding the GET/POST variables, thus making it a constant
instead of a default.
Index: pear/HTML_QuickForm/QuickForm/hidden.php
diff -u pear/HTML_QuickForm/QuickForm/hidden.php:1.4 pear/HTML_QuickForm/QuickForm/hidden.php:1.5
--- pear/HTML_QuickForm/QuickForm/hidden.php:1.4 Wed May 29 06:58:50 2002
+++ pear/HTML_QuickForm/QuickForm/hidden.php Thu Jun 6 15:34:31 2002
@@ -17,7 +17,7 @@
// | Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: hidden.php,v 1.4 2002/05/29 10:58:50 mansion Exp $
+// $Id: hidden.php,v 1.5 2002/06/06 19:34:31 jrust Exp $
require_once("HTML/QuickForm/input.php");
@@ -49,7 +49,11 @@
{
HTML_QuickForm_input::HTML_QuickForm_input($elementName, null, $attributes);
$this->setType('hidden');
- $this->setValue($value);
+ // don't override GET/POST settings
+ $tmp_val = $this->getValue();
+ if (is_null($tmp_val)) {
+ $this->setValue($value);
+ }
} //end constructor
// }}}
@@ -70,4 +74,4 @@
// }}}
} //end class HTML_QuickForm_hidden
-?>
\ No newline at end of file
+?>