OSDN Git Service

Revert "基本のビューキャッシュ導入"
authorCake <cake_67@users.sourceforge.jp>
Wed, 7 Jul 2010 10:52:21 +0000 (19:52 +0900)
committerCake <cake_67@users.sourceforge.jp>
Wed, 7 Jul 2010 10:52:21 +0000 (19:52 +0900)
This reverts commit 2031ec6d570b074fd4122cefaa09f4ae7419729d.

app/config/conf/config.php
app/config/core.php
app/config/init.php
app/controllers/app_controller.php
app/controllers/characters_controller.php
app/controllers/users_controller.php
app/views/elements/pc_mainnav.ctp [deleted file]
app/views/layouts/default.ctp

index 1fdfebf..2efeeef 100644 (file)
@@ -16,22 +16,6 @@ Configure::write('User.Password.Length',
        array('min' => 4, 'max' => 12)
 );
 
-/* 
- * キャッシュ
- */
-// キャッシュの最大有効期限(秒)
-Configure::write('Cache.expire', 7 * 24 * 3600);
-// キャッシュを作成しない(常に最新の情報を表示しますが、動作が遅くなる場合があります)
-Configure::write('Cache.disable', false);
-// キャッシュの詳細設定
-Cache::config('default', array(
-       'engine' => 'File', //保存方法
-       'duration'=> Configure::read('Cache.expire'),
-       'probability'=> 100, // 期限切れキャッシュの更新率
-       'path' => CACHE, // Fileの保存パス
-       'prefix' => 'cake_',
-       'serialize' => true,
-));
 
 /* 
  * 使用言語(Language)
index 95a523d..94e5e89 100644 (file)
@@ -38,7 +38,7 @@
  * In production mode, flash messages redirect after a time interval.
  * In development mode, you need to click the flash message to continue.
  */
-       Configure::write('debug', 0);
+       Configure::write('debug', 2);
 /**
  * Application wide charset encoding
  */
@@ -80,7 +80,7 @@
  * or in each action using $this->cacheAction = true.
  *
  */
-       Configure::write('Cache.check', true);
+       //Configure::write('Cache.check', true);
 /**
  * Defines the default error type when using the log() function. Used for
  * differentiating error logging and debugging. Currently PHP supports LOG_DEBUG.
index ca0c9f0..9c7b8b8 100644 (file)
@@ -40,6 +40,7 @@ Configure::write('Qdmailer', array(
 ));
 
 /* Benchmarkコンポーネント使用 */
+// guest UserIDでの操作制限
 define('BENCHMARK_MODE', true);
 
 /* デモモード */
index d4e33ec..270fbc7 100644 (file)
@@ -43,7 +43,6 @@ class AppController extends Controller
                'Javascript',
                'Text',
                'Time',
-               'Cache',
                'Settings',
                'Media.Medium',
                'Media.Upfile',
index a1976a4..a6d7021 100644 (file)
@@ -8,8 +8,6 @@ class CharactersController extends AppController {
                'Profiledisp',
        );
 
-       var $cacheAction = array();
-
        /* テーマ */
        var $view = 'View';
        var $theme = null;
@@ -28,13 +26,8 @@ class CharactersController extends AppController {
        /* メソッド */
 
        function beforeFilter() {
-               parent::beforeFilter();
 
-               // Cache
-               $this->cacheAction = array(
-                       'index' => Configure::read('Cache.expire'),
-                       'view/' => Configure::read('Cache.expire')
-               );
+               parent::beforeFilter();
 
                // 認証なしアクセス可
                $this->AuthPlus->allow('view');
index 5f93634..b52e552 100644 (file)
@@ -15,7 +15,6 @@ class UsersController extends ModuleController {
        /* ACL */
        // 追加アクション用 crudMap
        var $actionMapPlus = array(
-               'get_user' => 'read',
                'listview' => 'read',
                'change_password' => 'update',
                'edit_image' => 'update',
@@ -49,7 +48,6 @@ class UsersController extends ModuleController {
                parent::beforeFilter();
 
                // 認証なしアクセス可
-               $this->AuthPlus->allow('get_user');
                $this->AuthPlus->allow('index');
                $this->AuthPlus->allow('view');
                $this->AuthPlus->allow('add');
@@ -61,10 +59,6 @@ class UsersController extends ModuleController {
        }
 
        /* PC */
-       function get_user() {
-               return $this->user;
-       }
-
        function login() {
                // 現在のセッション削除
                $this->AuthPlus->deleteAuth();
diff --git a/app/views/elements/pc_mainnav.ctp b/app/views/elements/pc_mainnav.ctp
deleted file mode 100644 (file)
index 60b0652..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php if (CorePlus::is_valid($user, 'User.id')): ?>
-       <li><?php echo $html->link(__('Home', true), Configure::read('Routing.basePath')); ?>
-
-       <li><?php echo $html->link(__('Characters', true), array('controller' => 'characters', 'action' => 'index')); ?></li>
-
-<?php if (!$site_configs['System.singleSystem']['value']): ?>
-       <li><?php echo $html->link(__('Systems', true), array('controller' => 'systems', 'action' => 'index')); ?></li>
-<?php endif; ?>
-
-       <li><?php echo $html->link(__('Users', true), array('controller' => 'users', 'action' => 'listview')); ?></li>
-<?php endif; ?>
-
-<?php if (CorePlus::is_valid($user, 'User.id')): ?>
-       <li><?php echo $html->link(__('Configuration', true),  array('controller' => 'users', 'action' => 'edit', $user['User']['id'])); ?>
-<?php endif; ?>
-
-<li>
-<?php if (CorePlus::is_valid($user, 'User.id')): ?>
-<?php echo $html->link(__('Logout', true), array('controller' => 'users', 'action' => 'logout')); ?>
-<?php else: ?>
-<?php echo $html->link(__('Login', true), array('controller' => 'users', 'action' => 'login')); ?>
-<?php endif; ?>
-</li>
index c25d359..6f976de 100644 (file)
@@ -62,7 +62,11 @@ echo $site_configs['Design.customCss']['value'];
 <div id="container">
 
 <?php if (!isset($site_configs) || !isset($user)): ?>
+<?php $session->flash('auth'); ?>
+<?php $session->flash(); ?>
+<?php echo $content_for_layout; ?>
 <?php else: ?>
+
 <div id="header">
 <?php 
 echo $this->renderElement('pc_header_intro', array(
@@ -72,14 +76,30 @@ echo $this->renderElement('pc_header_intro', array(
 
 <div class="mainNavi">
 <ul id="nav" class="navi">
-<cake:nocache>
-<?php
-$user = $this->requestAction('/users/get_user');
-echo $this->element('pc_mainnav', array(
-       'user' => $user,
-));
-?> 
-</cake:nocache>
+<?php if (CorePlus::is_valid($user, 'User.id')): ?>
+       <li><?php echo $html->link(__('Home', true), Configure::read('Routing.basePath')); ?>
+
+       <li><?php echo $html->link(__('Characters', true), array('controller' => 'characters', 'action' => 'index')); ?></li>
+
+<?php if (!$site_configs['System.singleSystem']['value']): ?>
+       <li><?php echo $html->link(__('Systems', true), array('controller' => 'systems', 'action' => 'index')); ?></li>
+<?php endif; ?>
+
+       <li><?php echo $html->link(__('Users', true), array('controller' => 'users', 'action' => 'listview')); ?></li>
+<?php endif; ?>
+
+<?php if (CorePlus::is_valid($user, 'User.id')): ?>
+       <li><?php echo $html->link(__('Configuration', true),  array('controller' => 'users', 'action' => 'edit', $user['User']['id'])); ?>
+<?php endif; ?>
+
+<li>
+<?php if (CorePlus::is_valid($user, 'User.id')): ?>
+<?php echo $html->link(__('Logout', true), array('controller' => 'users', 'action' => 'logout')); ?>
+<?php else: ?>
+<?php echo $html->link(__('Login', true), array('controller' => 'users', 'action' => 'login')); ?>
+<?php endif; ?>
+</li>
+
 </ul>
 
 <ul id="navAdmin" class="navi">
@@ -131,12 +151,11 @@ switch ($this->params["controller"]) {
 ?>
 </div>
 
-<?php endif; ?>
-
 <?php $session->flash('auth'); ?>
 <?php $session->flash(); ?>
 <?php echo $content_for_layout; ?>
 </div>
+<?php endif; ?>
 
 <div id="footer">