[Svn-src-all:1412] [version-2_5-dev 20303] SC_View.phpをクラス毎にファイル分割。
shutta
admin @ mail.ec-cube.net
2011年 2月 21日 (月) 18:58:46 JST
Subversion committed to /home/svn/open 20303
http://svn.ec-cube.net/open_trac/changeset/20303
┌────────────────────────────┐
│更新者 : shutta │
│更新日時: 2011-02-21 18:58:45 +0900 (月, 21 2月 2011)│
└────────────────────────────┘
Log:
--------------------------------------------------------
SC_View.phpをクラス毎にファイル分割。
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
A branches/version-2_5-dev/data/class/SC_AdminView.php
A branches/version-2_5-dev/data/class/SC_InstallView.php
A branches/version-2_5-dev/data/class/SC_MobileView.php
A branches/version-2_5-dev/data/class/SC_SiteView.php
A branches/version-2_5-dev/data/class/SC_SmartphoneView.php
A branches/version-2_5-dev/data/class/SC_UserView.php
U branches/version-2_5-dev/data/class/SC_View.php
U branches/version-2_5-dev/data/require_classes.php
追加: branches/version-2_5-dev/data/class/SC_AdminView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_AdminView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_AdminView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,35 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_AdminView extends SC_View {
+ function SC_AdminView() {
+ parent::SC_View(false);
+ $this->_smarty->template_dir = TEMPLATE_ADMIN_REALDIR;
+ $this->_smarty->compile_dir = COMPILE_ADMIN_REALDIR;
+ $this->assign('TPL_URLPATH_DEFAULT', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . DEFAULT_TEMPLATE_NAME . '/');
+ $this->assign('TPL_URLPATH', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . "admin/");
+ $this->initpath();
+ }
+}
+
+?>
追加: branches/version-2_5-dev/data/class/SC_InstallView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_InstallView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_InstallView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,32 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_InstallView extends SC_View {
+ function SC_InstallView($template_dir, $compile_dir = COMPILE_REALDIR) {
+ parent::SC_View(false);
+ $this->_smarty->template_dir = $template_dir;
+ $this->_smarty->compile_dir = $compile_dir;
+ }
+}
+
+?>
追加: branches/version-2_5-dev/data/class/SC_MobileView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_MobileView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_MobileView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,33 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_MobileView extends SC_SiteView {
+ function SC_MobileView($setPrevURL = true) {
+ parent::SC_SiteView($setPrevURL);
+ $this->_smarty->template_dir = MOBILE_TEMPLATE_REALDIR;
+ $this->_smarty->compile_dir = MOBILE_COMPILE_REALDIR;
+ $this->assignTemplatePath(DEVICE_TYPE_MOBILE);
+ }
+}
+
+?>
追加: branches/version-2_5-dev/data/class/SC_SiteView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_SiteView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_SiteView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,41 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_SiteView extends SC_View {
+ function SC_SiteView($setPrevURL = true) {
+ parent::SC_View();
+
+ $this->_smarty->template_dir = TEMPLATE_REALDIR;
+ $this->_smarty->compile_dir = COMPILE_REALDIR;
+
+ $this->assignTemplatePath(DEVICE_TYPE_PC);
+ $this->initpath();
+
+ if ($setPrevURL) {
+ $objCartSess = new SC_CartSession();
+ $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
+ }
+ }
+}
+
+?>
追加: branches/version-2_5-dev/data/class/SC_SmartphoneView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_SmartphoneView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_SmartphoneView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,33 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_SmartphoneView extends SC_SiteView {
+ function SC_SmartphoneView($setPrevURL = true) {
+ parent::SC_SiteView($setPrevURL);
+ $this->_smarty->template_dir = SMARTPHONE_TEMPLATE_REALDIR;
+ $this->_smarty->compile_dir = SMARTPHONE_COMPILE_REALDIR;
+ $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE);
+ }
+}
+
+?>
追加: branches/version-2_5-dev/data/class/SC_UserView.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_UserView.php (rev 0)
+++ branches/version-2_5-dev/data/class/SC_UserView.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -0,0 +1,32 @@
+<?php
+/*
+ * This file is part of EC-CUBE
+ *
+ * Copyright(c) 2000-2010 LOCKON CO.,LTD. All Rights Reserved.
+ *
+ * http://www.lockon.co.jp/
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+class SC_UserView extends SC_SiteView {
+ function SC_UserView($template_dir, $compile_dir = COMPILE_REALDIR) {
+ parent::SC_SiteView();
+ $this->_smarty->template_dir = $template_dir;
+ $this->_smarty->compile_dir = $compile_dir;
+ }
+}
+
+?>
変更: branches/version-2_5-dev/data/class/SC_View.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_View.php 2011-02-21 09:50:54 UTC (rev 20302)
+++ branches/version-2_5-dev/data/class/SC_View.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -194,65 +194,4 @@
}
}
-class SC_AdminView extends SC_View{
- function SC_AdminView() {
- parent::SC_View(false);
- $this->_smarty->template_dir = TEMPLATE_ADMIN_REALDIR;
- $this->_smarty->compile_dir = COMPILE_ADMIN_REALDIR;
- $this->assign('TPL_URLPATH_DEFAULT', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . DEFAULT_TEMPLATE_NAME . '/');
- $this->assign('TPL_URLPATH', ROOT_URLPATH . USER_DIR . USER_PACKAGE_DIR . "admin/");
- $this->initpath();
- }
-}
-
-class SC_SiteView extends SC_View{
- function SC_SiteView($setPrevURL = true) {
- parent::SC_View();
-
- $this->_smarty->template_dir = TEMPLATE_REALDIR;
- $this->_smarty->compile_dir = COMPILE_REALDIR;
-
- $this->assignTemplatePath(DEVICE_TYPE_PC);
- $this->initpath();
-
- if ($setPrevURL) {
- $objCartSess = new SC_CartSession();
- $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
- }
- }
-}
-
-class SC_UserView extends SC_SiteView{
- function SC_UserView($template_dir, $compile_dir = COMPILE_REALDIR) {
- parent::SC_SiteView();
- $this->_smarty->template_dir = $template_dir;
- $this->_smarty->compile_dir = $compile_dir;
- }
-}
-
-class SC_InstallView extends SC_View{
- function SC_InstallView($template_dir, $compile_dir = COMPILE_REALDIR) {
- parent::SC_View(false);
- $this->_smarty->template_dir = $template_dir;
- $this->_smarty->compile_dir = $compile_dir;
- }
-}
-
-class SC_MobileView extends SC_SiteView {
- function SC_MobileView($setPrevURL = true) {
- parent::SC_SiteView($setPrevURL);
- $this->_smarty->template_dir = MOBILE_TEMPLATE_REALDIR;
- $this->_smarty->compile_dir = MOBILE_COMPILE_REALDIR;
- $this->assignTemplatePath(DEVICE_TYPE_MOBILE);
- }
-}
-
-class SC_SmartphoneView extends SC_SiteView {
- function SC_SmartphoneView($setPrevURL = true) {
- parent::SC_SiteView($setPrevURL);
- $this->_smarty->template_dir = SMARTPHONE_TEMPLATE_REALDIR;
- $this->_smarty->compile_dir = SMARTPHONE_COMPILE_REALDIR;
- $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE);
- }
-}
?>
変更: branches/version-2_5-dev/data/require_classes.php
===================================================================
--- branches/version-2_5-dev/data/require_classes.php 2011-02-21 09:50:54 UTC (rev 20302)
+++ branches/version-2_5-dev/data/require_classes.php 2011-02-21 09:58:45 UTC (rev 20303)
@@ -27,6 +27,12 @@
require_once(CLASS_EX_REALDIR . "db_extends/SC_DB_MasterData_Ex.php");
require_once(CLASS_EX_REALDIR . "db_extends/SC_DB_DBFactory_Ex.php");
require_once(CLASS_REALDIR . "SC_View.php");
+require_once(CLASS_REALDIR . "SC_AdminView.php");
+require_once(CLASS_REALDIR . "SC_SiteView.php");
+require_once(CLASS_REALDIR . "SC_UserView.php");
+require_once(CLASS_REALDIR . "SC_InstallView.php");
+require_once(CLASS_REALDIR . "SC_MobileView.php");
+require_once(CLASS_REALDIR . "SC_SmartphoneView.php");
require_once(CLASS_REALDIR . "SC_Session.php");
require_once(CLASS_REALDIR . "SC_Query.php");
require_once(CLASS_REALDIR . "SC_SelectSql.php");
Svn-src-all メーリングリストの案内