Ignore:
Timestamp:
2008/09/10 20:50:26 (16 years ago)
Author:
Seasoft
Message:

/index.php にリンクやリダイレクトしている箇所の「index.php」を定数化。

  • 定数「DIR_INDEX_FILE」… DirectoryIndex? の実ファイル名。現状の EC-CUBE は、「index.php」。/html/define.php で定義するが、定義が無い場合 SC_Initial::defineDirectoryIndex() で「index.php」と定義。本来は、プログラム中で実ファイルとしての index.php を指すときとは、この定数を使うのが良い気がするが、今回はそこまでは書き換えていない。
  • 定数「USE_FILENAME_DIR_INDEX」… DIR_INDEX_FILE にアクセスするときにファイル名を使用するか。/html/define.php で定義。
  • 定数「DIR_INDEX_URL」… /index.php にリンクやリダイレクトしている箇所の「index.php」部分を示す。この定数は SC_Initial::defineDirectoryIndex() で自動生成する。

・$_SERVERPHP_SELF? や自身をあらわすファイル名を利用している箇所を文字列「?」に書き換え。これにより、/ が自己URLにリンクするときに /index.php となることを防ぐ。RFC3986 を参考にする。モバイル端末がこのRFCに準拠しているのか確信が無いので、モバイルではこの変更は見送った。
・従来 / にリンクしていた箇所に、定数「DIR_INDEX_URL」を付加。漏れがあると予測される。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/html/install/sql/insert_data.sql

    r17590 r17605  
    919919INSERT INTO mtb_constants VALUES ('NO_IMAGE_URL','URL_DIR . "misc/blank.gif"',157,'画像がない場合に表示'); 
    920920INSERT INTO mtb_constants VALUES ('NO_IMAGE_DIR','HTML_PATH . "misc/blank.gif"',158,'画像がない場合に表示'); 
    921 INSERT INTO mtb_constants VALUES ('URL_SYSTEM_TOP','URL_DIR . "admin/system/index.php"',159,'システム管理トップ'); 
     921INSERT INTO mtb_constants VALUES ('URL_SYSTEM_TOP','URL_DIR . "admin/system/" . DIR_INDEX_URL',159,'システム管理トップ'); 
    922922INSERT INTO mtb_constants VALUES ('URL_CLASS_REGIST','URL_DIR . "admin/products/class.php"',160,'規格登録'); 
    923923INSERT INTO mtb_constants VALUES ('URL_INPUT_ZIP','URL_DIR . "input_zip.php"',161,'郵便番号入力'); 
     
    926926INSERT INTO mtb_constants VALUES ('URL_CONTROL_TOP','URL_DIR . "admin/basis/control.php"',164,'サイト管理情報登録'); 
    927927INSERT INTO mtb_constants VALUES ('URL_HOME','URL_DIR . "admin/home.php"',165,'ホーム'); 
    928 INSERT INTO mtb_constants VALUES ('URL_LOGIN','URL_DIR . "admin/index.php"',166,'ログインページ'); 
    929 INSERT INTO mtb_constants VALUES ('URL_SEARCH_TOP','URL_DIR . "admin/products/index.php"',167,'商品検索ページ'); 
     928INSERT INTO mtb_constants VALUES ('URL_LOGIN','URL_DIR . "admin/" . DIR_INDEX_URL',166,'ログインページ'); 
     929INSERT INTO mtb_constants VALUES ('URL_SEARCH_TOP','URL_DIR . "admin/products/" . DIR_INDEX_URL',167,'商品検索ページ'); 
    930930INSERT INTO mtb_constants VALUES ('URL_ORDER_EDIT','URL_DIR . "admin/order/edit.php"',168,'注文編集ページ'); 
    931 INSERT INTO mtb_constants VALUES ('URL_SEARCH_ORDER','URL_DIR . "admin/order/index.php"',169,'注文編集ページ'); 
     931INSERT INTO mtb_constants VALUES ('URL_SEARCH_ORDER','URL_DIR . "admin/order/" . DIR_INDEX_URL',169,'注文編集ページ'); 
    932932INSERT INTO mtb_constants VALUES ('URL_ORDER_MAIL','URL_DIR . "admin/order/mail.php"',170,'注文編集ページ'); 
    933933INSERT INTO mtb_constants VALUES ('URL_LOGOUT','URL_DIR . "admin/logout.php"',171,'ログアウトページ'); 
     
    995995INSERT INTO mtb_constants VALUES ('SEPA_CATNAVI','" > "',235,'カテゴリ区切り文字'); 
    996996INSERT INTO mtb_constants VALUES ('SEPA_CATLIST','" | "',236,'カテゴリ区切り文字'); 
    997 INSERT INTO mtb_constants VALUES ('URL_SHOP_TOP','SSL_URL . "shopping/index.php"',237,'会員情報入力'); 
    998 INSERT INTO mtb_constants VALUES ('URL_ENTRY_TOP','SSL_URL . "entry/index.php"',238,'会員登録ページTOP'); 
    999 INSERT INTO mtb_constants VALUES ('URL_SITE_TOP','URL_DIR . "index.php"',239,'サイトトップ'); 
    1000 INSERT INTO mtb_constants VALUES ('URL_CART_TOP','URL_DIR . "cart/index.php"',240,'カートトップ'); 
     997INSERT INTO mtb_constants VALUES ('URL_SHOP_TOP','SSL_URL . "shopping/" . DIR_INDEX_URL',237,'会員情報入力'); 
     998INSERT INTO mtb_constants VALUES ('URL_ENTRY_TOP','SSL_URL . "entry/" . DIR_INDEX_URL',238,'会員登録ページTOP'); 
     999INSERT INTO mtb_constants VALUES ('URL_SITE_TOP','URL_DIR . DIR_INDEX_URL',239,'サイトトップ'); 
     1000INSERT INTO mtb_constants VALUES ('URL_CART_TOP','URL_DIR . "cart/" . DIR_INDEX_URL',240,'カートトップ'); 
    10011001INSERT INTO mtb_constants VALUES ('URL_DELIV_TOP','URL_DIR . "shopping/deliv.php"',241,'配送時間設定'); 
    10021002INSERT INTO mtb_constants VALUES ('URL_MYPAGE_TOP','SSL_URL . "mypage/login.php"',242,'Myページトップ'); 
     
    10401040INSERT INTO mtb_constants VALUES ('TRACKBACK_STATUS_SPAM','3',280,'トラックバック スパム'); 
    10411041INSERT INTO mtb_constants VALUES ('TRACKBACK_VIEW_MAX','10',281,'フロント最大表示数'); 
    1042 INSERT INTO mtb_constants VALUES ('TRACKBACK_TO_URL','SITE_URL . "tb/index.php?pid="',282,'トラックバック先URL'); 
     1042INSERT INTO mtb_constants VALUES ('TRACKBACK_TO_URL','SITE_URL . "tb/" . DIR_INDEX_URL . "?pid="',282,'トラックバック先URL'); 
    10431043INSERT INTO mtb_constants VALUES ('SITE_CONTROL_TRACKBACK','1',283,'サイト管理 トラックバック'); 
    10441044INSERT INTO mtb_constants VALUES ('SITE_CONTROL_AFFILIATE','2',284,'サイト管理 アフィリエイト'); 
     
    10821082INSERT INTO mtb_constants VALUES ('MOBILE_IMAGE_DIR', 'HTML_PATH . "upload/mobile_image"', 408,'携帯電話向け変換画像保存ディレクトリ'); 
    10831083INSERT INTO mtb_constants VALUES ('MOBILE_IMAGE_URL', 'URL_DIR . "upload/mobile_image"', 409,'携帯電話向け変換画像保存ディレクトリ'); 
    1084 INSERT INTO mtb_constants VALUES ('MOBILE_URL_SITE_TOP', 'MOBILE_URL_DIR . "index.php"', 410,'モバイルURL'); 
    1085 INSERT INTO mtb_constants VALUES ('MOBILE_URL_CART_TOP', 'MOBILE_URL_DIR . "cart/index.php"', 411,'カートトップ'); 
    1086 INSERT INTO mtb_constants VALUES ('MOBILE_URL_SHOP_TOP', 'MOBILE_SSL_URL . "shopping/index.php"', 412,'会員情報入力'); 
     1084INSERT INTO mtb_constants VALUES ('MOBILE_URL_SITE_TOP', 'MOBILE_URL_DIR . DIR_INDEX_URL', 410,'モバイルURL'); 
     1085INSERT INTO mtb_constants VALUES ('MOBILE_URL_CART_TOP', 'MOBILE_URL_DIR . "cart/" . DIR_INDEX_URL', 411,'カートトップ'); 
     1086INSERT INTO mtb_constants VALUES ('MOBILE_URL_SHOP_TOP', 'MOBILE_SSL_URL . "shopping/" . DIR_INDEX_URL', 412,'会員情報入力'); 
    10871087INSERT INTO mtb_constants VALUES ('MOBILE_URL_SHOP_CONFIRM', 'MOBILE_URL_DIR . "shopping/confirm.php"', 413,'購入確認ページ'); 
    10881088INSERT INTO mtb_constants VALUES ('MOBILE_URL_SHOP_PAYMENT', 'MOBILE_URL_DIR . "shopping/payment.php"', 414,'お支払い方法選択ページ'); 
Note: See TracChangeset for help on using the changeset viewer.