[Svn-src-all:1324] [version-2_5-dev 20213] ふぅ。途中だけど、一旦コミット。actionの中を整理中。

miningbrownie admin @ mail.ec-cube.net
2011年 2月 19日 (土) 22:29:14 JST


Subversion committed to /home/svn/open 20213
http://svn.ec-cube.net/open_trac/changeset/20213
┌────────────────────────────┐
│更新者 :  miningbrownie                                │
│更新日時:  2011-02-19 22:29:14 +0900 (土, 19  2月 2011)│
└────────────────────────────┘

Log:
--------------------------------------------------------
ふぅ。途中だけど、一旦コミット。actionの中を整理中。

Changed:                      [U:修正,A:追加,D:削除]
--------------------------------------------------------
U   branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
U   branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php
U   branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php
U   branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php
U   branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php

変更: branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php	2011-02-19 13:25:14 UTC (rev 20212)
+++ branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php	2011-02-19 13:29:14 UTC (rev 20213)
@@ -71,19 +71,14 @@
      */
     function action() {
         SC_Utils_Ex::sfIsSuccess(new SC_Session());
-
         // 検索パラメータの引き継ぎ
         $this->arrSearchHidden = SC_Utils_Ex::sfFilterKey($_POST,"^search_");
-        
         $this->tpl_order_id = $_POST['order_id'];
-
         // パラメータ管理クラス
         $objFormParam = new SC_FormParam();
         // パラメータ情報の初期化
         $this->lfInitParam($objFormParam);
 
-        $objMail = new SC_Helper_Mail_Ex();
-
         switch($this->getMode()) {
             case 'pre_edit':
                 break;
@@ -92,48 +87,14 @@
                 $objFormParam->setParam($_POST);
                 break;
             case 'send':
-                // POST値の取得
-                $objFormParam->setParam($_POST);
-                // 入力値の変換
-                $objFormParam->convParam();
-                $this->arrErr = $objFormParam->checkerror();
-                // メールの送信
-                if (count($this->arrErr) == 0) {
-                    // 注文受付メール
-                    $objMail->sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['header'], $_POST['footer']);
-                }
-                SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH);
+                $this->send($objFormParam);
                 exit;
-                break;
             case 'confirm':
-                // POST値の取得
-                $objFormParam->setParam($_POST);
-                // 入力値の変換
-                $objFormParam->convParam();
-                // 入力値の引き継ぎ
-                $this->arrHidden = $objFormParam->getHashArray();
-                $this->arrErr = $objFormParam->checkerror();
-                // メールの送信
-                if (count($this->arrErr) == 0) {
-                    // 注文受付メール(送信なし)
-                    $objSendMail = $objMail->sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['header'], $_POST['footer'], false);
-                    // 確認ページの表示
-                    $this->tpl_subject = $_POST['subject'];
-                    $this->tpl_body = mb_convert_encoding( $objSendMail->body, CHAR_CODE, "auto" );
-                    $this->tpl_to = $objSendMail->tpl_to;
-                    $this->tpl_mainpage = 'order/mail_confirm.tpl';
-                    return;
-                }
+                $this->confirm($objFormParam);
                 break;
             case 'change':
                 // POST値の取得
-                $objFormParam->setValue('template_id', $_POST['template_id']);
-                if(SC_Utils_Ex::sfIsInt($_POST['template_id'])) {
-                    $objQuery = new SC_Query();
-                    $where = "template_id = ?";
-                    $arrRet = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($_POST['template_id']));
-                    $objFormParam->setParam($arrRet[0]);
-                }
+                $this->changeData($objFormParam);
                 break;
         }
 
@@ -149,23 +110,54 @@
         $this->arrForm = $objFormParam->getFormParamList();
     }
 
-    /**
-     * TODO これ色々なところでやっていそうなので、どこかに共通化した方がよいんちゃうかな
-     * 検索パラメータを配列で返す
-     * 
-     */
-    function getSearchParameters($post){
-        // 検索パラメータの引き継ぎ
-        $searchHiddenParams = array();
-        foreach ($post as $key => $val) {
-            if (preg_match("/^search_/", $key)) {
-                $searchHiddenParams[$key] = $val;
-            }
+    function send(&$objFormParam){
+        // POST値の取得
+        $objFormParam->setParam($_POST);
+        // 入力値の変換
+        $objFormParam->convParam();
+        $this->arrErr = $objFormParam->checkerror();
+        // メールの送信
+        if (count($this->arrErr) == 0) {
+            // 注文受付メール
+            $objMail = new SC_Helper_Mail_Ex();
+            $objMail->sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['header'], $_POST['footer']);
         }
-        return $searchHiddenParams;
+        SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH);
     }
 
+    function confirm(&$objFormParam){
+        // POST値の取得
+        $objFormParam->setParam($_POST);
+        // 入力値の変換
+        $objFormParam->convParam();
+        // 入力値の引き継ぎ
+        $this->arrHidden = $objFormParam->getHashArray();
+        $this->arrErr = $objFormParam->checkerror();
+        // メールの送信
+        if (count($this->arrErr) == 0) {
+            // 注文受付メール(送信なし)
+            $objMail = new SC_Helper_Mail_Ex();
+            $objSendMail = $objMail->sfSendOrderMail($_POST['order_id'], $_POST['template_id'], $_POST['subject'], $_POST['header'], $_POST['footer'], false);
+            // 確認ページの表示
+            $this->tpl_subject = $_POST['subject'];
+            $this->tpl_body = mb_convert_encoding( $objSendMail->body, CHAR_CODE, "auto" );
+            $this->tpl_to = $objSendMail->tpl_to;
+            $this->tpl_mainpage = 'order/mail_confirm.tpl';
+            return;
+        }
+    }
 
+    function changeData(&$objFormParam){
+        $objFormParam->setValue('template_id', $_POST['template_id']);
+        if(SC_Utils_Ex::sfIsInt($_POST['template_id'])) {
+            $objQuery =& SC_Query::getSingletonInstance();
+            $where = "template_id = ?";
+            $arrRet = $objQuery->select("subject, header, footer", "dtb_mailtemplate", $where, array($_POST['template_id']));
+            $objFormParam->setParam($arrRet[0]);
+        }
+    }
+
+
     /**
      * デストラクタ.
      *

変更: branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php	2011-02-19 13:25:14 UTC (rev 20212)
+++ branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php	2011-02-19 13:29:14 UTC (rev 20213)
@@ -63,13 +63,11 @@
      * @return void
      */
     function action() {
-        $objSess = new SC_Session();
-
         // 認証可否の判定
-        SC_Utils_Ex::sfIsSuccess($objSess);
+        SC_Utils_Ex::sfIsSuccess(new SC_Session());
 
         if(SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
-            $objQuery = new SC_Query();
+            $objQuery =& SC_Query::getSingletonInstance();
             $col = "subject, mail_body";
             $where = "send_id = ?";
             $arrRet = $objQuery->select($col, "dtb_mail_history", $where, array($_GET['send_id']));
@@ -88,4 +86,4 @@
         parent::destroy();
     }
 }
-?>
+?>
\ No newline at end of file

変更: branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php	2011-02-19 13:25:14 UTC (rev 20212)
+++ branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Pdf.php	2011-02-19 13:29:14 UTC (rev 20213)
@@ -96,58 +96,68 @@
         // パラメータ情報の初期化
         $this->lfInitParam();
         $this->objFormParam->setParam($_POST);
-
+        
+        // どんな状態の時に isset($arrRet) == trueになるんだ?
         if (!isset($arrRet)) $arrRet = array();
-
+        
         switch($this->getMode()) {
-        case "confirm":
-            // 入力値の変換
-            $this->objFormParam->convParam();
-            $this->arrErr = $this->lfCheckError($arrRet);
-            $arrRet = $this->objFormParam->getHashArray();
-            $this->arrForm = $arrRet;
-            // エラー入力なし
-            if (count($this->arrErr) == 0) {
-                $objFpdf = new SC_Fpdf($arrRet['download'], $arrRet['title']);
-                foreach ($arrRet['order_id'] AS $key => $val) {
-                    $arrPdfData = $arrRet;
-                    $arrPdfData['order_id'] = $val;
-                    $objFpdf->setData($arrPdfData);
-                }
-                $objFpdf->createPdf();
-                exit;
-            }
-            break;
-        default:
-            // タイトルをセット
-            $arrForm['title'] = "お買上げ明細書(納品書)";
+            case "confirm":
+                // 入力値の変換
+                $this->confirm($this->objFormParam);
+                break;
+            default:
+                // ここが$arrFormの初登場ということを明示するため宣言する。
+                $arrForm = array();
+                // タイトルをセット
+                $arrForm['title'] = "お買上げ明細書(納品書)";
 
-            // 今日の日付をセット
-            $arrForm['year']  = date("Y");
-            $arrForm['month'] = date("m");
-            $arrForm['day']   = date("d");
+                // 今日の日付をセット
+                $arrForm['year']  = date("Y");
+                $arrForm['month'] = date("m");
+                $arrForm['day']   = date("d");
 
-            // メッセージ
-            $arrForm['msg1'] = 'このたびはお買上げいただきありがとうございます。';
-            $arrForm['msg2'] = '下記の内容にて納品させていただきます。';
-            $arrForm['msg3'] = 'ご確認くださいますよう、お願いいたします。';
+                // メッセージ
+                $arrForm['msg1'] = 'このたびはお買上げいただきありがとうございます。';
+                $arrForm['msg2'] = '下記の内容にて納品させていただきます。';
+                $arrForm['msg3'] = 'ご確認くださいますよう、お願いいたします。';
 
-            // 注文番号があったら、セットする
-            if(SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
-	              $arrForm['order_id'][0] = $_GET['order_id'];
-            } elseif (is_array($_POST['pdf_order_id'])) {
-                sort($_POST['pdf_order_id']);
-                foreach ($_POST['pdf_order_id'] AS $key=>$val) {
-	                  $arrForm['order_id'][] = $val;
+                // 注文番号があったら、セットする
+                if(SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
+                    $arrForm['order_id'][0] = $_GET['order_id'];
+                } elseif (is_array($_POST['pdf_order_id'])) {
+                    sort($_POST['pdf_order_id']);
+                    foreach ($_POST['pdf_order_id'] AS $key=>$val) {
+                        $arrForm['order_id'][] = $val;
+                    }
                 }
-            }
 
-            $this->arrForm = $arrForm;
-            break;
+                $this->arrForm = $arrForm;
+                break;
         }
         $this->setTemplate($this->tpl_mainpage);
     }
 
+    function confirm(&$objFormParam){
+        $this->objFormParam->convParam();
+        $this->arrErr = $this->lfCheckError($arrRet);
+        $arrRet = $this->objFormParam->getHashArray();
+        
+        $this->arrForm = $arrRet;
+        // エラー入力なし
+        if (count($this->arrErr) == 0) {
+            $objFpdf = new SC_Fpdf($arrRet['download'], $arrRet['title']);
+            foreach ($arrRet['order_id'] AS $key => $val) {
+                $arrPdfData = $arrRet;
+                $arrPdfData['order_id'] = $val;
+                $objFpdf->setData($arrPdfData);
+            }
+            $objFpdf->createPdf();
+            exit;
+        }
+    }
+
+
+
     /**
      * デストラクタ.
      *
@@ -175,13 +185,19 @@
         $this->objFormParam->addParam("ポイント表記", "disp_point", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
     }
 
-    /* 入力内容のチェック */
-    function lfCheckError() {
+    /**
+     *  入力内容のチェック
+     *  @var SC_FormParam
+     */
+    
+    function lfCheckError(&$objFormParam) {
         // 入力データを渡す。
-        $arrRet =  $this->objFormParam->getHashArray();
+        $arrRet = $objFormParam->getHashArray();
+        $objFormParam->
         $objErr = new SC_CheckError($arrRet);
+        
         $objErr->arrErr = $this->objFormParam->checkError();
-
+        
         // 特殊項目チェック
         $objErr->doFunc(array("発行日", "year", "month", "day"), array("CHECK_DATE"));
 
@@ -191,4 +207,3 @@
 
 }
 
-?>

変更: branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php	2011-02-19 13:25:14 UTC (rev 20212)
+++ branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php	2011-02-19 13:29:14 UTC (rev 20213)
@@ -1,4 +1,3 @@
-
 <?php
 /*
  * This file is part of EC-CUBE
@@ -83,124 +82,123 @@
         }
 
         switch ($this->getMode()) {
-        case 'search':
-            // POST値の引き継ぎ
-            $this->arrForm = $_POST;
-            // 入力文字の強制変換
-            $this->lfConvertParam();
+            case 'search':
+                // 入力文字の強制変換とPOST値の引き継ぎ
+                SC_FormParam::convParam();
+                $this->arrForm = $this->lfConvertParam($_POST,$this->getConvertRule());
 
-            $where = "alldtl.del_flg = 0";
-            $arrval = array();
+                $where = "alldtl.del_flg = 0";
+                $arrval = array();
 
-            /* 入力エラーなし */
-            foreach ($this->arrForm as $key => $val) {
-                if($val == "") {
-                    continue;
-                }
+                /* 入力エラーなし */
+                foreach ($this->arrForm as $key => $val) {
+                    if($val == "") {
+                        continue;
+                    }
 
-                switch ($key) {
-                case 'search_name':
-                    $where .= " AND name ILIKE ?";
-                    $arrval[] = "%$val%";
-                    break;
-                case 'search_category_id':
-                    list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val);
-                    if($tmp_where != "") {
-                        $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")";
-                        $arrval = array_merge((array)$arrval, (array)$tmp_arrval);
+                    switch ($key) {
+                        case 'search_name':
+                            $where .= " AND name ILIKE ?";
+                            $arrval[] = "%$val%";
+                            break;
+                        case 'search_category_id':
+                            list($tmp_where, $tmp_arrval) = $objDb->sfGetCatWhere($val);
+                            if($tmp_where != "") {
+                                $where.= " AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE " . $tmp_where . ")";
+                                $arrval = array_merge((array)$arrval, (array)$tmp_arrval);
+                            }
+                            break;
+                        case 'search_product_code':
+                            $where .= " AND alldtl.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)";
+                            $arrval[] = "$val%";
+                            break;
+                        default:
+                            break;
                     }
-                    break;
-                case 'search_product_code':
-                    $where .= " AND alldtl.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ? GROUP BY product_id)";
-                    $arrval[] = "$val%";
-                    break;
-                default:
-                    break;
                 }
-            }
 
-            // 検索結果対象となる商品の数を取得
-            $objQuery =& SC_Query::getSingletonInstance();
-            $objQuery->setWhere($where);
-            $objProduct = new SC_Product();
-            $linemax = $objProduct->findProductCount($objQuery, $arrval);
-            $this->tpl_linemax = $linemax;   // 何件が該当しました。表示用
+                // 検索結果対象となる商品の数を取得
+                $objQuery =& SC_Query::getSingletonInstance();
+                $objQuery->setWhere($where);
+                $objProduct = new SC_Product();
+                $linemax = $objProduct->findProductCount($objQuery, $arrval);
+                $this->tpl_linemax = $linemax;   // 何件が該当しました。表示用
 
-            // ページ送りの処理
-            if(isset($_POST['search_page_max'])
-               && is_numeric($_POST['search_page_max'])) {
-                $page_max = $_POST['search_page_max'];
-            } else {
-                $page_max = SEARCH_PMAX;
-            }
+                // ページ送りの処理
+                if(isset($_POST['search_page_max'])
+                && is_numeric($_POST['search_page_max'])) {
+                    $page_max = $_POST['search_page_max'];
+                } else {
+                    $page_max = SEARCH_PMAX;
+                }
 
-            // ページ送りの取得
-            $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX);
-            $this->tpl_strnavi = $objNavi->strnavi;     // 表示文字列
-            $startno = $objNavi->start_row;
+                // ページ送りの取得
+                $objNavi = new SC_PageNavi($_POST['search_pageno'], $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX);
+                $this->tpl_strnavi = $objNavi->strnavi;     // 表示文字列
+                $startno = $objNavi->start_row;
 
-            $objProduct = new SC_Product();
-            $objQuery =& SC_Query::getSingletonInstance();
-            $objQuery->setWhere($where);
+                $objProduct = new SC_Product();
+                $objQuery =& SC_Query::getSingletonInstance();
+                $objQuery->setWhere($where);
 
-            // 取得範囲の指定(開始行番号、行数のセット)
-            $objQuery->setLimitOffset($page_max, $startno);
-            // 表示順序
-            $objQuery->setOrder($order);
+                // 取得範囲の指定(開始行番号、行数のセット)
+                $objQuery->setLimitOffset($page_max, $startno);
+                // 表示順序
+                $objQuery->setOrder($order);
 
-            // 検索結果の取得
-            $arrProduct_id = $objProduct->findProductIdsOrder($objQuery, $arrval);
+                // 検索結果の取得
+                $arrProduct_id = $objProduct->findProductIdsOrder($objQuery, $arrval);
 
-            $where = "";
-            if (is_array($arrProduct_id) && !empty($arrProduct_id)) {
-                $where = 'product_id IN (' . implode(',', $arrProduct_id) . ')';
-            } else {
-                // 一致させない
-                $where = '0<>0';
-            }
-            $objQuery =& SC_Query::getSingletonInstance();
-            $objQuery->setWhere($where);
-            $arrProducts = $objProduct->lists($objQuery, $arrProduct_id);
+                $where = "";
+                if (is_array($arrProduct_id) && !empty($arrProduct_id)) {
+                    $where = 'product_id IN (' . implode(',', $arrProduct_id) . ')';
+                } else {
+                    // 一致させない
+                    $where = '0<>0';
+                }
+                $objQuery =& SC_Query::getSingletonInstance();
+                $objQuery->setWhere($where);
+                $arrProducts = $objProduct->lists($objQuery, $arrProduct_id);
 
-            //取得している並び順で並び替え
-            $arrProducts2 = array();
-            foreach($arrProducts as $item) {
-                $arrProducts2[ $item['product_id'] ] = $item;
-            }
-            $this->arrProducts = array();
-            foreach($arrProduct_id as $product_id) {
-                $this->arrProducts[] = $arrProducts2[$product_id];
-            }
+                //取得している並び順で並び替え
+                $arrProducts2 = array();
+                foreach($arrProducts as $item) {
+                    $arrProducts2[ $item['product_id'] ] = $item;
+                }
+                $this->arrProducts = array();
+                foreach($arrProduct_id as $product_id) {
+                    $this->arrProducts[] = $arrProducts2[$product_id];
+                }
 
-            $objProduct->setProductsClassByProductIds($arrProduct_id);
-            $objJson = new Services_JSON();
-            $this->tpl_javascript .= 'productsClassCategories = ' . $objJson->encode($objProduct->classCategories) . '; ';
+                $objProduct->setProductsClassByProductIds($arrProduct_id);
+                $objJson = new Services_JSON();
+                $this->tpl_javascript .= 'productsClassCategories = ' . $objJson->encode($objProduct->classCategories) . '; ';
 
-            foreach ($this->arrProducts as $arrProduct) {
-                $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});\n";
-            }
+                foreach ($this->arrProducts as $arrProduct) {
+                    $js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProduct['product_id']});\n";
+                }
 
-            $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}';
-            $this->tpl_onload .= 'fnOnLoad(); ';
+                $this->tpl_javascript .= 'function fnOnLoad(){' . $js_fnOnLoad . '}';
+                $this->tpl_onload .= 'fnOnLoad(); ';
 
-            // 規格1クラス名
-            $this->tpl_class_name1 = $objProduct->className1;
+                // 規格1クラス名
+                $this->tpl_class_name1 = $objProduct->className1;
 
-            // 規格2クラス名
-            $this->tpl_class_name2 = $objProduct->className2;
+                // 規格2クラス名
+                $this->tpl_class_name2 = $objProduct->className2;
 
-            // 規格1
-            $this->arrClassCat1 = $objProduct->classCats1;
+                // 規格1
+                $this->arrClassCat1 = $objProduct->classCats1;
 
-            // 規格1が設定されている
-            $this->tpl_classcat_find1 = $objProduct->classCat1_find;
-            // 規格2が設定されている
-            $this->tpl_classcat_find2 = $objProduct->classCat2_find;
-            $this->tpl_product_class_id = $objProduct->product_class_id;
-            $this->tpl_stock_find = $objProduct->stock_find;
-            break;
-        default:
-            break;
+                // 規格1が設定されている
+                $this->tpl_classcat_find1 = $objProduct->classCat1_find;
+                // 規格2が設定されている
+                $this->tpl_classcat_find2 = $objProduct->classCat2_find;
+                $this->tpl_product_class_id = $objProduct->product_class_id;
+                $this->tpl_stock_find = $objProduct->stock_find;
+                break;
+            default:
+                break;
         }
 
         // カテゴリ取得
@@ -217,8 +215,10 @@
         parent::destroy();
     }
 
-    /* 取得文字列の変換 */
-    function lfConvertParam() {
+    /**
+     * 文字列の変換ルールを返す
+     */
+    function getConvertRule(){
         /*
          *  文字列の変換
          *  K :  「半角(ハンカク)片仮名」を「全角片仮名」に変換
@@ -226,16 +226,27 @@
          *  V :  濁点付きの文字を一文字に変換。"K","H"と共に使用します
          *  n :  「全角」数字を「半角(ハンカク)」に変換
          */
+        $arrConvList = array();
         $arrConvList['search_name'] = "KVa";
         $arrConvList['search_product_code'] = "KVa";
+        return $arrConvList;
+    }
 
-        // 文字変換
-        foreach ($arrConvList as $key => $val) {
-            // POSTされてきた値のみ変換する。
-            if(isset($this->arrForm[$key])) {
-                $this->arrForm[$key] = mb_convert_kana($this->arrForm[$key] ,$val);
+    /**
+     * 取得文字列の変換
+     * @param Array $param 取得文字列
+     * @param Array $convList 変換ルール
+     */
+    function lfConvertParam($param,$convList){
+        $convedParam = array();
+        foreach ($convList as $key => $value){
+            if(isset($param[$key])) {
+                $convedParam[$key] = mb_convert_kana($param[$key],$value);
+            }else{
+                $convedParam[$key] = $param[$key];
             }
         }
+        return $convedParam;
     }
 }
 ?>

変更: branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php
===================================================================
--- branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php	2011-02-19 13:25:14 UTC (rev 20212)
+++ branches/version-2_5-dev/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php	2011-02-19 13:29:14 UTC (rev 20213)
@@ -70,12 +70,10 @@
      * @return void
      */
     function action() {
-        $objSess = new SC_Session();
         $objDb = new SC_Helper_DB_Ex();
 
         // 認証可否の判定
-        $objSess = new SC_Session();
-        SC_Utils_Ex::sfIsSuccess($objSess);
+        SC_Utils_Ex::sfIsSuccess(new SC_Session());
 
         $this->arrForm = $_POST;
 
@@ -136,7 +134,7 @@
 
     //ステータス一覧の表示
     function lfStatusDisp($status,$pageno){
-        $objQuery = new SC_Query();
+        $objQuery =& SC_Query::getSingletonInstance();
 
         $select ="*";
         $from = "dtb_order";




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