From: Cake Date: Sat, 25 Dec 2010 05:55:48 +0000 (+0900) Subject: MyHome設定遷移の修正 X-Git-Tag: version-beta~14 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3b66d4cf8b142aa264174b122d6065e7437371d3;p=trpgtools-onweb%2Fcake-frame.git MyHome設定遷移の修正 --- diff --git a/app/controllers/users_controller.php b/app/controllers/users_controller.php index ab9e690..108fd1d 100644 --- a/app/controllers/users_controller.php +++ b/app/controllers/users_controller.php @@ -83,11 +83,10 @@ class UsersController extends AppController { } function index() { - $mycharacters = array(); + $characters = array(); if (empty($this->site_configs['Site.myHome']['value']) && $this->params['url']['url'] == '/') { -// $this->redirect(array('controller' => 'characters', 'action'=>'mycharacter')); - $mycharacters = $this->requestAction( - array('controller' => 'characters', 'action' => 'mycharacter'), + $characters = $this->requestAction( + array('controller' => 'characters', 'action' => 'index'), array('return') ); } else { @@ -102,12 +101,12 @@ class UsersController extends AppController { // 全体の情報 self::_view($this->user_id); + } - // お知らせ - $this->set('news', $this->get_news()); - } + $this->set('characters', $characters); - $this->set('mycharacters', $mycharacters); + // お知らせ + $this->set('news', $this->get_news()); } function view($id = null) { diff --git a/app/views/users/index.ctp b/app/views/users/index.ctp index 498bd60..ff55906 100644 --- a/app/views/users/index.ctp +++ b/app/views/users/index.ctp @@ -1,5 +1,15 @@ - - + + +element('information', array( + 'news' => $news, + 'cache' => time() + Configure::read('Cache.expireLong'), + )); +} +?> + +