Index: /branches/version-2_12-dev/data/Smarty/templates/admin/basis/index.tpl
===================================================================
--- /branches/version-2_12-dev/data/Smarty/templates/admin/basis/index.tpl	(revision 22206)
+++ /branches/version-2_12-dev/data/Smarty/templates/admin/basis/index.tpl	(revision 22477)
@@ -111,5 +111,5 @@
 <form name="form1" id="form1" method="post" action="?">
 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" />
-<input type="hidden" name="mode" value="<!--{$tpl_mode}-->" />
+<input type="hidden" name="mode" value="confirm" />
 <!--{* ▼登録テーブルここから *}-->
 <div id="basis" class="contents-main">
@@ -323,5 +323,5 @@
     <div class="btn-area">
         <ul>
-            <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', '<!--{$tpl_mode}-->', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
+            <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'confirm', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li>
         </ul>
     </div>
Index: /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php
===================================================================
--- /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 22218)
+++ /branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 22477)
@@ -1468,3 +1468,33 @@
         return $exists;
     }
+
+    /**
+     * 店舗基本情報を登録する
+     *
+     * @param array $arrData 登録するデータ
+     * @return void
+     */
+    static function registerBasisData($arrData) {
+        $objQuery =& SC_Query_Ex::getSingletonInstance();
+
+        $arrData = $objQuery->extractOnlyColsOf('dtb_baseinfo', $arrData);
+
+        if (isset($arrData['regular_holiday_ids']) && is_array($arrData['regular_holiday_ids'])) {
+            // 定休日をパイプ区切りの文字列に変換
+            $arrData['regular_holiday_ids'] = implode('|', $arrData['regular_holiday_ids']);
+        }
+
+        $arrData['update_date'] = 'CURRENT_TIMESTAMP';
+
+        // UPDATEの実行
+        $ret = $objQuery->update('dtb_baseinfo', $arrData);
+        GC_Utils_Ex::gfPrintLog('dtb_baseinfo に UPDATE を実行しました。');
+
+        // UPDATE できなかった場合、INSERT
+        if ($ret == 0) {
+            $arrData['id'] = 1;
+            $ret = $objQuery->insert('dtb_baseinfo', $arrData);
+            GC_Utils_Ex::gfPrintLog('dtb_baseinfo に INSERT を実行しました。');
+        }
+    }
 }
Index: /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php
===================================================================
--- /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 22472)
+++ /branches/version-2_12-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis.php	(revision 22477)
@@ -79,15 +79,9 @@
      */
     function action() {
-
         $objDb = new SC_Helper_DB_Ex();
 
-        if ($objDb->sfGetBasisExists()) {
-            $this->tpl_mode = 'update';
-        } else {
-            $this->tpl_mode = 'insert';
-        }
-
-        if (!empty($_POST)) {
-
+        $this->tpl_onload = "fnCheckLimit('downloadable_days', 'downloadable_days_unlimited', '" . DISABLED_RGB . "');";
+
+        if ($this->getMode() === 'confirm') {
             $objFormParam = new SC_FormParam_Ex();
             $this->lfInitParam($objFormParam, $_POST);
@@ -96,39 +90,20 @@
 
             $this->arrErr = $this->lfCheckError($objFormParam);
-            $post = $objFormParam->getHashArray();
-
-            $this->arrForm = $post;
-
-            if (count($this->arrErr) == 0) {
-                switch ($this->getMode()) {
-                    // 既存編集
-                    case 'update':
-                        $this->lfUpdateData($this->arrForm);
-                        break;
-                    // 新規作成
-                    case 'insert':
-                        $this->lfInsertData($this->arrForm);
-                        break;
-                    default:
-                        break;
-                }
-                $this->tpl_onload = "fnCheckLimit('downloadable_days', 'downloadable_days_unlimited', '" . DISABLED_RGB . "'); window.alert('SHOPマスターの登録が完了しました。');";
+
+            if (!empty($this->arrErr)) {
+                $this->arrForm = $objFormParam->getHashArray();
+                return;
             }
-            if (empty($this->arrForm['regular_holiday_ids'])) {
-                $this->arrSel = array();
-            } else {
-                $this->arrSel = $this->arrForm['regular_holiday_ids'];
-            }
-        } else {
-            $arrCol = $this->lfGetCol();
-            $col    = SC_Utils_Ex::sfGetCommaList($arrCol);
-            $arrRet = $objDb->sfGetBasisData(true, $col);
-            $this->arrForm = $arrRet;
-
-            $regular_holiday_ids = explode('|', $this->arrForm['regular_holiday_ids']);
-            $this->arrForm['regular_holiday_ids'] = $regular_holiday_ids;
-            $this->tpl_onload = "fnCheckLimit('downloadable_days', 'downloadable_days_unlimited', '" . DISABLED_RGB . "');";
+
+            $arrData = $objFormParam->getDbArray();
+            SC_Helper_DB_Ex::registerBasisData($arrData);
+
+            $this->tpl_onload .= "window.alert('SHOPマスターの登録が完了しました。');";
         }
 
+        $arrRet = $objDb->sfGetBasisData(true);
+        $objFormParam->setParam($arrRet);
+        $this->arrForm = $objFormParam->getHashArray();
+        $this->arrForm['regular_holiday_ids'] = explode('|', $this->arrForm['regular_holiday_ids']);
     }
 
@@ -142,72 +117,22 @@
     }
 
-    // 基本情報用のカラムを取り出す。
-    function lfGetCol() {
-        $arrCol = array(
-            'company_name',
-            'company_kana',
-            'shop_name',
-            'shop_kana',
-            'shop_name_eng',
-            'zip01',
-            'zip02',
-            'pref',
-            'addr01',
-            'addr02',
-            'tel01',
-            'tel02',
-            'tel03',
-            'fax01',
-            'fax02',
-            'fax03',
-            'business_hour',
-            'email01',
-            'email02',
-            'email03',
-            'email04',
-            'tax',
-            'tax_rule',
-            'free_rule',
-            'good_traded',
-            'message',
-            'regular_holiday_ids',
-            'latitude',
-            'longitude',
-            'downloadable_days',
-            'downloadable_days_unlimited'
-        );
-        return $arrCol;
-    }
-
-    function lfUpdateData($array) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $arrCol = $this->lfGetCol();
-        foreach ($arrCol as $val) {
-            //配列の場合は、パイプ区切りの文字列に変換
-            if (is_array($array[$val])) {
-                $sqlval[$val] = implode('|', $array[$val]);
-            } else {
-                $sqlval[$val] = $array[$val];
-            }
-        }
-        $sqlval['update_date'] = 'CURRENT_TIMESTAMP';
-        // UPDATEの実行
-        $ret = $objQuery->update('dtb_baseinfo', $sqlval);
-
-        GC_Utils_Ex::gfPrintLog('dtb_baseinfo に UPDATE を実行しました。');
-    }
-
-    function lfInsertData($array) {
-        $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $arrCol = $this->lfGetCol();
-        foreach ($arrCol as $val) {
-            $sqlval[$val] = $array[$val];
-        }
-        $sqlval['id'] = 1;
-        $sqlval['update_date'] = 'CURRENT_TIMESTAMP';
-        // INSERTの実行
-        $ret = $objQuery->insert('dtb_baseinfo', $sqlval);
-
-        GC_Utils_Ex::gfPrintLog('dtb_baseinfo に INSERT を実行しました。');
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.4
+     */
+    function lfUpdateData($arrData) {
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        SC_Helper_DB_Ex::registerBasisData($arrData);
+    }
+
+    /**
+     * 前方互換用
+     *
+     * @deprecated 2.12.4
+     */
+    function lfInsertData($arrData) {
+        trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING);
+        SC_Helper_DB_Ex::registerBasisData($arrData);
     }
 
