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/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> 
Note: See TracChangeset for help on using the changeset viewer.