[Svn-src-all:819] [version-2_5-dev 19706] * #628(未使用処理・定義などの削除)

nanasess admin @ mail.ec-cube.net
2010年 12月 3日 (金) 12:29:58 JST


Subversion committed to /home/svn/open 19706
http://svn.ec-cube.net/open_trac/changeset/19706
┌────────────────────────────┐
│更新者 :  nanasess                                     │
│更新日時:  2010-12-03 12:29:57 +0900 (金, 03 12月 2010)│
└────────────────────────────┘

Log:
--------------------------------------------------------
 * #628(未使用処理・定義などの削除)
   * dtb_order テーブルの loan_result, credit_result, credit_msg, conveni_data, cell01, cell02, cell03 を削除
 * #627(ソース整形・ソースコメントの改善)
   * mtb_constants.rank の項番修正
 * #792(ダウンロード販売機能)
   * dtb_order.payment_date を datetime に変更
 * #787(スマートフォン対応)
   * mtb_device_type 追加
   * 端末種別の定数を追加
 * #859(モバイル・PCどちらからの注文か受注データで識別できるようにする)
   * dtb_order.device_type_id, dtb_order_temp.device_type_id を追加


Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_5-dev/data/class/SC_Display.php
U   branches/version-2_5-dev/data/mtb_constants_init.php
U   branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
U   branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql
U   branches/version-2_5-dev/html/install/sql/drop_table.sql
U   branches/version-2_5-dev/html/install/sql/insert_data.sql

変更: branches/version-2_5-dev/data/class/SC_Display.php
===================================================================
--- branches/version-2_5-dev/data/class/SC_Display.php	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/data/class/SC_Display.php	2010-12-03 03:29:57 UTC (rev 19706)
@@ -44,8 +44,8 @@
      * TODO php4を捨てたときに ここのコメントアウトを外してね。
      * const('MOBILE',1);
      * const('SMARTPHONE',2);
-     * const('PC',4);
-     * const('ADMIN',8);
+     * const('PC',10);
+     * const('ADMIN',99);
      */
 
     function SC_Display($hasPrevURL = true, $autoGenerateHttpHeaders = true) {
@@ -71,7 +71,7 @@
      */
     function prepare($page, $is_admin = false){
         if(!$this->deviceSeted || !is_null($this->view)){
-            $device = ($is_admin) ? 8 : $this->detectDevice();
+            $device = ($is_admin) ? DEVICE_TYPE_ADMIN : $this->detectDevice();
             $this->setDevice($device);
         }
         $this->assignobj($page);
@@ -111,20 +111,20 @@
      * デバイス毎の出力方法を自動で変更する、ファサード
      * Enter description here ...
      */
-    function setDevice($device=4){
+    function setDevice($device = DEVICE_TYPE_PC){
 
         switch ($device){
-            case 1:
+            case DEVICE_TYPE_MOBILE:
                 $this->response->setContentType("text/html");
                 $this->setView(new SC_MobileView());
                 break;
-            case 2:
+            case DEVICE_TYPE_SMARTPHONE:
                 $this->setView(new SC_SmartphoneView());
                 break;
-            case 4:
+            case DEVICE_TYPE_PC:
                 $this->setView(new SC_SiteView());
                 break;
-            case 8:
+            case DEVICE_TYPE_ADMIN:
                 $this->setView(new SC_AdminView());
         }
         $this->deviceSeted = true;
@@ -141,7 +141,7 @@
      * 機種を判別する。
      * SC_Display::MOBILE = ガラケー = 1
      * SC_Display::SMARTPHONE = スマホ = 2
-     * SC_Display::PC = PC = 4
+     * SC_Display::PC = PC = 10
      * ※PHP4の為にconstは使っていません。 1がガラケーで、2がスマホで4がPCです。
      * @return
      */
@@ -150,11 +150,11 @@
         $su = new SC_SmartphoneUserAgent();
         $retDevice = 0;
         if($nu->isMobile()){
-            $retDevice = 1;
+            $retDevice = DEVICE_TYPE_MOBILE;
         }elseif ($su->isSmartphone()){
-            $retDevice = 2;
+            $retDevice = DEVICE_TYPE_SMARTPHONE;
         }else{
-            $retDevice = 4;
+            $retDevice = DEVICE_TYPE_PC;
         }
 
         if($this->autoSet){

変更: branches/version-2_5-dev/data/mtb_constants_init.php
===================================================================
--- branches/version-2_5-dev/data/mtb_constants_init.php	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/data/mtb_constants_init.php	2010-12-03 03:29:57 UTC (rev 19706)
@@ -602,4 +602,12 @@
 define('PRODUCT_TYPE_NORMAL', 1);
 /** ダウンロード商品 */
 define('PRODUCT_TYPE_DOWNLOAD', 2);
+/** 端末種別: モバイル */
+define('DEVICE_TYPE_MOBILE', 1);
+/** 端末種別: スマートフォン */
+define('DEVICE_TYPE_SMARTPHONE', 2);
+/** 端末種別: PC */
+define('DEVICE_TYPE_PC', 10);
+/** 端末種別: 管理画面 */
+define('DEVICE_TYPE_ADMIN', 99);
 ?>

変更: branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	2010-12-03 03:29:57 UTC (rev 19706)
@@ -622,17 +622,12 @@
     note text,
     status smallint,
     create_date datetime NOT NULL,
-    loan_result text,
-    credit_result text,
-    credit_msg text,
     update_date datetime,
     commit_date datetime,
+    payment_date datetime,
+    device_type_id int,
     del_flg smallint NOT NULL DEFAULT 0,
     deliv_date text,
-    conveni_data text,
-    cell01 text,
-    cell02 text,
-    cell03 text,
     memo01 text,
     memo02 text,
     memo03 text,
@@ -643,7 +638,6 @@
     memo08 text,
     memo09 text,
     memo10 text,
-    payment_date timestamp,
     PRIMARY KEY (order_id)
 ) TYPE=InnoDB;
 
@@ -706,17 +700,11 @@
     status smallint,
     deliv_check smallint,
     point_check smallint,
-    loan_result text,
-    credit_result text,
-    credit_msg text,
     create_date datetime NOT NULL,
     update_date datetime,
+    device_type_id int,
     del_flg smallint NOT NULL DEFAULT 0,
     deliv_date text,
-    conveni_data text,
-    cell01 text,
-    cell02 text,
-    cell03 text,
     order_id int,
     memo01 text,
     memo02 text,
@@ -1172,6 +1160,13 @@
     PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
+CREATE TABLE mtb_device_type (
+    id int2,
+    name text,
+    rank int2 NOT NULL,
+    PRIMARY KEY (id)
+) TYPE=InnoDB;
+
 CREATE TABLE dtb_mobile_ext_session_id (
     session_id text NOT NULL,
     param_key text,

変更: branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	2010-12-03 03:29:57 UTC (rev 19706)
@@ -624,17 +624,12 @@
     note text,
     status smallint,
     create_date timestamp NOT NULL DEFAULT now(),
-    loan_result text,
-    credit_result text,
-    credit_msg text,
     update_date timestamp,
     commit_date timestamp,
+    payment_date timestamp,
+    device_type_id int,
     del_flg smallint NOT NULL DEFAULT 0,
     deliv_date text,
-    conveni_data text,
-    cell01 text,
-    cell02 text,
-    cell03 text,
     memo01 text,
     memo02 text,
     memo03 text,
@@ -645,7 +640,6 @@
     memo08 text,
     memo09 text,
     memo10 text,
-    payment_date timestamp,
     PRIMARY KEY (order_id)
 );
 
@@ -708,17 +702,11 @@
     status smallint,
     deliv_check smallint,
     point_check smallint,
-    loan_result text,
-    credit_result text,
-    credit_msg text,
     create_date timestamp NOT NULL DEFAULT now(),
     update_date timestamp,
+    device_type_id int,
     del_flg smallint NOT NULL DEFAULT 0,
     deliv_date text,
-    conveni_data text,
-    cell01 text,
-    cell02 text,
-    cell03 text,
     order_id int,
     memo01 text,
     memo02 text,
@@ -1171,8 +1159,13 @@
     PRIMARY KEY (id)
 );
 
+CREATE TABLE mtb_device_type (
+    id int2,
+    name text,
+    rank int2 NOT NULL,
+    PRIMARY KEY (id)
+);
 
-
 CREATE TABLE dtb_mobile_ext_session_id (
     session_id text NOT NULL,
     param_key text,

変更: branches/version-2_5-dev/html/install/sql/drop_table.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/drop_table.sql	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/html/install/sql/drop_table.sql	2010-12-03 03:29:57 UTC (rev 19706)
@@ -89,6 +89,7 @@
 DROP TABLE dtb_holiday;
 DROP TABLE dtb_customer_favorite_products;
 DROP TABLE mtb_product_type;
+DROP TABLE mtb_device_type;
 DROP TABLE dtb_module;
 DROP TABLE dtb_session;
 DROP TABLE dtb_mobile_ext_session_id;

変更: branches/version-2_5-dev/html/install/sql/insert_data.sql
===================================================================
--- branches/version-2_5-dev/html/install/sql/insert_data.sql	2010-12-02 09:14:39 UTC (rev 19705)
+++ branches/version-2_5-dev/html/install/sql/insert_data.sql	2010-12-03 03:29:57 UTC (rev 19706)
@@ -562,6 +562,11 @@
 INSERT INTO mtb_product_type (id, name, rank) VALUES (1, '通常商品', 0);
 INSERT INTO mtb_product_type (id, name, rank) VALUES (2, 'ダウンロード商品', 1);
 
+INSERT INTO mtb_device_type (id, name, rank) VALUES (1, 'モバイル', 0);
+INSERT INTO mtb_device_type (id, name, rank) VALUES (2, 'スマートフォン', 1);
+INSERT INTO mtb_device_type (id, name, rank) VALUES (10, 'PC', 2);
+INSERT INTO mtb_device_type (id, name, rank) VALUES (99, '管理画面', 3);
+
 INSERT INTO mtb_job (id, name, rank) VALUES (1, '公務員', 0);
 INSERT INTO mtb_job (id, name, rank) VALUES (2, 'コンサルタント', 1);
 INSERT INTO mtb_job (id, name, rank) VALUES (3, 'コンピュータ関連技術職', 2);
@@ -1115,10 +1120,14 @@
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('ORDER_PENDING', '7', 806, '決済処理中');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PRODUCT_TYPE_NORMAL', '1', 900, '通常商品');
 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PRODUCT_TYPE_DOWNLOAD', '2', 901, 'ダウンロード商品');
-INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('SQL_QUERY_LOG_MODE', '1', 902, 'SQLログを取得するフラグ(1:表示, 0:非表示)');
-INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('SQL_QUERY_LOG_MIN_EXEC_TIME', '2', 903, 'SQLログを取得する時間設定(設定値以上かかった場合に取得)');
-INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PAGE_DISPLAY_TIME_LOG_MODE', '1', 904, 'ページ表示時間のログを取得するフラグ(1:表示, 0:非表示)');
-INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PAGE_DISPLAY_TIME_LOG_MIN_EXEC_TIME', '2', 905, 'ページ表示時間のログを取得する時間設定(設定値以上かかった場合に取得)');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('SQL_QUERY_LOG_MODE', '1', 1000, 'SQLログを取得するフラグ(1:表示, 0:非表示)');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('SQL_QUERY_LOG_MIN_EXEC_TIME', '2', 1001, 'SQLログを取得する時間設定(設定値以上かかった場合に取得)');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PAGE_DISPLAY_TIME_LOG_MODE', '1', 1002, 'ページ表示時間のログを取得するフラグ(1:表示, 0:非表示)');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PAGE_DISPLAY_TIME_LOG_MIN_EXEC_TIME', '2', 1003, 'ページ表示時間のログを取得する時間設定(設定値以上かかった場合に取得)');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEVICE_TYPE_MOBILE', '1', 1100, '端末種別: モバイル');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEVICE_TYPE_SMARTPHONE', '2', 1101, '端末種別: スマートフォン');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEVICE_TYPE_PC', '10', 1102, '端末種別: PC');
+INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DEVICE_TYPE_ADMIN', '99', 1103, '端末種別: 管理画面');
 
 INSERT INTO dtb_index_list (table_name, column_name, recommend_flg, recommend_comment) VALUES ('dtb_customer', 'email_mobile', 0, '会員数増加時のログイン処理速度を向上させたいときに試してみてください');
 INSERT INTO dtb_index_list (table_name, column_name, recommend_flg, recommend_comment) VALUES ('dtb_products', 'name', 2, '商品名検索速度を向上させたいときに試してみてください');




Svn-src-all メーリングリストの案内