Commit c7780673 authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixes that "My Page" personalization was not storing reordered blocks (#2971).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2634 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent b2a61768
......@@ -139,8 +139,8 @@ class MyController < ApplicationController
# params[:list-(top|left|right)] : array of block ids of the group
def order_blocks
group = params[:group]
if group.is_a?(Array)
group_items = params["list-#{group}"].collect(&:underscore)
if group.is_a?(String)
group_items = (params["list-#{group}"] || []).collect(&:underscore)
if group_items and group_items.is_a? Array
# remove group blocks if they are presents in other groups
%w(top left right).each {|f|
......
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