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
6938e6cb
Commit
6938e6cb
authored
Oct 31, 2005
by
Dries
Browse files
- Patch
#35320
by asimmonds: couldn't save roles in admin/filters/...
parent
98d19796
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/filter.module
View file @
6938e6cb
...
...
@@ -475,7 +475,7 @@ function filter_admin_filters_save($format, $toggles) {
// We store the roles as a string for ease of use.
// we should always set all roles to true when saving a default role.
// We use leading and trailing comma's to allow easy substring matching.
$roles
=
isset
(
$edit
[
'roles'
])
?
$edit
[
'roles'
]
:
array
();
$roles
=
isset
(
$edit
[
'roles'
])
?
array_keys
(
$edit
[
'roles'
]
)
:
array
();
$roles
=
','
.
implode
(
','
,
(
$edit
[
'default_format'
]
?
user_roles
()
:
$roles
))
.
','
;
db_query
(
"UPDATE
{
filter_formats
}
SET cache = %d, name='%s', roles = '%s' WHERE format = %d"
,
$cache
,
$name
,
$roles
,
$format
);
...
...
modules/filter/filter.module
View file @
6938e6cb
...
...
@@ -475,7 +475,7 @@ function filter_admin_filters_save($format, $toggles) {
// We store the roles as a string for ease of use.
// we should always set all roles to true when saving a default role.
// We use leading and trailing comma's to allow easy substring matching.
$roles
=
isset
(
$edit
[
'roles'
])
?
$edit
[
'roles'
]
:
array
();
$roles
=
isset
(
$edit
[
'roles'
])
?
array_keys
(
$edit
[
'roles'
]
)
:
array
();
$roles
=
','
.
implode
(
','
,
(
$edit
[
'default_format'
]
?
user_roles
()
:
$roles
))
.
','
;
db_query
(
"UPDATE
{
filter_formats
}
SET cache = %d, name='%s', roles = '%s' WHERE format = %d"
,
$cache
,
$name
,
$roles
,
$format
);
...
...
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