[Svn-src-all:889] [version-2_5-dev 19777] #748(モバイル/スマートフォンのデザイン管理)

Seasoft admin @ mail.ec-cube.net
2010年 12月 28日 (火) 18:33:48 JST


Subversion committed to /home/svn/open 19777
http://svn.ec-cube.net/open_trac/changeset/19777
┌────────────────────────────┐
│更新者 :  Seasoft                                      │
│更新日時:  2010-12-28 18:33:47 +0900 (火, 28 12月 2010)│
└────────────────────────────┘

Log:
--------------------------------------------------------
#748(モバイル/スマートフォンのデザイン管理)
  * r19774 続き
#877(__default.php の問題)

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php
U   branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
U   branches/version-2_5-dev/data/mtb_constants_init.php
D   branches/version-2_5-dev/html/__default.php
U   branches/version-2_5-dev/html/install/sql/insert_data.sql
A   branches/version-2_5-dev/html/user_data/__default.php

変更: branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php
===================================================================
--- branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php	2010-12-28 06:53:49 UTC (rev 19776)
+++ branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php	2010-12-28 09:33:47 UTC (rev 19777)
@@ -63,7 +63,7 @@
 
         $arrPageLayout = $arrPageData[0];
 
-        $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) . $arrPageLayout['filename'] . ".tpl";
+        $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) . $arrPageLayout['tpl_dir'] . $arrPageLayout['filename'] . ".tpl";
 
         // ページタイトルを設定
         if (!isset($objPage->tpl_title)) {

変更: branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php	2010-12-28 06:53:49 UTC (rev 19776)
+++ branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php	2010-12-28 09:33:47 UTC (rev 19777)
@@ -241,7 +241,7 @@
             }
 
             // TPLファイル作成
-            $cre_tpl = $this->objLayout->getTemplatePath($device_type_id) . $arrData['filename'] . '.tpl';
+            $cre_tpl = $this->objLayout->getTemplatePath($device_type_id) . $arrData['tpl_dir'] . $arrData['filename'] . '.tpl';
             $this->lfCreateFile($cre_tpl, $_POST['tpl_data']);
 
             $this->objDisplay->redirect($this->getLocation("./main_edit.php",
@@ -319,8 +319,8 @@
             } else {
                 $arrUpdData['php_dir'] .= '/';
             }
-            $arrUpdData['tpl_dir']      = substr($this->objLayout->getTemplatePath($devie_type_id), strlen(URL_DIR));
-            $arrUpdData['filename']     = dirname($arrUpdData['url']) . basename($arrUpdData['url']); // 拡張子を付加しない
+            $arrUpdData['tpl_dir']      = $arrUpdData['php_dir'];
+            $arrUpdData['filename']     = basename($arrData['url']); // 拡張子を付加しない
         }
 
         return $arrUpdData;
@@ -440,7 +440,9 @@
         }
 
         // require.phpの場所を書き換える
-        $php_data = str_replace("###require###", str_repeat('../', substr_count($url, '/')) . '../require.php', $php_data);
+        $defaultStrings = "exit; // Don't rewrite. This line is rewritten by EC-CUBE.";
+        $replaceStrings = "require_once '" . str_repeat('../', substr_count($url, '/')) . "../require.php';";
+        $php_data = str_replace($defaultStrings, $replaceStrings, $php_data);
 
         // phpファイルの作成
         $fp = fopen($path,"w");

変更: branches/version-2_5-dev/data/mtb_constants_init.php
===================================================================
--- branches/version-2_5-dev/data/mtb_constants_init.php	2010-12-28 06:53:49 UTC (rev 19776)
+++ branches/version-2_5-dev/data/mtb_constants_init.php	2010-12-28 09:33:47 UTC (rev 19777)
@@ -24,7 +24,7 @@
 /** テンプレートファイル一時保存先 */
 define('TEMPLATE_TEMP_DIR', HTML_PATH . "upload/temp_template/");
 /** ユーザー作成画面のデフォルトPHPファイル */
-define('USER_DEF_PHP', HTML_PATH . "__default.php");
+define('USER_DEF_PHP', USER_PATH . "__default.php");
 /** その他画面のデフォルトページレイアウト */
 define('DEF_LAYOUT', "products/list.php");
 /** ダウンロードモジュール保存ディレクトリ */

削除: branches/version-2_5-dev/html/__default.php
===================================================================
--- branches/version-2_5-dev/html/__default.php	2010-12-28 06:53:49 UTC (rev 19776)
+++ branches/version-2_5-dev/html/__default.php	2010-12-28 09:33:47 UTC (rev 19777)
@@ -1,55 +0,0 @@
-<?php
-require_once '###require###';
-require_once CLASS_PATH . 'pages/LC_Page.php';
-
-/**
- * ユーザーカスタマイズ用のページクラス
- *
- * 管理画面から自動生成される
- *
- * @package Page
- */
-class LC_Page_User extends LC_Page {
-
-    /**
-     * Page を初期化する.
-     *
-     * @return void
-     */
-    function init() {
-        parent::init();
-        $this->tpl_column_num = 3;
-    }
-
-    /**
-     * Page のプロセス.
-     *
-     * @return void
-     */
-    function process() {
-        $objView = new SC_SiteView();
-        $objLayout = new SC_Helper_PageLayout_Ex();
-
-        // レイアウトデザインを取得
-        $objLayout->sfGetPageLayout($this);
-
-        // 画面の表示
-        $objView->assignobj($this);
-        $objView->display(SITE_FRAME);
-    }
-
-    /**
-     * デストラクタ.
-     *
-     * @return void
-     */
-    function destroy() {
-        parent::destroy();
-    }
-}
-
-
-$objPage = new LC_Page_User();
-register_shutdown_function(array($objPage, 'destroy'));
-$objPage->init();
-$objPage->process();

変更: branches/version-2_5-dev/html/install/sql/insert_data.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/insert_data.sql	2010-12-28 06:53:49 UTC (rev 19776)
+++ branches/version-2_5-dev/html/install/sql/insert_data.sql	2010-12-28 09:33:47 UTC (rev 19777)
@@ -514,9 +514,9 @@
 INSERT INTO dtb_news (news_id, news_date, rank, news_title, news_comment, news_url, news_select, link_method, creator_id, create_date, update_date, del_flg) VALUES (1, '2010-08-19 00:00:00', 1, 'サイトオープンいたしました!', '一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!一人暮らしからオフィスなどさまざまなシーンで あなたの生活をサポートするグッズをご家庭へお届けします!', NULL, 0, NULL, 1, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 0);
 
 INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 0, 'プレビューデータ', 'preview', NULL, NULL, NULL, 1, 1, 1, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 1, 'TOPページ', 'index.php', ' ', 'user_data/templates/', 'index', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 2, '商品一覧ページ', 'products/list.php', ' ', 'user_data/templates/', 'products/list', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
-INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 3, '商品詳細ページ', 'products/detail.php', ' ', 'user_data/templates/', 'products/detail', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
+INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 1, 'TOPページ', 'index.php', ' ', NULL, 'index', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
+INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 2, '商品一覧ページ', 'products/list.php', ' ', NULL, 'products/list', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
+INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 3, '商品詳細ページ', 'products/detail.php', ' ', NULL, 'products/detail', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
 INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 4, 'MYページ', 'mypage/index.php', ' ', NULL, 'mypage/index', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
 INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 5, 'MYページ/会員登録内容変更(入力ページ)', 'mypage/change.php', NULL, NULL, 'mypage/change', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
 INSERT INTO dtb_pagelayout (device_type_id, page_id, page_name, url, php_dir, tpl_dir, filename, header_chk, footer_chk, edit_flg, author, description, keyword, update_url, create_date, update_date) VALUES (10, 6, 'MYページ/会員登録内容変更(完了ページ)', 'mypage/change_complete.php', NULL, NULL, 'mypage/change_complete', 1, 1, 2, NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
@@ -1047,7 +1047,7 @@
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_PACKAGE_DIR', '"packages/"', 17, 'テンプレートファイル保存先');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_TEMPLATE_PATH', 'USER_PATH . USER_PACKAGE_DIR', 18, 'テンプレートファイル保存先');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('TEMPLATE_TEMP_DIR', 'HTML_PATH . "upload/temp_template/"', 19, 'テンプレートファイル一時保存先');
-INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_DEF_PHP', 'HTML_PATH . "__default.php"', 20, 'ユーザー作成画面のデフォルトPHPファイル');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_DEF_PHP', 'USER_PATH . "__default.php"', 20, 'ユーザー作成画面のデフォルトPHPファイル');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEF_LAYOUT', '"products/list.php"', 21, 'その他画面のデフォルトページレイアウト');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MODULE_DIR', '"downloads/module/"', 22, 'ダウンロードモジュール保存ディレクトリ');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MODULE_PATH', 'DATA_PATH . MODULE_DIR', 23, 'ダウンロードモジュール保存ディレクトリ');

コピーによる追加: branches/version-2_5-dev/html/user_data/__default.php (コピー元: リビジョン 19776, branches/version-2_5-dev/html/__default.php)
===================================================================
--- branches/version-2_5-dev/html/user_data/__default.php	                        (rev 0)
+++ branches/version-2_5-dev/html/user_data/__default.php	2010-12-28 09:33:47 UTC (rev 19777)
@@ -0,0 +1,50 @@
+<?php
+exit; // Don't rewrite. This line is rewritten by EC-CUBE.
+require_once CLASS_PATH . 'pages/LC_Page.php';
+
+/**
+ * ユーザーカスタマイズ用のページクラス
+ *
+ * 管理画面から自動生成される
+ *
+ * @package Page
+ */
+class LC_Page_User extends LC_Page {
+
+    /**
+     * Page を初期化する.
+     *
+     * @return void
+     */
+    function init() {
+        parent::init();
+    }
+
+    /**
+     * Page のプロセス.
+     *
+     * @return void
+     */
+    function process() {
+        $objView = new SC_SiteView();
+
+        // 画面の表示
+        $objView->assignobj($this);
+        $objView->display(SITE_FRAME);
+    }
+
+    /**
+     * デストラクタ.
+     *
+     * @return void
+     */
+    function destroy() {
+        parent::destroy();
+    }
+}
+
+
+$objPage = new LC_Page_User();
+register_shutdown_function(array($objPage, 'destroy'));
+$objPage->init();
+$objPage->process();




Svn-src-all メーリングリストの案内