]> source.dussan.org Git - redmine.git/commitdiff
Fixes that "My Page" personalization was not storing reordered blocks (#2971).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 26 Mar 2009 18:11:56 +0000 (18:11 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Thu, 26 Mar 2009 18:11:56 +0000 (18:11 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2634 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/my_controller.rb

index b39dc1c9c152b464ae6bd92cb636c2f545123101..5ae55e6ff538d098e66cdcc38167a57138fa18f1 100644 (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|