Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
d40ce217
Commit
d40ce217
authored
Dec 14, 2005
by
Dries
Browse files
- Patch
#40975
by chx: filter_format no longer supports multiple filtered areas.
parent
d4fe9203
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/filter.module
View file @
d40ce217
...
...
@@ -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
())
);
...
...
modules/filter/filter.module
View file @
d40ce217
...
...
@@ -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
())
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment