summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/filter/filter.module7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/filter/filter.module b/modules/filter/filter.module
index f3c2e38ea..0f0cddb2a 100644
--- a/modules/filter/filter.module
+++ b/modules/filter/filter.module
@@ -495,7 +495,12 @@ function filter_admin_format_form_submit($form, &$form_state) {
}
}
}
- $roles = ','. implode(',', ($form_state['values']['default_format'] ? array_keys(user_roles()) : $roles)) .',';
+ if (!empty($form_state['values']['default_format'])) {
+ $roles = ','. implode(',', array_keys(user_roles())) .',';
+ }
+ else {
+ $roles = ','. implode(',', $roles) .',';
+ }
db_query("UPDATE {filter_formats} SET cache = %d, name='%s', roles = '%s' WHERE format = %d", $cache, $name, $roles, $format);