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
26ba3782
Commit
26ba3782
authored
Mar 01, 2006
by
Dries
Browse files
- Patch
#50982
by kuba: converted the admin filter overview page to the submit-model.
parent
e3db356a
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/filter.module
View file @
26ba3782
...
...
@@ -271,14 +271,6 @@ function filter_perm() {
*/
function
filter_admin_overview
()
{
$edit
=
isset
(
$_POST
[
'edit'
])
?
$_POST
[
'edit'
]
:
''
;
// Process form submission to set the default format
if
(
is_numeric
(
$edit
[
'default'
]))
{
drupal_set_message
(
t
(
'Default format updated.'
));
variable_set
(
'filter_default_format'
,
$edit
[
'default'
]);
}
// Overview of all formats.
$formats
=
filter_formats
();
$error
=
false
;
...
...
@@ -305,6 +297,14 @@ function filter_admin_overview() {
return
drupal_get_form
(
'filter_admin_overview'
,
$form
);
}
function
filter_admin_overview_submit
(
$form_id
,
$form_values
)
{
// Process form submission to set the default format
if
(
is_numeric
(
$form_values
[
'default'
]))
{
drupal_set_message
(
t
(
'Default format updated.'
));
variable_set
(
'filter_default_format'
,
$form_values
[
'default'
]);
}
}
function
theme_filter_admin_overview
(
$form
)
{
foreach
(
$form
as
$name
=>
$element
)
{
if
(
isset
(
$element
[
'roles'
])
&&
is_array
(
$element
[
'roles'
]))
{
...
...
modules/filter/filter.module
View file @
26ba3782
...
...
@@ -271,14 +271,6 @@ function filter_perm() {
*/
function
filter_admin_overview
()
{
$edit
=
isset
(
$_POST
[
'edit'
])
?
$_POST
[
'edit'
]
:
''
;
// Process form submission to set the default format
if
(
is_numeric
(
$edit
[
'default'
]))
{
drupal_set_message
(
t
(
'Default format updated.'
));
variable_set
(
'filter_default_format'
,
$edit
[
'default'
]);
}
// Overview of all formats.
$formats
=
filter_formats
();
$error
=
false
;
...
...
@@ -305,6 +297,14 @@ function filter_admin_overview() {
return
drupal_get_form
(
'filter_admin_overview'
,
$form
);
}
function
filter_admin_overview_submit
(
$form_id
,
$form_values
)
{
// Process form submission to set the default format
if
(
is_numeric
(
$form_values
[
'default'
]))
{
drupal_set_message
(
t
(
'Default format updated.'
));
variable_set
(
'filter_default_format'
,
$form_values
[
'default'
]);
}
}
function
theme_filter_admin_overview
(
$form
)
{
foreach
(
$form
as
$name
=>
$element
)
{
if
(
isset
(
$element
[
'roles'
])
&&
is_array
(
$element
[
'roles'
]))
{
...
...
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