OSDN Git Service

システム選択作成時のバグ修正
authorCake <cake_67@users.sourceforge.jp>
Mon, 27 Dec 2010 14:41:50 +0000 (23:41 +0900)
committerCake <cake_67@users.sourceforge.jp>
Mon, 27 Dec 2010 14:41:50 +0000 (23:41 +0900)
app/controllers/app_controller.php

index a20cb7f..59858d6 100644 (file)
@@ -690,7 +690,7 @@ class AppController extends Controller
        function _restore_html_get_systems($data, $public_flag = array()) {
                $sort_order = array();
                foreach ($data as $k => $v) {
-                       $restored[$v['System']['id']] = $this->{$this->modelClass}->restore_html($v['System']['name']);
+                       $restored[$this->{$this->modelClass}->restore_html($v['System']['name'])] = $v['System']['id'];
                        // SingleSystem
                        if (isset($this->site_configs['System.singleSystem']['value']) && $this->site_configs['System.singleSystem']['value'] && !empty($public_flag)) {
                                return $restored;
@@ -705,7 +705,7 @@ class AppController extends Controller
 
                $restored = $this->sort4sort_order($restored, $sort_order);
 
-               return $restored;
+               return array_flip($restored);
        }
        function _restore_html_profile_select($data) {
                $sort_order = array();