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
This commit is contained in:
Jean-Philippe Lang 2009-03-26 18:11:56 +00:00
parent b2a6176828
commit c77806738a
1 changed files with 2 additions and 2 deletions

View File

@ -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|