OSDN Git Service

StaticTableの静的行が変更可能になっていたのを修正
authorCake <cake_67@users.sourceforge.jp>
Tue, 3 Aug 2010 05:52:54 +0000 (14:52 +0900)
committerCake <cake_67@users.sourceforge.jp>
Tue, 3 Aug 2010 06:59:23 +0000 (15:59 +0900)
app/controllers/characters_controller.php
app/models/profile.php
app/views/helpers/profiledisp.php

index e839287..c18ec88 100644 (file)
@@ -249,12 +249,6 @@ class CharactersController extends AppController {
                $profile_id = $this->params['named']['profile_id'];
 
                if (empty($this->data)) {
-                       $this->data['clearCache'] = array(
-                               'character_id' => $id,
-                               'user_id' => $this->user_id,
-                               'system_id' => $character['System']['id'],
-                       );
-
                        $target = array();
                        foreach ($character['System']['Profile'] as $profile) {
                                if ($profile['id'] == $profile_id) {
@@ -275,6 +269,12 @@ class CharactersController extends AppController {
                }
 
                if (!empty($this->data)) {
+                       $this->data['clearCache'] = array(
+                               'character_id' => $id,
+                               'user_id' => $this->user_id,
+                               'system_id' => $character['System']['id'],
+                       );
+
                        $this->post_data = $this->data;
 
                        $this->data['Character'] = array_merge($character['Character'], $this->data['Character']);
index 446a4d2..6e4e5fd 100644 (file)
@@ -121,6 +121,7 @@ class Profile extends AppModel {
                                'CharactersHasProfile.id',
                                'CharactersHasProfile.character_id',
                                'CharactersHasProfile.profile_table_id',
+                               'CharactersHasProfile.profile_table_static_id',
                                'CharactersHasProfile.value',
                                'CharactersHasProfile.public_flag',
                                'CharactersHasProfile.link_value',
index dec4c13..853807c 100644 (file)
@@ -395,6 +395,7 @@ class ProfiledispHelper extends Helper {
                if (empty($characters_has_profiles)) {
                        return null;
                }
+
                if (isset($characters_has_profiles[0]['ProfileTableStatic'])) {
                        $statics = $characters_has_profiles[0]['ProfileTableStatic'];
                }
@@ -664,7 +665,6 @@ class ProfiledispHelper extends Helper {
                        } else {
                                $publicOnly = true;
                        }
-                       
 
                        if (isset($profile['id'])) {
                                $tableId = 'TableProfileId'. $profile['id'];