summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/filter.module2
-rw-r--r--modules/filter/filter.module2
2 files changed, 2 insertions, 2 deletions
diff --git a/modules/filter.module b/modules/filter.module
index c09864a83..9251d79c0 100644
--- a/modules/filter.module
+++ b/modules/filter.module
@@ -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);
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index c09864a83..9251d79c0 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -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);