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 22487)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 22567)
@@ -29,5 +29,6 @@
  * @version $Id:SC_Helper_DB.php 15532 2007-08-31 14:39:46Z nanasess $
  */
-class SC_Helper_DB {
+class SC_Helper_DB 
+{
 
     // {{{ properties
@@ -64,5 +65,6 @@
      *               引数 $add == false でカラムが存在しない場合 false
      */
-    function sfColumnExists($table_name, $col_name, $col_type = '', $dsn = '', $add = false) {
+    function sfColumnExists($table_name, $col_name, $col_type = '', $dsn = '', $add = false)
+    {
         $dbFactory = SC_DB_DBFactory_Ex::getInstance();
         $dsn = $dbFactory->getDSN($dsn);
@@ -102,5 +104,6 @@
      *               $add == false で, データが存在しない場合 false
      */
-    function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false) {
+    function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false)
+    {
         $dbFactory = SC_DB_DBFactory_Ex::getInstance();
         $dsn = $dbFactory->getDSN($dsn);
@@ -131,5 +134,6 @@
      * @return array 店舗基本情報の配列
      */
-    function sfGetBasisData($force = false, $col = '') {
+    function sfGetBasisData($force = false, $col = '')
+    {
         static $data = array();
 
@@ -158,5 +162,6 @@
      * @return array 店舗基本情報の配列
      */
-    function sfGetBasisDataCache($generate = false){
+    function sfGetBasisDataCache($generate = false)
+    {
         // テーブル名
         $name = 'dtb_baseinfo';
@@ -190,5 +195,6 @@
      * @return bool キャッシュデータファイル生成結果
      */
-    function sfCreateBasisDataCache() {
+    function sfCreateBasisDataCache()
+    {
         // テーブル名
         $name = 'dtb_baseinfo';
@@ -223,5 +229,6 @@
      * @deprecated
      */
-    function sfGetBasisCount() {
+    function sfGetBasisCount()
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -234,5 +241,6 @@
      * @return boolean 有無
      */
-    function sfGetBasisExists() {
+    function sfGetBasisExists()
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -241,5 +249,6 @@
 
     /* 選択中のアイテムのルートカテゴリIDを取得する */
-    function sfGetRootId() {
+    function sfGetRootId()
+    {
 
         if (!$this->g_root_on) {
@@ -277,5 +286,6 @@
      * @return array オーダー前ポイントの配列
      */
-    function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status) {
+    function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $arrRet = $objQuery->select('customer_id', 'dtb_order', 'order_id = ?', array($order_id));
@@ -309,5 +319,6 @@
      * @return array カテゴリツリーの配列
      */
-    function sfGetCatTree($parent_category_id, $count_check = false) {
+    function sfGetCatTree($parent_category_id, $count_check = false)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $col = '';
@@ -355,5 +366,6 @@
      * @see sfGetCatTree()
      */
-    function findTree(&$arrTree, $parent, &$result) {
+    function findTree(&$arrTree, $parent, &$result)
+    {
         if ($result[count($result) - 1]['parent_category_id'] === 0) {
             return;
@@ -379,5 +391,6 @@
      * @return array カテゴリツリーの配列
      */
-    function sfGetMultiCatTree($product_id, $count_check = false) {
+    function sfGetMultiCatTree($product_id, $count_check = false)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $col = '';
@@ -427,5 +440,6 @@
      * @return string 親カテゴリを連結した文字列
      */
-    function sfGetCatCombName($category_id) {
+    function sfGetCatCombName($category_id)
+    {
         // 商品が属するカテゴリIDを縦に取得
         $objQuery =& SC_Query_Ex::getSingletonInstance();
@@ -452,5 +466,6 @@
      * @return array 指定したカテゴリIDのカテゴリ
      */
-    function sfGetCat($category_id) {
+    function sfGetCat($category_id)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -468,5 +483,6 @@
      * @return array 指定したカテゴリIDの大カテゴリ
      */
-    function sfGetFirstCat($category_id) {
+    function sfGetFirstCat($category_id)
+    {
         // 商品が属するカテゴリIDを縦に取得
         $objQuery =& SC_Query_Ex::getSingletonInstance();
@@ -493,5 +509,6 @@
      * @return array カテゴリツリーの配列
      */
-    function sfGetCategoryList($addwhere = '', $products_check = false, $head = CATEGORY_HEAD) {
+    function sfGetCategoryList($addwhere = '', $products_check = false, $head = CATEGORY_HEAD)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $where = 'del_flg = 0';
@@ -532,5 +549,6 @@
      * @return array カテゴリツリーの配列
      */
-    function sfGetLevelCatList($parent_zero = true) {
+    function sfGetLevelCatList($parent_zero = true)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -581,5 +599,6 @@
      *
      */
-    function sfGetCategoryId($product_id, $category_id = 0, $closed = false) {
+    function sfGetCategoryId($product_id, $category_id = 0, $closed = false)
+    {
         if ($closed) {
             $status = '';
@@ -608,5 +627,6 @@
      * @return void
      */
-    function addProductBeforCategories($category_id, $product_id) {
+    function addProductBeforCategories($category_id, $product_id)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -629,5 +649,6 @@
      * @return void
      */
-    function addProductAfterCategories($category_id, $product_id) {
+    function addProductAfterCategories($category_id, $product_id)
+    {
         $sqlval = array('category_id' => $category_id,
                         'product_id' => $product_id);
@@ -661,5 +682,6 @@
      * @return void
      */
-    function removeProductByCategories($category_id, $product_id) {
+    function removeProductByCategories($category_id, $product_id)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $objQuery->delete('dtb_product_categories',
@@ -674,5 +696,6 @@
      * @return void
      */
-    function updateProductCategories($arrCategory_id, $product_id) {
+    function updateProductCategories($arrCategory_id, $product_id)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -707,5 +730,6 @@
      * @return void
      */
-    function sfCountCategory($objQuery = NULL, $is_force_all_count = false) {
+    function sfCountCategory($objQuery = NULL, $is_force_all_count = false)
+    {
         $objProduct = new SC_Product_Ex();
 
@@ -884,5 +908,6 @@
      * @param array 子ID の配列
      */
-    function sfGetChildsID($table, $pid_name, $id_name, $id) {
+    function sfGetChildsID($table, $pid_name, $id_name, $id)
+    {
         $arrRet = $this->sfGetChildrenArray($table, $pid_name, $id_name, $id);
         return $arrRet;
@@ -898,5 +923,6 @@
      * @return array 子IDの配列
      */
-    function sfGetChildrenArray($table, $pid_name, $id_name, $id) {
+    function sfGetChildrenArray($table, $pid_name, $id_name, $id)
+    {
         $arrChildren = array();
         $arrRet = array($id);
@@ -919,5 +945,6 @@
      * @return array 子IDの配列
      */
-    function sfGetChildrenArraySub($table, $pid_name, $id_name, $arrPID) {
+    function sfGetChildrenArraySub($table, $pid_name, $id_name, $arrPID)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
@@ -939,5 +966,6 @@
      * @return array 親IDの配列
      */
-    function sfGetParents($table, $pid_name, $id_name, $id) {
+    function sfGetParents($table, $pid_name, $id_name, $id)
+    {
         $arrRet = SC_Helper_DB_Ex::sfGetParentsArray($table, $pid_name, $id_name, $id);
         return $arrRet;
@@ -953,5 +981,6 @@
      * @return array 親IDの配列
      */
-    function sfGetParentsArray($table, $pid_name, $id_name, $id) {
+    function sfGetParentsArray($table, $pid_name, $id_name, $id)
+    {
         $arrParents = array();
         $ret = $id;
@@ -968,5 +997,6 @@
 
     /* 子ID所属する親IDを取得する */
-    function sfGetParentsArraySub($table, $pid_name, $id_name, $child) {
+    function sfGetParentsArraySub($table, $pid_name, $id_name, $child)
+    {
         if (SC_Utils_Ex::isBlank($child)) {
             return false;
@@ -986,5 +1016,6 @@
      * @return array 商品を検索する場合の配列
      */
-    function sfGetCatWhere($category_id) {
+    function sfGetCatWhere($category_id)
+    {
         // 子カテゴリIDの取得
         $arrRet = SC_Helper_DB_Ex::sfGetChildrenArray('dtb_category', 'parent_category_id', 'category_id', $category_id);
@@ -1005,5 +1036,6 @@
      * @return array SELECT ボックス用リストの配列
      */
-    function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array()) {
+    function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array())
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $col = "$keyname, $valname";
@@ -1030,5 +1062,6 @@
      * @return void
      */
-    function sfRankUp($table, $colname, $id, $andwhere = '') {
+    function sfRankUp($table, $colname, $id, $andwhere = '')
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $objQuery->begin();
@@ -1081,5 +1114,6 @@
      * @return void
      */
-    function sfRankDown($table, $colname, $id, $andwhere = '') {
+    function sfRankDown($table, $colname, $id, $andwhere = '')
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $objQuery->begin();
@@ -1132,5 +1166,6 @@
      * @return void
      */
-    function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = '') {
+    function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = '')
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $objQuery->begin();
@@ -1259,5 +1294,6 @@
      * @return array 特定のカラムの配列
      */
-    function sfGetParentsCol($objQuery, $table, $id_name, $col_name, $arrId) {
+    function sfGetParentsCol($objQuery, $table, $id_name, $col_name, $arrId)
+    {
         $col = $col_name;
         $len = count($arrId);
@@ -1291,5 +1327,6 @@
      * @return void
      */
-    function sfMoveCatRank($objQuery, $table, $id_name, $cat_name, $old_catid, $new_catid, $id) {
+    function sfMoveCatRank($objQuery, $table, $id_name, $cat_name, $old_catid, $new_catid, $id)
+    {
         if ($old_catid == $new_catid) {
             return;
@@ -1330,5 +1367,6 @@
      * @return bool レコードが存在する場合 true
      */
-    function sfIsRecord($table, $col, $arrVal, $addwhere = '') {
+    function sfIsRecord($table, $col, $arrVal, $addwhere = '')
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $arrCol = preg_split('/[, ]/', $col);
@@ -1363,5 +1401,6 @@
      * @return void
      */
-    function sfCountMaker($objQuery) {
+    function sfCountMaker($objQuery)
+    {
         $sql = '';
 
@@ -1387,5 +1426,6 @@
      *
      */
-    function sfGetMakerId($product_id, $maker_id = 0, $closed = false) {
+    function sfGetMakerId($product_id, $maker_id = 0, $closed = false)
+    {
         if ($closed) {
             $status = '';
@@ -1421,5 +1461,6 @@
      * @return array カテゴリツリーの配列
      */
-    function sfGetMakerList($addwhere = '', $products_check = false) {
+    function sfGetMakerList($addwhere = '', $products_check = false)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
         $where = 'del_flg = 0';
@@ -1458,5 +1499,6 @@
      * @return integer 税金額
      */
-    function sfTax($price) {
+    function sfTax($price)
+    {
         // 店舗基本情報を取得
         $CONF = SC_Helper_DB_Ex::sfGetBasisData();
@@ -1472,5 +1514,6 @@
      * @return integer 税金付与した金額
      */
-    function sfCalcIncTax($price, $tax = null, $tax_rule = null) {
+    function sfCalcIncTax($price, $tax = null, $tax_rule = null)
+    {
         // 店舗基本情報を取得
         $CONF = SC_Helper_DB_Ex::sfGetBasisData();
@@ -1488,5 +1531,6 @@
      * @return integer 加算ポイント
      */
-    function sfGetAddPoint($totalpoint, $use_point) {
+    function sfGetAddPoint($totalpoint, $use_point)
+    {
         // 店舗基本情報を取得
         $CONF = SC_Helper_DB_Ex::sfGetBasisData();
@@ -1503,5 +1547,6 @@
      * @return void
      */
-    function sfExecSqlByFile($sqlFilePath) {
+    function sfExecSqlByFile($sqlFilePath)
+    {
         if (file_exists($sqlFilePath)) {
             $objQuery =& SC_Query_Ex::getSingletonInstance();
@@ -1524,5 +1569,6 @@
      * @return bool 商品規格が存在する場合:true, それ以外:false
      */
-    function sfHasProductClass($product_id) {
+    function sfHasProductClass($product_id)
+    {
         if (!SC_Utils_Ex::sfIsInt($product_id)) return false;
 
@@ -1540,5 +1586,6 @@
      * @return void
      */
-    static function registerBasisData($arrData) {
+    static function registerBasisData($arrData)
+    {
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
