Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
drupal.org
better_formats
Commits
7c74d03f
Commit
7c74d03f
authored
Jun 01, 2009
by
dragonwize
Browse files
Fixed #478120 by dragonwize: Forgot to split permission pull for selections.
parent
c96316b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
better_formats.module
better_formats.module
+6
-6
No files found.
better_formats.module
View file @
7c74d03f
...
...
@@ -322,7 +322,7 @@ function better_formats_text_process($element, $edit, $form_state, $form) {
// Set default format for cck textarea.
$element
[
'#value'
][
$filter_key
]
=
$format
;
// Set filter selection form.
$element
[
$filter_key
]
=
better_formats_filter_form
(
$format
,
$default
,
$form
[
'type'
][
'#value'
],
1
,
$parents
);
$element
[
$filter_key
]
=
better_formats_filter_form
(
$format
,
$default
,
'node'
,
$form
[
'type'
][
'#value'
],
1
,
$parents
);
}
return
$element
;
...
...
@@ -349,7 +349,7 @@ function better_formats_set_node_format(&$form) {
}
// Overwrite the filter form with our own.
$form
[
'body_field'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
,
$form
[
'type'
][
'#value'
]);
$form
[
'body_field'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
,
'node'
,
$form
[
'type'
][
'#value'
]);
}
}
...
...
@@ -374,7 +374,7 @@ function better_formats_set_comment_format(&$form) {
$format
=
better_formats_get_current_format
(
$form
[
'comment_filter'
][
'format'
]);
}
// Overwrite the filter form with our own.
$form
[
'comment_filter'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
,
$node
->
type
);
$form
[
'comment_filter'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
,
'comment'
,
$node
->
type
);
}
}
...
...
@@ -398,7 +398,7 @@ function better_formats_set_block_format(&$form) {
}
// Overwrite the filter form with our own.
$form
[
'block_settings'
][
'body_field'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
);
$form
[
'block_settings'
][
'body_field'
][
'format'
]
=
better_formats_filter_form
(
$format
,
$default
,
'block'
);
}
}
...
...
@@ -490,10 +490,10 @@ function better_formats_get_default_format($mode, $node_type = '') {
*
* @see filter_form()
*/
function
better_formats_filter_form
(
$value
=
FILTER_FORMAT_DEFAULT
,
$default_format
,
$node_type
=
''
,
$weight
=
1
,
$parents
=
array
(
'format'
))
{
function
better_formats_filter_form
(
$value
=
FILTER_FORMAT_DEFAULT
,
$default_format
,
$mode
=
'node'
,
$node_type
=
''
,
$weight
=
1
,
$parents
=
array
(
'format'
))
{
$value
=
filter_resolve_format
(
$value
);
$formats
=
filter_formats
();
$show_selection
=
user_access
(
'show format selection'
);
$show_selection
=
user_access
(
'show format selection
for '
.
$mode
.
's
'
);
$show_tips
=
user_access
(
'show format tips'
);
$show_tips_link
=
user_access
(
'show more format tips link'
);
$per_node_type
=
variable_get
(
'better_formats_per_node_type'
,
FALSE
);
...
...
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