source: branches/version-2_13-dev/data/class/pages/error/LC_Page_Error_DispError.php @ 23427

Revision 23427, 3.7 KB checked in by Seasoft, 10 years ago (diff)

#2551 (プラグインの処理によりインストール中の PHP エラー画面の表示が阻害される part 2)

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2013 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24require_once CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
25
26/**
27 * エラー表示のページクラス
28 *
29 * @package Page
30 * @author LOCKON CO.,LTD.
31 * @version $Id$
32 */
33class LC_Page_Error_DispError extends LC_Page_Admin_Ex
34{
35    /**
36     * Page を初期化する.
37     * LC_Page_Adminクラス内でエラーページを表示しようとした際に無限ループに陥るのを防ぐため,
38     * ここでは, parent::init() を行わない.(フロントのエラー画面出力と同様の仕様)
39     *
40     * @return void
41     */
42    public function init()
43    {
44        SC_Helper_HandleError_Ex::$under_error_handling = true;
45
46        $this->template = LOGIN_FRAME;
47        $this->tpl_mainpage = 'login_error.tpl';
48        $this->tpl_title = 'ログインエラー';
49        // ディスプレイクラス生成
50        $this->objDisplay = new SC_Display_Ex();
51
52        // transformでフックしているばあいに, 再度エラーが発生するため, コールバックを無効化.
53        $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
54        $objHelperPlugin->arrRegistedPluginActions = array();
55
56        // キャッシュから店舗情報取得(DBへの接続は行わない)
57        $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
58    }
59
60    /**
61     * Page のプロセス。
62     *
63     * @return void
64     */
65    public function process()
66    {
67        $this->action();
68        $this->sendResponse();
69    }
70
71    /**
72     * Page のプロセス。
73     *
74     * @return void
75     */
76    public function action()
77    {
78        SC_Response_Ex::sendHttpStatus(500);
79
80        switch ($this->type) {
81            case LOGIN_ERROR:
82                $this->tpl_error='IDまたはパスワードが正しくありません。<br />もう一度ご確認のうえ、再度入力してください。';
83                break;
84            case ACCESS_ERROR:
85                $this->tpl_error='ログイン認証の有効期限切れの可能性があります。<br />もう一度ご確認のうえ、再度ログインしてください。';
86                break;
87            case AUTH_ERROR:
88                $this->tpl_error='このページにはアクセスできません';
89                SC_Response_Ex::sendHttpStatus(403);
90                break;
91            case INVALID_MOVE_ERRORR:
92                $this->tpl_error='不正なページ移動です。<br />もう一度ご確認のうえ、再度入力してください。';
93                break;
94            default:
95                $this->tpl_error='エラーが発生しました。<br />もう一度ご確認のうえ、再度ログインしてください。';
96                break;
97        }
98
99    }
100
101    /**
102     * エラーページではトランザクショントークンの自動検証は行わない
103     */
104    public function doValidToken()
105    {
106        // queit.
107    }
108}
Note: See TracBrowser for help on using the repository browser.