summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/filter.module8
-rw-r--r--modules/filter/filter.module8
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/filter.module b/modules/filter.module
index 550d053a2..173c0b253 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -750,7 +750,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
* @return
* HTML for the form element.
*/
-function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
+function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16, $parents = array('format')) {
if ($value == FILTER_FORMAT_DEFAULT) {
$value = variable_get('filter_default_format', 1);
}
@@ -759,7 +759,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
$extra = l(t('More information about formatting options'), 'filter/tips');
if (count($formats) > 1) {
- $form['format'] = array(
+ $form = array(
'#type' => 'fieldset',
'#title' => t('Input format'),
'#collapsible' => TRUE,
@@ -768,12 +768,12 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
);
// Multiple formats available: display radio buttons with tips.
foreach ($formats as $format) {
- $form['format'][$format->format] = array(
+ $form[$format->format] = array(
'#type' => 'radio',
'#title' => $format->name,
'#default_value' => $value,
'#return_value' => $format->format,
- '#parents' => array('format'),
+ '#parents' => $parents,
'#description' => theme('filter_tips', _filter_tips($format->format, false)),
'#validate' => array('filter_form_validate' => array())
);
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index 550d053a2..173c0b253 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -750,7 +750,7 @@ function check_markup($text, $format = FILTER_FORMAT_DEFAULT, $check = TRUE) {
* @return
* HTML for the form element.
*/
-function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
+function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16, $parents = array('format')) {
if ($value == FILTER_FORMAT_DEFAULT) {
$value = variable_get('filter_default_format', 1);
}
@@ -759,7 +759,7 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
$extra = l(t('More information about formatting options'), 'filter/tips');
if (count($formats) > 1) {
- $form['format'] = array(
+ $form = array(
'#type' => 'fieldset',
'#title' => t('Input format'),
'#collapsible' => TRUE,
@@ -768,12 +768,12 @@ function filter_form($value = FILTER_FORMAT_DEFAULT, $weight = -16) {
);
// Multiple formats available: display radio buttons with tips.
foreach ($formats as $format) {
- $form['format'][$format->format] = array(
+ $form[$format->format] = array(
'#type' => 'radio',
'#title' => $format->name,
'#default_value' => $value,
'#return_value' => $format->format,
- '#parents' => array('format'),
+ '#parents' => $parents,
'#description' => theme('filter_tips', _filter_tips($format->format, false)),
'#validate' => array('filter_form_validate' => array())
);