Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/block/block.admin.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) {
*/
function block_admin_display_form_submit($form, &$form_state) {
foreach ($form_state['values'] as $block) {
// Skip over non block elements in this form like 'form_id' and 'submit'.
if (!is_array($block)) { continue; }

$block['status'] = $block['region'] != BLOCK_REGION_NONE;
$block['region'] = $block['status'] ? $block['region'] : '';
db_query("UPDATE {blocks} SET status = %d, weight = %d, region = '%s', throttle = %d WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $block['status'], $block['weight'], $block['region'], isset($block['throttle']) ? $block['throttle'] : 0, $block['module'], $block['delta'], $block['theme']);
Expand Down