チェンジセット 17605

差分発生行の前後
無視リスト:
コミット日時:
2008/09/10 20:50:26 (4 ヶ月前)
コミッタ:
Seasoft
ログメッセージ:

・****/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」を付加。漏れがあると予測される。

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/control.tpl

    r17351 r17605  
    3333      <td><strong><!--{$arrControlList[cnt].control_title|escape}--></strong><br /><!--{$arrControlList[cnt].control_text|escape}--></td> 
    3434      <td align="center"> 
    35         <form name="form<!--{$smarty.section.cnt.index}-->" id="form<!--{$smarty.section.cnt.index}-->" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     35        <form name="form<!--{$smarty.section.cnt.index}-->" id="form<!--{$smarty.section.cnt.index}-->" method="post" action="?"> 
    3636        <input type="hidden" name="mode" value="edit" /> 
    3737        <input type="hidden" name="control_id" value="<!--{$arrControlList[cnt].control_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/delivery.tpl

    r17365 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="edit" /> 
    2626<input type="hidden" name="deliv_id" value="" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/holiday.tpl

    • 属性の設定値: svn:mime-type (登録) text/html; charset=UTF-8
    • 属性の設定値: svn:eol-style (登録) LF
    r17351 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="./holiday.php"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="edit" /> 
    2626<input type="hidden" name="holiday_id" value="<!--{$tpl_holiday_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/index.tpl

    r17351 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="./index.php"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="<!--{$tpl_mode}-->" /> 
    2626<!--{* ▼登録テーブルここから *}--> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/kiyaku.tpl

    r17604 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="./kiyaku.php"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="edit" /> 
    2626<input type="hidden" name="kiyaku_id" value="<!--{$tpl_kiyaku_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/mail.tpl

    r17351 r17605  
    4545 
    4646 
    47 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     47<form name="form1" id="form1" method="post" action="?"> 
    4848<input type="hidden" name="mode" value="regist" /> 
    4949<div id="basis" class="contents-main"> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/payment.tpl

    r17485 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="edit" /> 
    2626<input type="hidden" name="payment_id" value="<!--{$tpl_payment_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/seo.tpl

    r17380 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.post.PHP_SELF|escape}-->" onSubmit="return window.confirm('登録しても宜しいですか');"> 
     24<form name="form1" id="form1" method="post" action="?" onSubmit="return window.confirm('登録しても宜しいですか');"> 
    2525<input type="hidden" name="mode" value="confirm"> 
    2626<input type="hidden" name="page_id" value="" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/basis/subnavi.tpl

    r17571 r17605  
    2323*}--> 
    2424<ul class="level1"> 
    25 <li<!--{if $tpl_subno == 'index'}--> class="on"<!--{/if}--> id="navi-basis-index"><a href="<!--{$smarty.const.URL_DIR}-->admin/basis/index.php"><span>SHOPマスタ</span></a></li> 
     25<li<!--{if $tpl_subno == 'index'}--> class="on"<!--{/if}--> id="navi-basis-index"><a href="<!--{$smarty.const.URL_DIR}-->admin/basis/<!--{$smarty.const.DIR_INDEX_URL}-->"><span>SHOPマスタ</span></a></li> 
    2626<li<!--{if $tpl_subno == 'tradelaw'}--> class="on"<!--{/if}--> id="navi-basis-tradelaw"><a href="<!--{$smarty.const.URL_DIR}-->admin/basis/tradelaw.php"><span>特定商取引法</span></a></li> 
    2727<li<!--{if $tpl_subno == 'delivery'}--> class="on"<!--{/if}--> id="navi-basis-delivery"><a href="<!--{$smarty.const.URL_DIR}-->admin/basis/delivery.php"><span>配送設定</span></a></li> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/campaign.tpl

    r17538 r17605  
    3636 
    3737<div id="admin-contents" class="contents-main"> 
    38 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     38<form name="form1" id="form1" method="post" action="?"> 
    3939<input type="hidden" name="mode" value="" /> 
    4040<input type="hidden" name="campaign_id" value="<!--{$campaign_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/campaign_create_tag.tpl

    r17425 r17605  
    2424<!--{include file="`$smarty.const.TEMPLATE_ADMIN_DIR`admin_popup_header.tpl"}--> 
    2525 
    26 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->"> 
     26<form name="form1" id="form1" method="post" action="?"> 
    2727<input name="mode" type="hidden" value="search" /> 
    2828<input name="anchor_key" type="hidden" value="" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/campaign_design.tpl

    r17351 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" > 
     24<form name="form1" id="form1" method="post" action="?" > 
    2525<input type="hidden" name="mode" value="" /> 
    2626<input type="hidden" name="campaign_id" value="<!--{$arrForm.campaign_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/csv.tpl

    r17365 r17605  
    169169 
    170170 
    171 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->" onsubmit="lfnCheckList('output_list[]')"> 
     171<form name="form1" id="form1" method="post" action="?" onsubmit="lfnCheckList('output_list[]')"> 
    172172<input type="hidden" name="mode" value="confirm" /> 
    173173<input type="hidden" name="tpl_subno_csv" value="<!--{$tpl_subno_csv}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/csv_sql.tpl

    r17351 r17605  
    4949 
    5050 
    51 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     51<form name="form1" id="form1" method="post" action="?"> 
    5252<input type="hidden" name="mode" value="confirm" /> 
    5353<input type="hidden" name="sql_id" value="<!--{$sql_id}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/file_manager.tpl

    r17406 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"  enctype="multipart/form-data"> 
     24<form name="form1" method="post" action="?"  enctype="multipart/form-data"> 
    2525<input type="hidden" name="mode" value="" /> 
    2626<input type="hidden" name="now_file" value="<!--{$tpl_now_dir}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/index.tpl

    r17351 r17605  
    109109 
    110110<div id="admin-contents" class="contents-main"> 
    111 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     111<form name="form1" id="form1" method="post" action="?"> 
    112112<input type="hidden" name="mode" value="" /> 
    113113<input type="hidden" name="news_id" value="<!--{$news_id|escape}-->" /> 
     
    173173  <!--{/if}--> 
    174174  <!--{* ▼一覧表示エリアここから *}--> 
    175   <form name="move" id="move" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     175  <form name="move" id="move" method="post" action="?"> 
    176176  <input type="hidden" name="mode" value="moveRankSet" /> 
    177177  <input type="hidden" name="term" value="setposition" /> 
     
    205205      <td> 
    206206      <!--{if count($list_data) != 1}--> 
    207       <input type="text" name="pos-<!--{$list_data[data].news_id}-->" size="3" class="box3" />番目へ<a href="<!--{$smarty.server.PHP_SELF|escape}-->" onclick="fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$list_data[data].news_id}-->'); return false;">移動</a><br /> 
     207      <input type="text" name="pos-<!--{$list_data[data].news_id}-->" size="3" class="box3" />番目へ<a href="?" onclick="fnFormModeSubmit('move', 'moveRankSet','news_id', '<!--{$list_data[data].news_id}-->'); return false;">移動</a><br /> 
    208208      <!--{/if}--> 
    209209      <!--{if $list_data[data].rank ne $max_rank}--><a href="#" onclick="return func_rankMove('up', '<!--{$list_data[data].news_id|escape}-->', '<!--{$max_rank|escape}-->');">上へ</a><!--{/if}--> <!--{if $list_data[data].rank ne 1}--><a href="#" onclick="return func_rankMove('down', '<!--{$list_data[data].news_id|escape}-->', '<!--{$max_rank|escape}-->');">下へ</a><!--{/if}--> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/inquiry.tpl

    r17351 r17605  
    7575 
    7676<div id="admin-contents" class="contents-main"> 
    77 <form name="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->?mode=regist" onSubmit="return func_check(); false;"> 
     77<form name="form1" method="post" action="?mode=regist" onSubmit="return func_check(); false;"> 
    7878<input type="hidden" name="question_id" value="<!--{$QUESTION_ID}-->" /> 
    7979  <h2><!--{if $QUESTION_ID}-->修正<!--{else}-->新規<!--{/if}-->登録</h2> 
     
    139139</form> 
    140140 
    141 <form name="form2" method="post" action="<!--{$smaryt.server.PHP_SELF|escape}-->"> 
     141<form name="form2" method="post" action="?"> 
    142142  <h2>登録済みアンケート</h2> 
    143143  <table class="list center"> 
     
    155155      <td><!--{$list_data[data].disp_date}--></td> 
    156156      <td class="left"><!--{$list_data[data].question_name|escape}--></td> 
    157       <td><a href="<!--{$smarty.const.SITE_URL}-->inquiry/index.php?question_id=<!--{$list_data[data].question_id}-->" target="_blank">参照</a></td> 
     157      <td><a href="<!--{$smarty.const.SITE_URL}-->inquiry/<!--{$smarty.const.DIR_INDEX_URL}-->?question_id=<!--{$list_data[data].question_id}-->" target="_blank">参照</a></td> 
    158158      <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=csv&amp;question_id=<!--{$list_data[data].question_id}-->">download</a></td> 
    159159      <td><a href="<!--{$smarty.server.PHP_SELF|escape}-->?mode=delete&amp;question_id=<!--{$list_data[data].question_id}-->" onClick="return delete_check()">削除</a></td> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/page_edit.tpl

    r17351 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="edit" style="<!--{$arrErr[$key]|sfGetErrorColor}-->"> 
    2626<div id="" class="contents-main"> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/recomend.tpl

    r17455 r17605  
    9999      </td> 
    100100      <td> 
    101         <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     101        <form name="form<!--{$smarty.section.cnt.iteration}-->" id="form<!--{$smarty.section.cnt.iteration}-->" method="post" action="?"> 
    102102        <input type="hidden" name="mode" value="regist" /> 
    103103        <input type="hidden" name="product_id" value="<!--{$arrItems[$smarty.section.cnt.iteration].product_id|escape}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/recomend_search.tpl

    r17425 r17605  
    4141 
    4242<!--▼検索フォーム--> 
    43 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.REQUEST_URI|escape}-->"> 
     43<form name="form1" id="form1" method="post" action="?"> 
    4444<input name="mode" type="hidden" value="search" /> 
    4545<input name="search_pageno" type="hidden" value="" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/contents/subnavi.tpl

    r17455 r17605  
    2323*}--> 
    2424<ul class="level1"> 
    25 <li<!--{if $tpl_subno == 'index'}--> class="on"<!--{/if}--> id="navi-contents-index"><a href="<!--{$smarty.const.URL_DIR}-->admin/contents/index.php"><span>新着情報管理</span></a></li> 
     25<li<!--{if $tpl_subno == 'index'}--> class="on"<!--{/if}--> id="navi-contents-index"><a href="<!--{$smarty.const.URL_DIR}-->admin/contents/<!--{$smarty.const.DIR_INDEX_URL}-->"><span>新着情報管理</span></a></li> 
    2626<li<!--{if $tpl_subno == 'recommend'}--> class="on"<!--{/if}--> id="navi-contents-recommend"><a href="<!--{$smarty.const.URL_DIR}-->admin/contents/recommend.php"><span>おすすめ商品管理</span></a></li> 
    2727<li<!--{if $tpl_subno == 'inquiry'}--> class="on"<!--{/if}--> id="navi-contents-inquiry"><a href="<!--{$smarty.const.URL_DIR}-->admin/contents/inquiry.php"><span>アンケート管理</span></a></li> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/edit.tpl

    r17365 r17605  
    2626   
    2727  function fnReturn() { 
    28     document.form_search.action = './index.php'; 
     28    document.form_search.action = './<!--{$smarty.const.DIR_INDEX_URL}-->'; 
    2929    document.form_search.submit(); 
    3030    return false; 
     
    5656</form> 
    5757 
    58 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     58<form name="form1" id="form1" method="post" action="?"> 
    5959<input type="hidden" name="mode" value="confirm" /> 
    6060<input type="hidden" name="edit_email" value="<!--{$tpl_edit_email}-->" /> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/edit_complete.tpl

    r17351 r17605  
    2222 */ 
    2323*}--> 
    24 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     24<form name="form1" id="form1" method="post" action="?"> 
    2525<input type="hidden" name="mode" value="complete" /> 
    2626<!--{foreach from=$arrForm key=key item=item}--> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/edit_confirm.tpl

    r17351 r17605  
    3434 
    3535 
    36 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     36<form name="form1" id="form1" method="post" action="?"> 
    3737<input type="hidden" name="mode" value="complete" /> 
    3838<!--{foreach from=$arrForm key=key item=item}--> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/index.tpl

    r17369 r17605  
    7373 
    7474<div id="customer" class="contents-main"> 
    75 <form name="form_search" id="form_search" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     75<form name="form_search" id="form_search" method="post" action="?"> 
    7676<input type="hidden" name="mode" value="search" /> 
    7777  <h2>検索条件設定</h2> 
     
    270270 
    271271<!--★★検索結果一覧★★--> 
    272 <form name="form1" id="form1" method="post" action="<!--{$smarty.server.PHP_SELF|escape}-->"> 
     272<form name="form1" id="form1" method="post" action="?"> 
    273273<!--{foreach from=$smarty.post key="key" item="item"}--> 
    274274<!--{if $key ne "mode" && $key ne "del_mode" && $key ne "edit_customer_id" && $key ne "del_customer_id" && $key ne "search_pageno" && $key ne "csv_mode" && $key ne "job" && $key ne "sex" && $key ne "status"}--><input type="hidden" name="<!--{$key|escape}-->" value="<!--{$item|escape}-->"><!--{/if}--> 
  • branches/comu-ver2/data/Smarty/templates/default/admin/customer/subnavi.tpl

    r17423 r17605  
    2323*}--> 
    2424<ul class="level1"> 
    25 <li<!--{if $tpl_subno == 'index'}--> class="on"<!--{/if}--> id="navi-customer-index"><a href="<!--{$smarty.const.URL_DIR}-->admin/customer/index.php"><span>顧客マスタ</span></a></li>