[Svn-src-all:2754] [version-2_12-dev 21653] #1705 (NOT NULL 制約)
Seasoft
admin @ mail.ec-cube.net
2012年 3月 17日 (土) 16:40:27 JST
Subversion committed to /home/svn/open 21653
http://svn.ec-cube.net/open_trac/changeset/21653
┌────────────────────────────┐
│更新者 : Seasoft │
│更新日時: 2012-03-17 16:40:27 +0900 (土, 17 3月 2012)│
└────────────────────────────┘
Log:
--------------------------------------------------------
#1705 (NOT NULL 制約)
* ポイント周り
#1613 (typo修正・ソース整形・ソースコメントの改善)
#1692 (プラグイン機能(α版))
* DB 間で列順を揃えた
Changed: [U:修正,A:追加,D:削除]
--------------------------------------------------------
U branches/version-2_12-dev/data/Smarty/templates/admin/customer/edit.tpl
U branches/version-2_12-dev/data/class/helper/SC_Helper_Customer.php
U branches/version-2_12-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
U branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
U branches/version-2_12-dev/html/install/sql/create_table_mysql.sql
U branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql
変更: branches/version-2_12-dev/data/Smarty/templates/admin/customer/edit.tpl
===================================================================
--- branches/version-2_12-dev/data/Smarty/templates/admin/customer/edit.tpl 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/data/Smarty/templates/admin/customer/edit.tpl 2012-03-17 07:40:27 UTC (rev 21653)
@@ -234,7 +234,7 @@
</td>
</tr>
<tr>
- <th>所持ポイント</th>
+ <th>所持ポイント<span class="attention"> *</span></th>
<td>
<span class="attention"><!--{$arrErr.point}--></span>
<input type="text" name="point" value="<!--{$arrForm.point|h}-->" maxlength="<!--{$smarty.const.TEL_LEN}-->" size="6" class="box6" <!--{if $arrErr.point != ""}--><!--{sfSetErrorStyle}--><!--{/if}--> /> pt
変更: branches/version-2_12-dev/data/class/helper/SC_Helper_Customer.php
===================================================================
--- branches/version-2_12-dev/data/class/helper/SC_Helper_Customer.php 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_Customer.php 2012-03-17 07:40:27 UTC (rev 21653)
@@ -319,7 +319,7 @@
$objFormParam->addParam('携帯メールアドレス', 'email_mobile', null, 'a', array('NO_SPTAB', 'EMAIL_CHECK', 'SPTAB_CHECK' ,'EMAIL_CHAR_CHECK', 'MOBILE_EMAIL_CHECK'));
$objFormParam->addParam('会員状態', 'status', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->addParam('SHOP用メモ', 'note', LTEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK'));
- $objFormParam->addParam('所持ポイント', 'point', INT_LEN, 'n', array('NUM_CHECK'));
+ $objFormParam->addParam('所持ポイント', 'point', INT_LEN, 'n', array('EXIST_CHECK', 'NUM_CHECK'), 0);
}
if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
変更: branches/version-2_12-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php 2012-03-17 07:40:27 UTC (rev 21653)
@@ -97,7 +97,7 @@
// モードによる処理切り替え
switch ($this->getMode()) {
case 'edit_search':
- //検索引き継ぎ用パラメーター処理
+ // 検索引き継ぎ用パラメーター処理
$this->lfInitSearchParam($objFormSearchParam);
$objFormSearchParam->setParam($_REQUEST);
$this->arrErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
@@ -105,23 +105,23 @@
if (!SC_Utils_Ex::isBlank($this->arrErr)) {
return;
}
- //指定会員の情報をセット
+ // 指定会員の情報をセット
$this->arrForm = SC_Helper_Customer_Ex::sfGetCustomerData($objFormSearchParam->getValue('edit_customer_id'), true);
- //購入履歴情報の取得
+ // 購入履歴情報の取得
list($this->tpl_linemax, $this->arrPurchaseHistory, $this->objNavi) = $this->lfPurchaseHistory($objFormSearchParam->getValue('edit_customer_id'));
$this->arrPagenavi = $this->objNavi->arrPagenavi;
$this->arrPagenavi['mode'] = 'return';
$this->tpl_pageno = '0';
break;
case 'confirm':
- //パラメーター処理
+ // パラメーター処理
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
$this->arrForm = $objFormParam->getHashArray();
- //検索引き継ぎ用パラメーター処理
+ // 検索引き継ぎ用パラメーター処理
$this->lfInitSearchParam($objFormSearchParam);
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
@@ -133,14 +133,14 @@
$this->tpl_mainpage = 'customer/edit_confirm.tpl';
break;
case 'return':
- //パラメーター処理
+ // パラメーター処理
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
$this->arrForm = $objFormParam->getHashArray();
- //検索引き継ぎ用パラメーター処理
+ // 検索引き継ぎ用パラメーター処理
$this->lfInitSearchParam($objFormSearchParam);
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
@@ -148,7 +148,7 @@
if (!SC_Utils_Ex::isBlank($this->arrErr) or !SC_Utils_Ex::isBlank($this->arrSearchErr)) {
return;
}
- //購入履歴情報の取得
+ // 購入履歴情報の取得
list($this->tpl_linemax, $this->arrPurchaseHistory, $this->objNavi) = $this->lfPurchaseHistory($objFormParam->getValue('customer_id'), $objFormParam->getValue('search_pageno'));
$this->arrPagenavi = $this->objNavi->arrPagenavi;
$this->arrPagenavi['mode'] = 'return';
@@ -156,15 +156,15 @@
break;
case 'complete':
- //登録・保存処理
- //パラメーター処理
+ // 登録・保存処理
+ // パラメーター処理
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
$this->arrForm = $objFormParam->getHashArray();
- //検索引き継ぎ用パラメーター処理
+ // 検索引き継ぎ用パラメーター処理
$this->lfInitSearchParam($objFormSearchParam);
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
@@ -176,9 +176,10 @@
$this->tpl_mainpage = 'customer/edit_complete.tpl';
break;
case 'complete_return':
- //検索引き継ぎ用パラメーター処理
+ // 入力パラメーターチェック
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
+ // 検索引き継ぎ用パラメーター処理
$this->lfInitSearchParam($objFormSearchParam);
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
@@ -187,6 +188,8 @@
return;
}
default:
+ $this->lfInitParam($objFormParam);
+ $this->arrForm = $objFormParam->getHashArray();
break;
}
// フックポイント.
@@ -249,7 +252,7 @@
function lfCheckError(&$objFormParam) {
$arrErr = SC_Helper_Customer_Ex::sfCustomerMypageErrorCheck($objFormParam, true);
- //メアド重複チェック(共通ルーチンは使えない)
+ // メアド重複チェック(共通ルーチンは使えない)
$objQuery =& SC_Query_Ex::getSingletonInstance();
$col = 'email, email_mobile, customer_id';
$table = 'dtb_customer';
@@ -323,7 +326,7 @@
$table = 'dtb_order';
$where = 'customer_id = ? AND del_flg <> 1';
$arrVal = array($customer_id);
- //購入履歴の件数取得
+ // 購入履歴の件数取得
$linemax = $objQuery->count($table, $where, $arrVal);
// ページ送りの取得
$objNavi = new SC_PageNavi_Ex($pageno, $linemax, $page_max, 'fnNaviSearchPage2', NAVI_PMAX);
@@ -332,7 +335,7 @@
// 表示順序
$order = 'order_id DESC';
$objQuery->setOrder($order);
- //購入履歴情報の取得
+ // 購入履歴情報の取得
$arrPurchaseHistory = $objQuery->select('*', $table, $where, $arrVal);
return array($linemax, $arrPurchaseHistory, $objNavi);
変更: branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php 2012-03-17 07:40:27 UTC (rev 21653)
@@ -337,7 +337,7 @@
$objFormParam->addParam('合計', 'total');
$objFormParam->addParam('支払い合計', 'payment_total');
$objFormParam->addParam('加算ポイント', 'add_point');
- $objFormParam->addParam('お誕生日ポイント', 'birth_point');
+ $objFormParam->addParam('お誕生日ポイント', 'birth_point', null, 'n', array(), 0);
$objFormParam->addParam('消費税合計', 'tax');
$objFormParam->addParam('最終保持ポイント', 'total_point');
$objFormParam->addParam('会員ID', 'customer_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '0');
変更: branches/version-2_12-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- branches/version-2_12-dev/html/install/sql/create_table_mysql.sql 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/html/install/sql/create_table_mysql.sql 2012-03-17 07:40:27 UTC (rev 21653)
@@ -314,7 +314,7 @@
price01 numeric,
price02 numeric NOT NULL,
deliv_fee numeric,
- point_rate numeric,
+ point_rate numeric NOT NULL DEFAULT 0,
creator_id int NOT NULL,
create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_date timestamp NOT NULL,
@@ -499,7 +499,7 @@
last_buy_date datetime,
buy_times numeric DEFAULT 0,
buy_total numeric DEFAULT 0,
- point numeric DEFAULT 0,
+ point numeric NOT NULL DEFAULT 0,
note text,
status smallint NOT NULL DEFAULT 1,
create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -540,9 +540,9 @@
deliv_id int,
deliv_fee numeric,
charge numeric,
- use_point numeric,
- add_point numeric,
- birth_point numeric DEFAULT 0,
+ use_point numeric NOT NULL DEFAULT 0,
+ add_point numeric NOT NULL DEFAULT 0,
+ birth_point numeric NOT NULL DEFAULT 0,
tax numeric,
total numeric,
payment_total numeric,
@@ -597,9 +597,9 @@
deliv_id int,
deliv_fee numeric,
charge numeric,
- use_point numeric,
- add_point numeric,
- birth_point numeric DEFAULT 0,
+ use_point numeric NOT NULL DEFAULT 0,
+ add_point numeric NOT NULL DEFAULT 0,
+ birth_point numeric NOT NULL DEFAULT 0,
tax numeric,
total numeric,
payment_total numeric,
@@ -700,7 +700,7 @@
classcategory_name2 text,
price numeric,
quantity numeric,
- point_rate numeric,
+ point_rate numeric NOT NULL DEFAULT 0,
PRIMARY KEY (order_detail_id)
);
@@ -749,8 +749,8 @@
create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_date timestamp NOT NULL,
php_path text,
+ deletable_flg smallint NOT NULL DEFAULT 1,
plugin_id int,
- deletable_flg smallint NOT NULL DEFAULT 1,
PRIMARY KEY (device_type_id, bloc_id),
UNIQUE (device_type_id, filename(255))
);
変更: branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql 2012-03-16 11:42:58 UTC (rev 21652)
+++ branches/version-2_12-dev/html/install/sql/create_table_pgsql.sql 2012-03-17 07:40:27 UTC (rev 21653)
@@ -314,7 +314,7 @@
price01 numeric,
price02 numeric NOT NULL,
deliv_fee numeric,
- point_rate numeric,
+ point_rate numeric NOT NULL DEFAULT 0,
creator_id int NOT NULL,
create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_date timestamp NOT NULL,
@@ -499,7 +499,7 @@
last_buy_date timestamp,
buy_times numeric DEFAULT 0,
buy_total numeric DEFAULT 0,
- point numeric DEFAULT 0,
+ point numeric NOT NULL DEFAULT 0,
note text,
status smallint NOT NULL DEFAULT 1,
create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -540,9 +540,9 @@
deliv_id int,
deliv_fee numeric,
charge numeric,
- use_point numeric,
- add_point numeric,
- birth_point numeric DEFAULT 0,
+ use_point numeric NOT NULL DEFAULT 0,
+ add_point numeric NOT NULL DEFAULT 0,
+ birth_point numeric NOT NULL DEFAULT 0,
tax numeric,
total numeric,
payment_total numeric,
@@ -597,9 +597,9 @@
deliv_id int,
deliv_fee numeric,
charge numeric,
- use_point numeric,
- add_point numeric,
- birth_point numeric DEFAULT 0,
+ use_point numeric NOT NULL DEFAULT 0,
+ add_point numeric NOT NULL DEFAULT 0,
+ birth_point numeric NOT NULL DEFAULT 0,
tax numeric,
total numeric,
payment_total numeric,
@@ -700,7 +700,7 @@
classcategory_name2 text,
price numeric,
quantity numeric,
- point_rate numeric,
+ point_rate numeric NOT NULL DEFAULT 0,
PRIMARY KEY (order_detail_id)
);
Svn-src-all メーリングリストの案内