From: Cake Date: Mon, 27 Dec 2010 14:41:50 +0000 (+0900) Subject: システム選択作成時のバグ修正 X-Git-Url: http://git.osdn.net/view?p=trpgtools-onweb%2Fcake-frame.git;a=commitdiff_plain;h=7e57a01205c012ea7fcbd825656a1d81debc4ccd システム選択作成時のバグ修正 --- diff --git a/app/controllers/app_controller.php b/app/controllers/app_controller.php index a20cb7f..59858d6 100644 --- a/app/controllers/app_controller.php +++ b/app/controllers/app_controller.php @@ -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();