Changeset 19777


Ignore:
Timestamp:
2010/12/28 18:33:47 (10 years ago)
Author:
Seasoft
Message:

#748(モバイル/スマートフォンのデザイン管理)

#877(default.php の問題)

Location:
branches/version-2_5-dev
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/helper/SC_Helper_PageLayout.php

    r19768 r19777  
    6464        $arrPageLayout = $arrPageData[0]; 
    6565 
    66         $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) . $arrPageLayout['filename'] . ".tpl"; 
     66        $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) . $arrPageLayout['tpl_dir'] . $arrPageLayout['filename'] . ".tpl"; 
    6767 
    6868        // ページタイトルを設定 
  • branches/version-2_5-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php

    r19774 r19777  
    242242 
    243243            // TPLファイル作成 
    244             $cre_tpl = $this->objLayout->getTemplatePath($device_type_id) . $arrData['filename'] . '.tpl'; 
     244            $cre_tpl = $this->objLayout->getTemplatePath($device_type_id) . $arrData['tpl_dir'] . $arrData['filename'] . '.tpl'; 
    245245            $this->lfCreateFile($cre_tpl, $_POST['tpl_data']); 
    246246 
     
    320320                $arrUpdData['php_dir'] .= '/'; 
    321321            } 
    322             $arrUpdData['tpl_dir']      = substr($this->objLayout->getTemplatePath($devie_type_id), strlen(URL_DIR)); 
    323             $arrUpdData['filename']     = dirname($arrUpdData['url']) . basename($arrUpdData['url']); // 拡張子を付加しない 
     322            $arrUpdData['tpl_dir']      = $arrUpdData['php_dir']; 
     323            $arrUpdData['filename']     = basename($arrData['url']); // 拡張子を付加しない 
    324324        } 
    325325 
     
    441441 
    442442        // require.phpの場所を書き換える 
    443         $php_data = str_replace("###require###", str_repeat('../', substr_count($url, '/')) . '../require.php', $php_data); 
     443        $defaultStrings = "exit; // Don't rewrite. This line is rewritten by EC-CUBE."; 
     444        $replaceStrings = "require_once '" . str_repeat('../', substr_count($url, '/')) . "../require.php';"; 
     445        $php_data = str_replace($defaultStrings, $replaceStrings, $php_data); 
    444446 
    445447        // phpファイルの作成 
  • branches/version-2_5-dev/data/mtb_constants_init.php

    r19769 r19777  
    2525define('TEMPLATE_TEMP_DIR', HTML_PATH . "upload/temp_template/"); 
    2626/** ユーザー作成画面のデフォルトPHPファイル */ 
    27 define('USER_DEF_PHP', HTML_PATH . "__default.php"); 
     27define('USER_DEF_PHP', USER_PATH . "__default.php"); 
    2828/** その他画面のデフォルトページレイアウト */ 
    2929define('DEF_LAYOUT', "products/list.php"); 
  • branches/version-2_5-dev/html/install/sql/insert_data.sql

    r19775 r19777  
    515515 
    516516INSERT 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); 
    517 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); 
    518 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); 
    519 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); 
     517INSERT 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); 
     518INSERT 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); 
     519INSERT 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); 
    520520INSERT 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); 
    521521INSERT 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); 
     
    10481048INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_TEMPLATE_PATH', 'USER_PATH . USER_PACKAGE_DIR', 18, 'テンプレートファイル保存先'); 
    10491049INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('TEMPLATE_TEMP_DIR', 'HTML_PATH . "upload/temp_template/"', 19, 'テンプレートファイル一時保存先'); 
    1050 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_DEF_PHP', 'HTML_PATH . "__default.php"', 20, 'ユーザー作成画面のデフォルトPHPファイル'); 
     1050INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('USER_DEF_PHP', 'USER_PATH . "__default.php"', 20, 'ユーザー作成画面のデフォルトPHPファイル'); 
    10511051INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEF_LAYOUT', '"products/list.php"', 21, 'その他画面のデフォルトページレイアウト'); 
    10521052INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('MODULE_DIR', '"downloads/module/"', 22, 'ダウンロードモジュール保存ディレクトリ'); 
  • branches/version-2_5-dev/html/user_data/__default.php

    r19776 r19777  
    11<?php 
    2 require_once '###require###'; 
     2exit; // Don't rewrite. This line is rewritten by EC-CUBE. 
    33require_once CLASS_PATH . 'pages/LC_Page.php'; 
    44 
     
    1919    function init() { 
    2020        parent::init(); 
    21         $this->tpl_column_num = 3; 
    2221    } 
    2322 
     
    2928    function process() { 
    3029        $objView = new SC_SiteView(); 
    31         $objLayout = new SC_Helper_PageLayout_Ex(); 
    32  
    33         // レイアウトデザインを取得 
    34         $objLayout->sfGetPageLayout($this); 
    3530 
    3631        // 画面の表示 
Note: See TracChangeset for help on using the changeset viewer.