OSDN Git Service

キャラクター選択でプロフない時のバグ修正
authorCake <cake_67@users.sourceforge.jp>
Thu, 20 Jan 2011 14:04:18 +0000 (23:04 +0900)
committerCake <cake_67@users.sourceforge.jp>
Thu, 20 Jan 2011 14:04:18 +0000 (23:04 +0900)
app/controllers/characters_controller.php

index ad5ed55..3aeef4f 100644 (file)
@@ -859,9 +859,8 @@ class CharactersController extends AppController {
                        $system_id = 0;
                }
                $systems = $this->_get_systems('public');
-               $systems = array_merge(array(
-                       '0' => __('All', true),
-               ), $systems);
+               $systems =
+                       array(0 => __('All', true)) + $systems;
 
                $this->search_cols['Character'] = array_merge($this->search_cols['Character'], array(
                        'system_id' => array(
@@ -1043,9 +1042,9 @@ class CharactersController extends AppController {
                        if (empty($isAdmin)) {
                                if (!empty($new_condition)) {
                                        $new_condition = '('. $new_condition. ')';
-                                       $new_condition .= ' AND';
                                }
                                if (isset($conditions['profile_search'])) {
+                                       $new_condition .= ' AND';
                                        $new_condition .= ' CharactersHasProfile.public_flag = \'public\'';
                                }
                        }