diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-04-26 21:57:02 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-04-26 21:57:02 +0000 |
commit | 278c2d52e971687c578246de68120ac2fbe90266 (patch) | |
tree | 970b38901ea51a7b650279e8969a4d524b4519ba | |
parent | 1391df9fb36f05b9bda7edde5a51d9eaabc6ad43 (diff) | |
download | brdo-278c2d52e971687c578246de68120ac2fbe90266.tar.gz brdo-278c2d52e971687c578246de68120ac2fbe90266.tar.bz2 |
- Patch #7403 by jhriggs: the required-form-items patch that hit HEAD a few days back has an erroneous assignment in form_radios().
-rw-r--r-- | includes/common.inc | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc index 9a78e3365..ddda66a3d 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -87,6 +87,31 @@ function drupal_get_breadcrumb() { /* @} */ /** + * @name Page tabs + * @ingroup common + * + * Functions to get and set the tabs of the current page. + * @{ + */ + +/** + * @param $tab Array of links to use for tabs + */ +function drupal_set_tab($tab = NULL) { + static $stored_tab = array(); + + if (!is_null($tab)) { + $stored_tab[] = $tab; + } + return $stored_tab; +} + +function drupal_get_tab() { + return drupal_set_tab(); +} +/* @} */ + +/** * @name HTML head contents * @ingroup common * @@ -995,7 +1020,7 @@ function form_radios($title, $name, $value, $options, $description = NULL, $requ foreach ($options as $key => $choice) { $choices .= "<label class=\"option\"><input type=\"radio\" class=\"form-radio\" name=\"edit[$name]\" value=\"$key\"". ($key == $value ? " checked=\"checked\"" : "") ." /> $choice</label><br />"; } - return theme('form_element', $title, $choices, $description, $required = FALSE); + return theme('form_element', $title, $choices, $description, $required); } } |