[phplib-dev] cvs commit From: uw (phplib-dev <email protected>)
Date: 12/11/00

From: uw
Date: Tue Dec 12 01:25:54 2000
Added files:
      php-lib/php/form/form_error.inc
      php-lib/php/form/form_loader.inc

Modified files:
      php-lib/php/form/form.inc
      php-lib/php/form/form_baseobject.inc
      php-lib/php/form/form_copiedapi.inc
      php-lib/php/form/form_element.inc
      php-lib/php/form/form_element_buttonobject.inc
      php-lib/php/form/form_element_checkbox.inc
      php-lib/php/form/form_element_checkobject.inc
      php-lib/php/form/form_element_combo.inc
      php-lib/php/form/form_element_date.inc
      php-lib/php/form/form_element_file.inc
      php-lib/php/form/form_element_fileupload.inc
      php-lib/php/form/form_element_hidden.inc
      php-lib/php/form/form_element_image.inc
      php-lib/php/form/form_element_password.inc
      php-lib/php/form/form_element_radio.inc
      php-lib/php/form/form_element_reset.inc
      php-lib/php/form/form_element_select.inc
      php-lib/php/form/form_element_selectobject.inc
      php-lib/php/form/form_element_submit.inc
      php-lib/php/form/form_element_text.inc
      php-lib/php/form/form_element_textarea.inc
      php-lib/php/form/form_element_textobject.inc
      php-lib/php/form/form_element_tree.inc

Log message:
- making them work again (partly...)

- fixed error handling

 Added form_error.inc.

- added a simple file loader

 PHP 4 needs lots of time to compile scripts and it's a very good idea to
 include only those files you really need. form_loader includes (require_once) the
 files you need for a certain task. Use form_loader("form") to include the core files.
 Your form object will by default automatically include all the files it needs.

Index: php-lib/php/form/form.inc
diff -u php-lib/php/form/form.inc:1.10 php-lib/php/form/form.inc:1.11
--- php-lib/php/form/form.inc:1.10 Mon Dec 11 20:17:48 2000
+++ php-lib/php/form/form.inc Tue Dec 12 01:25:07 2000
@@ -3,7 +3,7 @@
 * Public methods of the form class.
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
-*  <email protected> $Id: form.inc,v 1.10 2000/12/11 19:17:48 uw Exp $
+*  <email protected> $Id: form.inc,v 1.11 2000/12/12 00:25:07 uw Exp $
 *  <email protected> Form
 */
 class form extends form_copiedapi {
@@ -37,7 +37,7 @@
         *  <email protected> public
         */
         function autoloadValues($ellist = "") {
-
+
                 if ("" == $ellist)
                         $ellist = $this->getElementnames();
                         
@@ -45,13 +45,17 @@
                         $ellist = array($ellist);
                         
                 if (!is_array($ellist) || 0 == count($ellist)) {
- $this->exceptions[] = new FormError("Can't load the form with submitted values, no elements in form or no elements given.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Can't load the form with submitted values, no elements in form or no elements given.", __FILE__, __LINE__);
                         return false;
                 }
                 
- $data = ("GET" == $this->method) ? &$GLOBALS["HTTP_GET_VARS"] : &$GLOBALS["HTTP_POST_VARS"];
+ if ("GET" == $this->method)
+ $data = &$GLOBALS["HTTP_GET_VARS"];
+ else
+ $data = &$GLOBALS["HTTP_POST_VARS"];
+
                 if (!is_array($data) || 0 == count($data)) {
- $this->exceptions[] = new FormError("Can't find any HTTP_$this->method_VARS.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Can't find any HTTP_$this->method_VARS.", __FILE__, __LINE__);
                         return true;
                 }
 
@@ -117,7 +121,7 @@
         */
         function setValues($values) {
                 if (!is_array($values) || 0 == count($values)) {
- $this->exceptions[] = new FormError("No values give.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No values give.", __FILE__, __LINE__);
                         return false;
                 }
 
@@ -209,12 +213,12 @@
         */
         function setValidator($name, $validator) {
                 if (!$this->ElementExists($name)) {
- $this->exceptions[] = new FormError("'$name' is not a known element", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$name' is not a known element", __FILE__, __LINE__);
                         return false;
                 }
                 
                 if (!method_exists($this, $validator)) {
- $this->exceptions[] = new FormError("Can't find the method '$validator'", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Can't find the method '$validator'", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -297,7 +301,7 @@
                         $html .= $this->getJSHead();
                 
                         foreach ($this->elements as $name => $el)
- $html.= $el->getJS();
+ $html .= $el->getJS();
                         
                         $html .= $this->getJSFoot();
                 }
@@ -354,21 +358,25 @@
         */
         function addElement($element_data) {
                 if ("" == $element_data || (is_array($element_data) && 0 == count($element_data)) ) {
- $this->exceptions[] = new FormError("No element data given.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No element data given.", __FILE__, __LINE__);
                         return false;
                 }
 
                 $element_data["type"] = strtolower($element_data["type"]);
- $of_objectname = $element_data["type"];
+ $objectname = $element_data["type"];
+
+ if ($this->flag_loader)
+ form_elements_loader($objectname);
                         
                 $this->addDefaultAttributes($element_data);
                 
- // Generate Object
- $of_objectname = "form_element_" . $element_data["type"];
- $el = new $of_objectname( $element_data, $this->method, $this->js_name, $this->js_mode );
-
+ $objectname = "form_element_" . $element_data["type"];
+ $el = new $objectname( $element_data, $this->method, $this->js_name, $this->js_mode );
+
+ /*
                 if (!$el->flag_config_ok)
                         return false;
+ */
                 
                 if ($el->isHidden())
                         $this->hidden_elements[] = $element_data["name"];
@@ -387,7 +395,7 @@
                         $this->element_names[$el->name] = $el->name;
                         
                 }
-
+
                 return true;
         } // end func addElement
         
@@ -403,7 +411,7 @@
         function getElement($elname, $value = "") {
         
                 if (!$this->ElementExists($elname)) {
- $this->exceptions[] = new FormError("'$elname' is unknown.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$elname' is unknown.", __FILE__, __LINE__);
                         return "";
                 }
                 
@@ -412,7 +420,7 @@
                 
                 $html = "";
                 foreach ($this->radio_elements[$elname] as $name => $v)
- $html .= $this->elements[$name]->get($value):
+ $html .= $this->elements[$name]->get($value);
                 
                 return $html;
         } // end func getElement
@@ -427,7 +435,7 @@
         */
         function getType($elname) {
                 if (!$this->ElementExists($elname)) {
- $this->exceptions[] = new FormError("'$elname' is unknown", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$elname' is unknown", __FILE__, __LINE__);
                         return "";
                 }
                 
@@ -519,7 +527,7 @@
         function setValidationError($name, $message) {
                 
                 if (!$this->elementExists($name)) {
- $this->exceptions[] = new FormError("'$name' is unknown", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$name' is unknown", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -617,12 +625,12 @@
         function addJS($name, $code) {
         
                 if ("" == $name || "" == $code) {
- $this->exceptions[] = new FormError("No name and or no code given.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No name and or no code given.", __FILE__, __LINE__);
                         return false;
                 }
                 
                 if (!$this->elementExists($name)) {
- $this->exceptions[] = new FormError("'$name' is unknown", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$name' is unknown", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -641,12 +649,12 @@
         function setJS($name, $code) {
         
                 if ("" == $name || "" == $code) {
- $this->exceptions[] = new FormError("No name and or no code given.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No name and or no code given.", __FILE__, __LINE__);
                         return false;
                 }
                 
                 if (!$this->elementExists($name)) {
- $this->exceptions[] = new FormError("'$name' is unknown", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("'$name' is unknown", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -673,7 +681,7 @@
                         $names = array($names);
                         
                 if (0 == count($names)) {
- $this->exceptions[] = new FormError("No elements given or no elements in form.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No elements given or no elements in form.", __FILE__, __LINE__);
                         return "";
                 }
                 
@@ -803,7 +811,7 @@
         */
         function getOptions($ellist) {
                 if ("" == $ellist) {
- $this->exceptions[] = new FormError("No elements specified.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No elements specified.", __FILE__, __LINE__);
                         return array();
                 }
                 
@@ -829,7 +837,7 @@
         */
         function setOptions($ellist) {
                 if (!is_array($ellist)) {
- $this->exceptions[] = new FormError("No elements specified.", __FILE__, __LINE_);
+ $this->exceptions[] = new form_error("No elements specified.", __FILE__, __LINE_);
                         return false;
                 }
 
Index: php-lib/php/form/form_baseobject.inc
diff -u php-lib/php/form/form_baseobject.inc:1.3 php-lib/php/form/form_baseobject.inc:1.4
--- php-lib/php/form/form_baseobject.inc:1.3 Mon Dec 11 20:17:49 2000
+++ php-lib/php/form/form_baseobject.inc Tue Dec 12 01:25:08 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_baseobject.inc,v 1.3 2000/12/11 19:17:49 uw Exp $
+*  <email protected> $Id: form_baseobject.inc,v 1.4 2000/12/12 00:25:08 uw Exp $
 */
 class form_baseobject extends form_commonobject {
         
@@ -103,9 +103,22 @@
         *  <email protected> Start(), autoloadValues()
         */
         var $method = "POST";
+
+ /**
+ * Flag indication that you're using the Form Loader.
+ *
+ * addElement() will call form_elements_loader() if the flag is set to true.
+ * It's strongly recommended that you use the Form Loader unless you're
+ * using the Zend Cache or a similar product.
+ *
+ *  <email protected> boolean
+ */
+ var $flag_loader = true;
 
         /**
         * Flag indicating that a file upload button is in the form.
+ *
+ *  <email protected> boolean
         */
         var $flag_contains_file = false;
 
@@ -119,7 +132,7 @@
         function ElementExists($name) {
                 
                 if ("" == $name) {
- $this->exceptions[] = new FormError("No name specified.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No name specified.", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -144,7 +157,7 @@
         function setDefaults($defaults) {
         
                 if (!is_array($defaults)) {
- $this->exceptions[] = new FormError("No default values.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No default values.", __FILE__, __LINE__);
                         return false;
                 }
                 
Index: php-lib/php/form/form_copiedapi.inc
diff -u php-lib/php/form/form_copiedapi.inc:1.3 php-lib/php/form/form_copiedapi.inc:1.4
--- php-lib/php/form/form_copiedapi.inc:1.3 Mon Dec 11 20:17:49 2000
+++ php-lib/php/form/form_copiedapi.inc Tue Dec 12 01:25:09 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_copiedapi.inc,v 1.3 2000/12/11 19:17:49 uw Exp $
+*  <email protected> $Id: form_copiedapi.inc,v 1.4 2000/12/12 00:25:09 uw Exp $
 */
 class form_copiedapi extends form_baseobject {
 
@@ -86,7 +86,7 @@
         function setTree($ellist) {
         
                 if (!is_array($ellist)) {
- $this->exceptions[] = new FormError("No element list given.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No element list given.", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -108,7 +108,7 @@
         function isMethodAllowed($function, $name, $required_type) {
 
                 if (!$this->elementExists($elname)) {
- $this->exceptions[] = new FormError("$function(): '$elname' is unknown", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("$function(): '$elname' is unknown", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -125,7 +125,7 @@
                         }
                 
                 if (!$ok) {
- $this->exceptions[] = new FormError("$function(): '$elname' is not a radio or checkbox element", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("$function(): '$elname' is not a radio or checkbox element", __FILE__, __LINE__);
                         return false;
                 }
                 
Index: php-lib/php/form/form_element.inc
diff -u php-lib/php/form/form_element.inc:1.3 php-lib/php/form/form_element.inc:1.4
--- php-lib/php/form/form_element.inc:1.3 Mon Dec 11 20:17:50 2000
+++ php-lib/php/form/form_element.inc Tue Dec 12 01:25:09 2000
@@ -3,8 +3,9 @@
 * Superclass of all form elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element.inc,v 1.3 2000/12/11 19:17:50 uw Exp $
+*  <email protected> $Id: form_element.inc,v 1.4 2000/12/12 00:25:09 uw Exp $
 *  <email protected> Form
+*  <email protected>
 */
 class form_element extends form_commonobject {
         
@@ -287,7 +288,7 @@
                 
                 if (!is_array($element_data)) {
                 
- $this->exceptions[] = new FormError("checkConfiguration(): You must provide an array to initialize the element", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("checkConfiguration(): You must provide an array to initialize the element", __FILE__, __LINE__);
                         $ok = false;
                         
                 } else {
@@ -295,14 +296,14 @@
                         foreach ($this->required_fields as $field => $type)
                                 if (!isset($element_data[$field])) {
                                 
- $this->exceptions[9 = new FormError("checkConfiguration(): Missing field: '$field'.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("checkConfiguration(): Missing field: '$field'.", __FILE__, __LINE__);
                                         $ok = false;
                                         
                                 } else {
                                 
                                         $fieldtype = gettype($field);
- if ($fieldtype != $type) {
- $this->exceptions[] = new FormError("checkConfigration(): Illegal field type of field '$field'. It is '$fieldtype', should be '$type'", __FILE__, __LINE__);
+ if ("mixed" != $type && $fieldtype != $type) {
+ $this->exceptions[] = new form_error("checkConfigration(): Illegal field type of field '$field'. It is '$fieldtype', should be '$type'", __FILE__, __LINE__);
                                                 $ok = false;
                                         }
                                         unset($element_data[$field]);
@@ -312,14 +313,14 @@
                         foreach ($this->shared_required_fields as $field => $type)
                                 if (!isset($element_data[$field])) {
                                         
- $this->exception = new FormError("checkConfiguration(): Missing field: '$field'.", __FILE__, __LINE__);
+ $this->exception = new form_error("checkConfiguration(): Missing field: '$field'.", __FILE__, __LINE__);
                                         $ok = false;
                                         
                                 } else {
                                 
                                         $fieldtype = gettype($field);
- if ($fieldtype != $type) {
- $this->exceptions[] = new FormError("checkConfigration(): Illegal field type of field '$field'. It is '$fieldtype', should be '$type'", __FILE__, __LINE__);
+ if ("mixed" != $type && $fieldtype != $type) {
+ $this->exceptions[] = new form_error("checkConfigration(): Illegal field type of field '$field'. It is '$fieldtype', should be '$type'", __FILE__, __LINE__);
                                                 $ok = false;
                                         }
                                         unset($element_data[$field]);
@@ -331,7 +332,7 @@
                                 foreach ($element_data as $field => $value)
                                         if (!isset($this->optional_fields[$field]) && !isset($this->shared_optional_fields[$field])) {
                                         
- $this->exceptions[] = new FormError("checkConfiguration(): You've tried to define a new optional field '$field'", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("checkConfiguration(): You've tried to define a new optional field '$field'", __FILE__, __LINE__);
                                                 $ok = false;
                                                 
                                         } else {
@@ -343,8 +344,8 @@
                                                 else
                                                         $required_type = gettype($this->shared_optional_fields[$field]);
                                                 
- if ( $fieldtype != $required_type) {
- $this->exceptions[] = new FormError("checkConfigutation(): Illegal field type of field '$field'. It is '$fieldtype, should be '$required_type'", __FILE__, __LINE__);
+ if ("mixed" != $required_type && $fieldtype != $required_type) {
+ $this->exceptions[] = new form_error("checkConfigutation(): Illegal field type of field '$field'. It is '$fieldtype, should be '$required_type'", __FILE__, __LINE__);
                                                         $ok = false;
                                                 }
                                                         
@@ -413,7 +414,7 @@
         */
         function setValidator($validator) {
                 if ("string" != gettype($validator)) {
- $this->exceptions[] = new FormError("The name of a validator must be a string.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("The name of a validator must be a string.", __FILE__, __LINE__);
                         return false;
                 }
 
@@ -556,7 +557,7 @@
         */
         function doValidation($event) {
                 if ("" == $event || !isset($this->val_events[$event])) {
- $this->exceptions[] = new FormError("Unknown event: '$event'", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Unknown event: '$event'", __FILE__, __LINE__);
                         return false;
                 }
 
@@ -633,7 +634,7 @@
                         $events = array($events => $events);
                 
                 if (!is_array($events)) {
- $this->exceptions[] = new FormError("Unknown event '$events'.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Unknown event '$events'.", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -730,7 +731,7 @@
                 
                 return sprintf('<table%s><tr><td>%s</td></tr></table>',
                                                                                         ($border) ? ' border="1"' : "",
- ("" != $value) ? $value : $this->value,
+ ("" != $value) ? $value : $this->value
                                                                                 );
                                                                                 
         } // end func getFrozenTable
@@ -809,7 +810,7 @@
         function writeJSCode($condition, $error) {
 
                 if ("" == $error || "" == $condition) {
- $this->exceptions[] = new FormError("No condition or no error specified", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No condition or no error specified", __FILE__, __LINE__);
                         return "";
                 }
                                                 
Index: php-lib/php/form/form_element_buttonobject.inc
diff -u php-lib/php/form/form_element_buttonobject.inc:1.2 php-lib/php/form/form_element_buttonobject.inc:1.3
--- php-lib/php/form/form_element_buttonobject.inc:1.2 Mon Dec 11 20:17:51 2000
+++ php-lib/php/form/form_element_buttonobject.inc Tue Dec 12 01:25:10 2000
@@ -4,6 +4,8 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
+*  <email protected>
+*  <email protected> $Id: form_element_buttonobject.inc,v 1.3 2000/12/12 00:25:10 uw Exp $
 */
 class form_element_buttonobject extends form_element {
         
Index: php-lib/php/form/form_element_checkbox.inc
diff -u php-lib/php/form/form_element_checkbox.inc:1.3 php-lib/php/form/form_element_checkbox.inc:1.4
--- php-lib/php/form/form_element_checkbox.inc:1.3 Mon Dec 11 20:17:51 2000
+++ php-lib/php/form/form_element_checkbox.inc Tue Dec 12 01:25:11 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_checkbox.inc,v 1.3 2000/12/11 19:17:51 uw Exp $
+*  <email protected> $Id: form_element_checkbox.inc,v 1.4 2000/12/12 00:25:11 uw Exp $
 */
 class form_element_checkbox extends form_element_checkobject {
         
Index: php-lib/php/form/form_element_checkobject.inc
diff -u php-lib/php/form/form_element_checkobject.inc:1.3 php-lib/php/form/form_element_checkobject.inc:1.4
--- php-lib/php/form/form_element_checkobject.inc:1.3 Mon Dec 11 20:17:52 2000
+++ php-lib/php/form/form_element_checkobject.inc Tue Dec 12 01:25:12 2000
@@ -4,7 +4,8 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_checkobject.inc,v 1.3 2000/12/11 19:17:52 uw Exp $
+*  <email protected> $Id: form_element_checkobject.inc,v 1.4 2000/12/12 00:25:12 uw Exp $
+*  <email protected>
 */
 class form_element_checkobject extends form_element {
 
Index: php-lib/php/form/form_element_combo.inc
diff -u php-lib/php/form/form_element_combo.inc:1.3 php-lib/php/form/form_element_combo.inc:1.4
--- php-lib/php/form/form_element_combo.inc:1.3 Mon Dec 11 20:17:52 2000
+++ php-lib/php/form/form_element_combo.inc Tue Dec 12 01:25:12 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_combo.inc,v 1.3 2000/12/11 19:17:52 uw Exp $
+*  <email protected> $Id: form_element_combo.inc,v 1.4 2000/12/12 00:25:12 uw Exp $
 */
 class form_element_combo extends form_element_selectobject {
 
@@ -178,7 +178,7 @@
         function addOption($label, $value = "") {
         
                 if ("" == $label) {
- $this->exceptions[] = new FormError("No label specified.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("No label specified.", __FILE__, __LINE__);
                         return false;
                 }
                 
@@ -263,7 +263,7 @@
                                 break;
                         
                         default:
- $this->exceptions[] = new FormError("Unknown sort option '$this->sort'", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Unknown sort option '$this->sort'", __FILE__, __LINE__);
                                 break;
                 }
                 
Index: php-lib/php/form/form_element_date.inc
diff -u php-lib/php/form/form_element_date.inc:1.3 php-lib/php/form/form_element_date.inc:1.4
--- php-lib/php/form/form_element_date.inc:1.3 Mon Dec 11 20:17:53 2000
+++ php-lib/php/form/form_element_date.inc Tue Dec 12 01:25:13 2000
@@ -128,7 +128,11 @@
         */
         function getValue() {
 
- $data = ("GET" == $this->method) ? &$GLOBALS["HTTP_GET_VARS"] : &$GLOBALS["HTTP_POST_VARS"];
+ if ("GET" == $this->method)
+ $data = &$GLOBALS["HTTP_GET_VARS"];
+ else
+ $data = &$GLOBALS["HTTP_POST_VARS"];
+
                 $len = strlen($this->format);
                 
                 for ($i = 0; $i < $len; $i++) {
Index: php-lib/php/form/form_element_file.inc
diff -u php-lib/php/form/form_element_file.inc:1.3 php-lib/php/form/form_element_file.inc:1.4
--- php-lib/php/form/form_element_file.inc:1.3 Mon Dec 11 20:17:54 2000
+++ php-lib/php/form/form_element_file.inc Tue Dec 12 01:25:13 2000
@@ -7,7 +7,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_file.inc,v 1.3 2000/12/11 19:17:54 uw Exp $
+*  <email protected> $Id: form_element_file.inc,v 1.4 2000/12/12 00:25:13 uw Exp $
 */
 class form_element_file extends form_element_buttonobject {
 
Index: php-lib/php/form/form_element_fileupload.inc
diff -u php-lib/php/form/form_element_fileupload.inc:1.3 php-lib/php/form/form_element_fileupload.inc:1.4
--- php-lib/php/form/form_element_fileupload.inc:1.3 Mon Dec 11 20:17:54 2000
+++ php-lib/php/form/form_element_fileupload.inc Tue Dec 12 01:25:14 2000
@@ -7,7 +7,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_fileupload.inc,v 1.3 2000/12/11 19:17:54 uw Exp $
+*  <email protected> $Id: form_element_fileupload.inc,v 1.4 2000/12/12 00:25:14 uw Exp $
 */
 class form_element_fileupload extends form_element_file {
 
Index: php-lib/php/form/form_element_hidden.inc
diff -u php-lib/php/form/form_element_hidden.inc:1.2 php-lib/php/form/form_element_hidden.inc:1.3
--- php-lib/php/form/form_element_hidden.inc:1.2 Mon Dec 11 20:17:55 2000
+++ php-lib/php/form/form_element_hidden.inc Tue Dec 12 01:25:14 2000
@@ -3,7 +3,7 @@
 * Generates hidden elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_hidden.inc,v 1.2 2000/12/11 19:17:55 uw Exp $
+*  <email protected> $Id: form_element_hidden.inc,v 1.3 2000/12/12 00:25:14 uw Exp $
 *  <email protected> Form
 */
 class form_element_hidden extends form_element {
Index: php-lib/php/form/form_element_image.inc
diff -u php-lib/php/form/form_element_image.inc:1.3 php-lib/php/form/form_element_image.inc:1.4
--- php-lib/php/form/form_element_image.inc:1.3 Mon Dec 11 20:17:55 2000
+++ php-lib/php/form/form_element_image.inc Tue Dec 12 01:25:15 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_image.inc,v 1.3 2000/12/11 19:17:55 uw Exp $
+*  <email protected> $Id: form_element_image.inc,v 1.4 2000/12/12 00:25:15 uw Exp $
 */
 class form_element_image extends form_element_buttonobject {
 
Index: php-lib/php/form/form_element_password.inc
diff -u php-lib/php/form/form_element_password.inc:1.2 php-lib/php/form/form_element_password.inc:1.3
--- php-lib/php/form/form_element_password.inc:1.2 Mon Dec 11 20:17:59 2000
+++ php-lib/php/form/form_element_password.inc Tue Dec 12 01:25:15 2000
@@ -3,7 +3,7 @@
 * Generates a password input field, <input type="password">
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_password.inc,v 1.2 2000/12/11 19:17:59 uw Exp $
+*  <email protected> $Id: form_element_password.inc,v 1.3 2000/12/12 00:25:15 uw Exp $
 *  <email protected> Form
 */
 class form_element_password extends form_element_text {
Index: php-lib/php/form/form_element_radio.inc
diff -u php-lib/php/form/form_element_radio.inc:1.3 php-lib/php/form/form_element_radio.inc:1.4
--- php-lib/php/form/form_element_radio.inc:1.3 Mon Dec 11 20:18:02 2000
+++ php-lib/php/form/form_element_radio.inc Tue Dec 12 01:25:16 2000
@@ -3,7 +3,7 @@
 * Generation of radio elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_radio.inc,v 1.3 2000/12/11 19:18:02 uw Exp $
+*  <email protected> $Id: form_element_radio.inc,v 1.4 2000/12/12 00:25:16 uw Exp $
 *  <email protected> Form
 */
 class form_element_radio extends form_element_checkobject {
@@ -22,7 +22,7 @@
         
         function setValue($value) {
                 if (is_array($value) || is_object($value)) {
- $this->exceptions[] = new FormError("form_elements_radio -> setValue() - the value of this element must be skalar data.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("form_elements_radio -> setValue() - the value of this element must be skalar data.", __FILE__, __LINE__);
                         return false;
                 }
                 
Index: php-lib/php/form/form_element_reset.inc
diff -u php-lib/php/form/form_element_reset.inc:1.3 php-lib/php/form/form_element_reset.inc:1.4
--- php-lib/php/form/form_element_reset.inc:1.3 Mon Dec 11 20:18:03 2000
+++ php-lib/php/form/form_element_reset.inc Tue Dec 12 01:25:16 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_reset.inc,v 1.3 2000/12/11 19:18:03 uw Exp $
+*  <email protected> $Id: form_element_reset.inc,v 1.4 2000/12/12 00:25:16 uw Exp $
 */
 class form_element_reset extends form_element_submit {
    
Index: php-lib/php/form/form_element_select.inc
diff -u php-lib/php/form/form_element_select.inc:1.3 php-lib/php/form/form_element_select.inc:1.4
--- php-lib/php/form/form_element_select.inc:1.3 Mon Dec 11 20:18:04 2000
+++ php-lib/php/form/form_element_select.inc Tue Dec 12 01:25:17 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_select.inc,v 1.3 2000/12/11 19:18:04 uw Exp $
+*  <email protected> $Id: form_element_select.inc,v 1.4 2000/12/12 00:25:17 uw Exp $
 */
 class form_element_select extends form_element_selectobject {
 
Index: php-lib/php/form/form_element_selectobject.inc
diff -u php-lib/php/form/form_element_selectobject.inc:1.3 php-lib/php/form/form_element_selectobject.inc:1.4
--- php-lib/php/form/form_element_selectobject.inc:1.3 Mon Dec 11 20:18:05 2000
+++ php-lib/php/form/form_element_selectobject.inc Tue Dec 12 01:25:17 2000
@@ -4,7 +4,8 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_selectobject.inc,v 1.3 2000/12/11 19:18:05 uw Exp $
+*  <email protected> $Id: form_element_selectobject.inc,v 1.4 2000/12/12 00:25:17 uw Exp $
+*  <email protected>
 */
 class form_element_selectobject extends form_element {
                 
@@ -89,7 +90,7 @@
         function setOptions($options) {
         
                 if (!is_array($options)) {
- $this->exceptions[] = new FormError("setOptions() needs an array of options.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("setOptions() needs an array of options.", __FILE__, __LINE__);
                         return false;
                 }
 
@@ -131,7 +132,7 @@
         function setValue($value) {
                 
                 if (!$this->multiple && is_array($value)) {
- $this->exceptions[] = new FormError("Select boxes without multiple requite skalar data as value.", __FILE__, __LINE__);
+ $this->exceptions[] = new form_error("Select boxes without multiple requite skalar data as value.", __FILE__, __LINE__);
                         return false;
                 }
                 
Index: php-lib/php/form/form_element_submit.inc
diff -u php-lib/php/form/form_element_submit.inc:1.3 php-lib/php/form/form_element_submit.inc:1.4
--- php-lib/php/form/form_element_submit.inc:1.3 Mon Dec 11 20:18:06 2000
+++ php-lib/php/form/form_element_submit.inc Tue Dec 12 01:25:18 2000
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_submit.inc,v 1.3 2000/12/11 19:18:06 uw Exp $
+*  <email protected> $Id: form_element_submit.inc,v 1.4 2000/12/12 00:25:18 uw Exp $
 */
 class form_element_submit extends form_element_buttonobject {
         
Index: php-lib/php/form/form_element_text.inc
diff -u php-lib/php/form/form_element_text.inc:1.3 php-lib/php/form/form_element_text.inc:1.4
--- php-lib/php/form/form_element_text.inc:1.3 Mon Dec 11 20:18:07 2000
+++ php-lib/php/form/form_element_text.inc Tue Dec 12 01:25:18 2000
@@ -3,7 +3,7 @@
 * Generates a text input field, <input type="text">.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_text.inc,v 1.3 2000/12/11 19:18:07 uw Exp $
+*  <email protected> $Id: form_element_text.inc,v 1.4 2000/12/12 00:25:18 uw Exp $
 *  <email protected> Form
 */
 class form_element_text extends form_element_textobject {
Index: php-lib/php/form/form_element_textarea.inc
diff -u php-lib/php/form/form_element_textarea.inc:1.3 php-lib/php/form/form_element_textarea.inc:1.4
--- php-lib/php/form/form_element_textarea.inc:1.3 Mon Dec 11 20:18:08 2000
+++ php-lib/php/form/form_element_textarea.inc Tue Dec 12 01:25:19 2000
@@ -2,10 +2,10 @@
 /**
 * Generates a <textarea> elements.
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_textarea.inc,v 1.3 2000/12/11 19:18:08 uw Exp $
+*  <email protected> $Id: form_element_textarea.inc,v 1.4 2000/12/12 00:25:19 uw Exp $
 *  <email protected> Form
 */
-class form_elements_textarea extends form_element_textobject {
+class form_element_textarea extends form_element_textobject {
 
         var $optional_fields = array (
                                                                                                                                         "rows" => "integer",
Index: php-lib/php/form/form_element_textobject.inc
diff -u php-lib/php/form/form_element_textobject.inc:1.2 php-lib/php/form/form_element_textobject.inc:1.3
--- php-lib/php/form/form_element_textobject.inc:1.2 Mon Dec 11 20:18:09 2000
+++ php-lib/php/form/form_element_textobject.inc Tue Dec 12 01:25:19 2000
@@ -6,8 +6,9 @@
 * for the HTML form elements "text" and "textarea".
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_textobject.inc,v 1.2 2000/12/11 19:18:09 uw Exp $
+*  <email protected> $Id: form_element_textobject.inc,v 1.3 2000/12/12 00:25:19 uw Exp $
 *  <email protected> Form
+*  <email protected>
 */
 class form_element_textobject extends form_element {
 
Index: php-lib/php/form/form_element_tree.inc
diff -u php-lib/php/form/form_element_tree.inc:1.3 php-lib/php/form/form_element_tree.inc:1.4
--- php-lib/php/form/form_element_tree.inc:1.3 Mon Dec 11 20:18:10 2000
+++ php-lib/php/form/form_element_tree.inc Tue Dec 12 01:25:20 2000
@@ -4,9 +4,9 @@
 *
 *  <email protected> Form
 *  <email protected> Ulf Wendel
-*  <email protected> $Id: form_element_tree.inc,v 1.3 2000/12/11 19:18:10 uw Exp $
+*  <email protected> $Id: form_element_tree.inc,v 1.4 2000/12/12 00:25:20 uw Exp $
 */
-class form_elements_tree extends form_element {
+class form_element_tree extends form_element {
 
         var $tree;
         var $delimiter = "/";

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-dev-unsubscribe <email protected>
For additional commands, e-mail: phplib-dev-help <email protected>