Commit 704a5a59 authored by Penny Leach's avatar Penny Leach Committed by Nigel McNie
Browse files

fixing weird bug where moving blocks to the very bottom of a column wasn't working

parent 92b8d352
......@@ -866,6 +866,13 @@ class View {
// and set it in the object for good measure.
$bi->set('order', $values['order']);
else if ($values['order'] == $this->get_current_max_order($values['column'])) {
// moving to the very bottom
set_field('block_instance', 'order', 0, 'view', $this->get('id'), 'column', $values['column'], 'order', $bi->get('order'));
$this->shuffle_helper('order', 'down', '>=', $bi->get('order'), '"column" = ?', array($bi->get('column')));
set_field('block_instance', 'order', $values['order'], 'view', $this->get('id'), 'column', $values['column'], 'order', 0);
$bi->set('order', $values['order']);
else {
$this->shuffle_column($bi->get('column'), $values['order'], $bi->get('order'));
Supports Markdown
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