[Svn-src-all:1246] [version-2_5-dev 20135] #985 リファクタリング
yomoro
admin @ mail.ec-cube.net
2011年 2月 11日 (金) 15:16:08 JST
Subversion committed to /home/svn/open 20135
http://svn.ec-cube.net/open_trac/changeset/20135
┌────────────────────────────┐
│更新者 : yomoro │
│更新日時: 2011-02-11 15:16:08 +0900 (金, 11 2月 2011)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#985 リファクタリング
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_DispError.php
U branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_SystemError.php
変更: branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_DispError.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_DispError.php 2011-02-11 02:55:39 UTC (rev 20134)
+++ branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_DispError.php 2011-02-11 06:16:08 UTC (rev 20135)
@@ -44,7 +44,8 @@
*/
function init() {
parent::init();
- $this->tpl_mainpage = 'login_error.tpl';
+ $this->tpl_mainpage = 'error.tpl';
+ $this->tpl_title = 'ログインエラー';
}
/**
@@ -53,8 +54,16 @@
* @return void
*/
function process() {
- $objView = new SC_AdminView();
-
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のプロセス。
+ *
+ * @return void
+ */
+ function action(){
switch ($this->type) {
case LOGIN_ERROR:
$this->tpl_error="IDまたはパスワードが正しくありません。<br />もう一度ご確認のうえ、再度入力してください。";
@@ -72,9 +81,6 @@
$this->tpl_error="エラーが発生しました。<br />もう一度ご確認のうえ、再度ログインしてください。";
break;
}
-
- $objView->assignobj($this);
- $objView->display(LOGIN_FRAME);
}
/**
変更: branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_SystemError.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_SystemError.php 2011-02-11 02:55:39 UTC (rev 20134)
+++ branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_SystemError.php 2011-02-11 06:16:08 UTC (rev 20135)
@@ -52,17 +52,9 @@
* @return void
*/
function init() {
- parent::init();
-
- $this->tpl_title = 'システムエラー';
- $this->adminPage = SC_Utils_Ex::sfIsAdminFunction();
-
- if ($this->adminPage) {
- $this->tpl_mainpage = 'login_error.tpl';
- $this->frame = LOGIN_FRAME;
- } else {
- $this->frame = SITE_FRAME;
- }
+ parent::init();
+ $this->tpl_mainpage = 'error.tpl';
+ $this->tpl_title = 'システムエラー';
}
/**
@@ -71,10 +63,27 @@
* @return void
*/
function process() {
- require_once CLASS_REALDIR . 'SC_MobileUserAgent.php';
+ $this->action();
+ $this->sendResponse();
+ }
+ /**
+ * Page のプロセス。
+ *
+ * @return void
+ */
+ function action(){
+ $this->adminPage = SC_Utils_Ex::sfIsAdminFunction();
+
+ if ($this->adminPage) {
+ $this->tpl_mainpage = 'login_error.tpl';
+ $this->frame = LOGIN_FRAME;
+ } else {
+ $this->frame = SITE_FRAME;
+ }
+
$objView = null;
- if (SC_MobileUserAgent::isMobile() && $this->adminPage == false) {
+ if (SC_Display::detectDevice() == DEVICE_TYPE_MOBILE && $this->adminPage == false) {
$objView = new SC_InstallView(MOBILE_TEMPLATE_REALDIR, MOBILE_COMPILE_REALDIR);
} elseif($this->adminPage) {
$objView = new SC_AdminView();
Svn-src-all メーリングリストの案内