Commit 01191f72 authored by Dries's avatar Dries

- Patch #63267 by profix et al: trim the content of the 'pages' setting so it...

- Patch #63267 by profix et al: trim the content of the 'pages' setting so it can be evaluated properly.
parent a4f34e6b
......@@ -500,7 +500,7 @@ function block_admin_configure_validate($form_id, $form_values) {
function block_admin_configure_submit($form_id, $form_values) {
if (!form_get_errors()) {
db_query("UPDATE {blocks} SET visibility = %d, pages = '%s', custom = %d, title = '%s' WHERE module = '%s' AND delta = '%s'", $form_values['visibility'], $form_values['pages'], $form_values['custom'], $form_values['title'], $form_values['module'], $form_values['delta']);
db_query("UPDATE {blocks} SET visibility = %d, pages = '%s', custom = %d, title = '%s' WHERE module = '%s' AND delta = '%s'", $form_values['visibility'], trim($form_values['pages']), $form_values['custom'], $form_values['title'], $form_values['module'], $form_values['delta']);
db_query("DELETE FROM {blocks_roles} WHERE module = '%s' AND delta = '%s'", $form_values['module'], $form_values['delta']);
foreach (array_filter($form_values['roles']) as $rid) {
db_query("INSERT INTO {blocks_roles} (rid, module, delta) VALUES (%d, '%s', '%s')", $rid, $form_values['module'], $form_values['delta']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment