Ticket #409 (closed バグ指摘: 修正済)

Opened 13 years ago

Last modified 9 years ago

受注検索の日付で検索できる項目について

Reported by: kishida Owned by: somebody
Priority: Milestone: EC-CUBE2.3.4
Component: 管理画面 Version: 2.1.2(正式版)
Keywords: Cc:
修正済み: no

Description

受注検索で日付で検索できる項目、受注日・更新日で、無効な日付(2008/11/31)を入力して検索をかけると、DBエラーが発生する。

[原因] 日付のエラーチェックがかかっていない為

[対策] 編集ファイル data/Smarty/templates/default/admin/order/index.tpl

編集箇所[2箇所] <span class="red"><!--{$arrErr.search_startyear}--></span> <span class="red"><!--{$arrErr.search_endyear}--></span> ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ <span class="red"><!--{$arrErr.search_sorderyear}--></span> <span class="red"><!--{$arrErr.search_eorderyear}--></span>

<span class="red"><!--{$arrErr.search_startyear}--></span> <span class="red"><!--{$arrErr.search_endyear}--></span> ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ <span class="red"><!--{$arrErr.search_supdateyear}--></span> <span class="red"><!--{$arrErr.search_eupdateyear}--></span>

編集ファイル data/class/pages/admin/order/LC_Page_Admin_Order.php

編集箇所[1箇所]

/* 入力内容のチェック */ function lfCheckError() {

入力データを渡す。 $arrRet = $this->objFormParam->getHashArray(); $objErr = new SC_CheckError($arrRet); $objErr->arrErr = $this->objFormParam->checkError();

特殊項目チェック $objErr->doFunc(array("受注番号1", "受注番号2", "search_order_id1", "search_order_id2"), array("GREATER_CHECK")); $objErr->doFunc(array("年齢1", "年齢2", "search_age1", "search_age2"), array("GREATER_CHECK")); $objErr->doFunc(array("購入金額1", "購入金額2", "search_total1", "search_total2"), array("GREATER_CHECK")); $objErr->doFunc(array("開始日", "search_sorderyear", "search_sordermonth", "search_sorderday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_eorderyear", "search_eordermonth", "search_eorderday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_sorderyear", "search_sordermonth", "search_sorderday", "search_eorderyear", "search_eordermonth", "search_eorderday"), array("CHECK_SET_TERM"));

$objErr->doFunc(array("開始日", "search_supdateyear", "search_supdatemonth", "search_supdateday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_eupdateyear", "search_eupdatemonth", "search_eupdateday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_supdateyear", "search_supdatemonth", "search_supdateday", "search_eupdateyear", "search_eupdatemonth", "search_eupdateday"), array("CHECK_SET_TERM"));

$objErr->doFunc(array("開始日", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_SET_TERM"));

return $objErr->arrErr;

}

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

/* 入力内容のチェック */ function lfCheckError() {

入力データを渡す。 $arrRet = $this->objFormParam->getHashArray(); $objErr = new SC_CheckError($arrRet); $objErr->arrErr = $this->objFormParam->checkError();

特殊項目チェック $objErr->doFunc(array("受注番号1", "受注番号2", "search_order_id1", "search_order_id2"), array("GREATER_CHECK")); $objErr->doFunc(array("年齢1", "年齢2", "search_age1", "search_age2"), array("GREATER_CHECK")); $objErr->doFunc(array("購入金額1", "購入金額2", "search_total1", "search_total2"), array("GREATER_CHECK")); $objErr->doFunc(array("開始日", "search_sorderyear", "search_sordermonth", "search_sorderday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_eorderyear", "search_eordermonth", "search_eorderday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_sorderyear", "search_sordermonth", "search_sorderday", "search_eorderyear", "search_eordermonth", "search_eorderday"), array("CHECK_SET_TERM"));

$objErr->doFunc(array("開始日", "search_supdateyear", "search_supdatemonth", "search_supdateday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_eupdateyear", "search_eupdatemonth", "search_eupdateday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_supdateyear", "search_supdatemonth", "search_supdateday", "search_eupdateyear", "search_eupdatemonth", "search_eupdateday"), array("CHECK_SET_TERM"));

$objErr->doFunc(array("開始日", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday"), array("CHECK_DATE")); $objErr->doFunc(array("終了日", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_DATE")); $objErr->doFunc(array("開始日", "終了日", "search_sbirthyear", "search_sbirthmonth", "search_sbirthday", "search_ebirthyear", "search_ebirthmonth", "search_ebirthday"), array("CHECK_SET_TERM"));

return $objErr->arrErr;

}

Change History

comment:1 Changed 13 years ago by kishida

  • Status changed from new to closed
  • Resolution set to 修正済

comment:2 Changed 9 years ago by kim

  • 修正済み unset
  • Milestone set to EC-CUBE2.3.4
Note: See TracTickets for help on using tickets.