From 7863be5e82ccfbaa4aa9bac2343ad9e560130b44 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 8 Oct 2005 12:21:47 +0000 Subject: - Patch #33433 by chx: fixed a number of form API problems. * Default form value * Leftover debug function in form.inc * PHP5 issue with comment date (I got this patch from another issue) * Validation error fix (was calling legacy form validate) * Lots o' warnings on comment preview * Filter tips plus argument (gremlins. I swear this was not there.) * Message to clear what's going on with system settings * Non-freetagging taxonomies fixed --- includes/form.inc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'includes/form.inc') diff --git a/includes/form.inc b/includes/form.inc index 0408db883..42240001c 100644 --- a/includes/form.inc +++ b/includes/form.inc @@ -517,7 +517,7 @@ function _form_builder($form, $parents = array(), $multiple = FALSE) { $ref =& $ref[$parent]; } $default_value = $posted ? $edit : $form[default_value]; - $form[value] = $form[value] ? $form[value] : $default_value; + $form[value] = isset($form[value]) ? $form[value] : $default_value; if (isset($form[execute])) { if ($_POST[$form[name]] == $form[value]) { $form_execute = $form_execute || $form[execute]; @@ -593,12 +593,6 @@ function form_render(&$elements) { return $elements[prefix] . $content . $elements[suffix]; } -function _print_rp($var) { - echo "
";
-  print_r($var);
-  echo "
"; -} - /** * Function used by uasort in form render to sort form via weight. */ -- cgit v1.2.3