From 8830c88db795f7c48e3799c4d2d65db7e1a6310c Mon Sep 17 00:00:00 2001 From: Cake Date: Fri, 23 Jul 2010 11:19:05 +0900 Subject: [PATCH] =?utf8?q?=E4=B8=8D=E8=A6=81=E3=81=AECache::clear=E5=89=8A?= =?utf8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/controllers/character_pictures_controller.php | 4 ---- app/controllers/character_profile_archives_controller.php | 2 -- app/controllers/characters_controller.php | 8 +------- app/controllers/profile_selects_controller.php | 3 +-- app/controllers/profile_table_statics_controller.php | 1 - app/controllers/profile_tables_controller.php | 3 +-- app/controllers/profiles_controller.php | 3 +-- app/controllers/site_configs_controller.php | 1 - app/controllers/systems_controller.php | 1 - app/controllers/users_controller.php | 2 -- app/models/character.php | 1 - 11 files changed, 4 insertions(+), 25 deletions(-) diff --git a/app/controllers/character_pictures_controller.php b/app/controllers/character_pictures_controller.php index 8ec53a4..817273d 100644 --- a/app/controllers/character_pictures_controller.php +++ b/app/controllers/character_pictures_controller.php @@ -47,7 +47,6 @@ class CharacterPicturesController extends AppController { if ($this->isOwner($character['Character'], $this->user_id)) { $this->redirect(array('action'=>'listview', $character_id)); - exit; } $this->set('character', $character); @@ -69,7 +68,6 @@ class CharacterPicturesController extends AppController { } if (!$this->isOwner($character['Character'], $this->user_id)) { $this->redirect(array('action'=>'index', $character_id)); - exit; } $this->set('character', $character); @@ -182,7 +180,6 @@ class CharacterPicturesController extends AppController { } $this->Session->setFlash(__('The CharacterPicture has been saved', true)); - //Cache::clear(); $this->redirect(array('action'=>'listview', $character_picture['CharacterPicture']['character_id'])); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -377,7 +374,6 @@ class CharacterPicturesController extends AppController { $this->_delete_setting($character_picture['Attachment'][0]['basename']); $this->Session->setFlash(__('CharacterPicture deleted', true)); - Cache::clear(); } else { $this->Session->setFlash(__('The data has not been deleted', true)); } diff --git a/app/controllers/character_profile_archives_controller.php b/app/controllers/character_profile_archives_controller.php index c97f88a..88b9b88 100644 --- a/app/controllers/character_profile_archives_controller.php +++ b/app/controllers/character_profile_archives_controller.php @@ -84,7 +84,6 @@ class CharacterProfileArchivesController extends AppController { if (!empty($this->data)) { if ($this->CharacterProfileArchive->save($this->data, array('fieldList' => $this->CharacterProfileArchive->fields['edit']))) { - Cache::clear(); $this->Session->setFlash(__('The CharacterProfileArchive has been saved', true)); $this->redirect(array('action' => 'view', $id)); } else { @@ -210,7 +209,6 @@ class CharacterProfileArchivesController extends AppController { 'CharacterProfileArchive.id ' => $ids, ) )) { - //Cache::clear(); $this->CharacterProfileArchive->deleteCache4ProfileArchives($character_id); $this->CharacterProfileArchive->deleteCache4views($ids); $this->Session->setFlash(__('CharacterProfileArchive deleted', true)); diff --git a/app/controllers/characters_controller.php b/app/controllers/characters_controller.php index c94ea1c..e839287 100644 --- a/app/controllers/characters_controller.php +++ b/app/controllers/characters_controller.php @@ -101,7 +101,6 @@ class CharactersController extends AppController { $this->Character->create(); if ($this->Character->save($this->data, array('fieldList' => $this->Character->fields['add']))) { - Cache::clear(); $this->Session->setFlash(sprintf(__('%s has been saved.', true), $this->data['Character']['name'])); $this->redirect(array('controller' => 'characters', 'action'=>'view', $this->Character->id)); @@ -176,7 +175,6 @@ class CharactersController extends AppController { $this->Character->CharactersHasProfile->fields['add'] ) ))) { - Cache::clear(); // Archives保存 if (isset($this->data['Character']['archive']) && $this->data['Character']['archive'] == 1) { @@ -304,7 +302,6 @@ class CharactersController extends AppController { $this->Character->CharactersHasProfile->fields['add'] ) ))) { - Cache::clear(); // Archives保存 if (isset($this->data['Character']['archive']) && $this->data['Character']['archive'] == 1) { @@ -312,7 +309,6 @@ class CharactersController extends AppController { } $this->Session->setFlash(sprintf(__('%s has been saved.', true), $this->data['Character']['name'])); - Cache::clear(); $this->redirect(array('action'=>'view', $id)); } else { $this->data = array_merge($character, $this->data); @@ -389,7 +385,6 @@ class CharactersController extends AppController { ) )) { $this->Session->setFlash(__('The new system has been saved', true)); - Cache::clear(); $this->redirect(array('action'=>'view', $id)); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -539,7 +534,6 @@ class CharactersController extends AppController { 'public_flag', ), ))) { - Cache::clear(); $this->Session->setFlash(sprintf(__('%s has been saved.', true), $character['Character']['name'])); $this->redirect(array('action'=>'view', $id)); @@ -768,7 +762,7 @@ class CharactersController extends AppController { } $this->Session->setFlash(__('Character deleted', true)); - Cache::clear(); + return true; } else { $this->Session->setFlash(__('The Character could not be deleted.', true)); diff --git a/app/controllers/profile_selects_controller.php b/app/controllers/profile_selects_controller.php index af043c7..b75ed71 100644 --- a/app/controllers/profile_selects_controller.php +++ b/app/controllers/profile_selects_controller.php @@ -51,7 +51,6 @@ class ProfileSelectsController extends AppController { if ($this->ProfileSelect->save($this->data, array('fieldList' => $this->ProfileSelect->fields['edit']))) { $this->Session->setFlash(__('The ProfileSelect has been saved', true)); - Cache::clear(); $this->redirect(array('action'=>'admin_listview', $profileSelect['Profile']['id'])); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -117,7 +116,7 @@ class ProfileSelectsController extends AppController { if (!$error) { $this->Session->setFlash(__('The ProfileSelect has been saved', true)); } - Cache::clear(); + $this->redirect(array('controller' => 'profile_selects', 'action'=>'admin_listview', $profile_id)); } diff --git a/app/controllers/profile_table_statics_controller.php b/app/controllers/profile_table_statics_controller.php index aace3d7..84b4182 100644 --- a/app/controllers/profile_table_statics_controller.php +++ b/app/controllers/profile_table_statics_controller.php @@ -57,7 +57,6 @@ class ProfileTableStaticsController extends AppController { ) )) { $this->Session->setFlash(__('The Static ProfileTable has been saved', true)); - Cache::clear(); $this->redirect(array('controller'=>'profile_tables', 'action'=>'admin_listview', $profileTable['ProfileTable']['profile_id'])); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); diff --git a/app/controllers/profile_tables_controller.php b/app/controllers/profile_tables_controller.php index 27b72f6..386a1c3 100644 --- a/app/controllers/profile_tables_controller.php +++ b/app/controllers/profile_tables_controller.php @@ -61,7 +61,6 @@ class ProfileTablesController extends AppController { if ($this->ProfileTable->validates()) { if ($this->ProfileTable->save($this->data, array('fieldList' => $this->ProfileTable->fields['edit']))) { $this->Session->setFlash(__('The ProfileTable has been saved', true)); - Cache::clear(); $this->redirect(array('action'=>'admin_listview', $profileTable['Profile']['id'])); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -127,7 +126,7 @@ class ProfileTablesController extends AppController { if (!$error) { $this->Session->setFlash(__('The ProfileTable has been saved', true)); } - Cache::clear(); + $this->redirect(array('controller' => 'profile_tables', 'action'=>'admin_listview', $profile_id)); } diff --git a/app/controllers/profiles_controller.php b/app/controllers/profiles_controller.php index b6350c1..71a24ef 100644 --- a/app/controllers/profiles_controller.php +++ b/app/controllers/profiles_controller.php @@ -97,7 +97,6 @@ class ProfilesController extends AppController { } } - Cache::clear(); $this->redirect(array('controller' => 'systems', 'action'=>'admin_view', $profile['Profile']['system_id'])); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -166,7 +165,7 @@ class ProfilesController extends AppController { if (!$error) { $this->Session->setFlash(__('The Profile has been saved', true)); } - Cache::clear(); + $this->redirect(array('controller' => 'systems', 'action'=>'admin_view', $system_id)); } diff --git a/app/controllers/site_configs_controller.php b/app/controllers/site_configs_controller.php index 7543740..26cd2e8 100644 --- a/app/controllers/site_configs_controller.php +++ b/app/controllers/site_configs_controller.php @@ -57,7 +57,6 @@ class SiteConfigsController extends AppController { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); } else { $this->Session->setFlash(__('The SiteConfig has been saved', true)); - Cache::clear(); if (isset($this->data['basic_submit'])) { $sharp = 'basic'; diff --git a/app/controllers/systems_controller.php b/app/controllers/systems_controller.php index 7cb880c..b26db6e 100644 --- a/app/controllers/systems_controller.php +++ b/app/controllers/systems_controller.php @@ -128,7 +128,6 @@ class SystemsController extends AppController { $this->System->Character->updateAll(array('Character.public_flag' => "'private'"), array('Character.system_id' => $id)); } - Cache::clear(); $this->redirect(array('action'=>'view', $id)); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); diff --git a/app/controllers/users_controller.php b/app/controllers/users_controller.php index 657aec0..a0ffe9a 100644 --- a/app/controllers/users_controller.php +++ b/app/controllers/users_controller.php @@ -588,7 +588,6 @@ class UsersController extends ModuleController { $this->data['User']['id'] = $id; if ($this->User->save($this->data)) { $this->Session->setFlash(__('The User has been saved', true)); - Cache::clear(); $this->redirect(array('action'=>'index')); } else { $this->Session->setFlash(__('The data could not be saved. Please, try again.', true)); @@ -615,7 +614,6 @@ class UsersController extends ModuleController { $this->{$this->modelClass}->deleteRegistData4mail($registData['RegistMail']['mail']); $this->Session->setFlash(__('The User has been saved', true)); - Cache::clear(); $this->redirect(array('action'=>'index')); } diff --git a/app/models/character.php b/app/models/character.php index 68b3013..d02affd 100644 --- a/app/models/character.php +++ b/app/models/character.php @@ -346,7 +346,6 @@ class Character extends AppModel { $this->CharacterProfileArchive->create(); if ($this->CharacterProfileArchive->save($archive, array('fieldList' => $this->CharacterProfileArchive->fields['add']))) { -// //Cache::clear(); return true; } else { return false; -- 2.11.0