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 21563)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_DB.php	(revision 21564)
@@ -853,5 +853,5 @@
         $objQuery =& SC_Query_Ex::getSingletonInstance();
 
-        $where = "$pid_name IN (" . implode(',', array_fill(0, count($arrPID), '?')) . ")";
+        $where = "$pid_name IN (" . SC_Utils_Ex::repeatStrWithSeparator('?', count($arrPID)) . ')';
 
         $return = $objQuery->getCol($id_name, $table, $where, $arrPID);
@@ -921,5 +921,5 @@
         $arrRet = SC_Helper_DB_Ex::sfGetChildrenArray('dtb_category', 'parent_category_id', 'category_id', $category_id);
 
-        $where = 'category_id IN (' . implode(',', array_fill(0, count($arrRet), '?')) . ')';
+        $where = 'category_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', count($arrRet)) . ')';
 
         return array($where, $arrRet);
Index: branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php
===================================================================
--- branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21551)
+++ branches/version-2_12-dev/data/class/helper/SC_Helper_Purchase.php	(revision 21564)
@@ -496,5 +496,5 @@
 
         // 削除されていない支払方法を取得
-        $where = 'del_flg = 0 AND payment_id IN (' . implode(', ', array_pad(array(), count($arrPaymentIds), '?')) . ')';
+        $where = 'del_flg = 0 AND payment_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', count($arrPaymentIds)) . ')';
         $objQuery->setOrder('rank DESC');
         $payments = $objQuery->select('payment_id, payment_method, rule, upper_rule, note, payment_image, charge', 'dtb_payment', $where, $arrPaymentIds);
Index: branches/version-2_12-dev/data/class/SC_Product.php
===================================================================
--- branches/version-2_12-dev/data/class/SC_Product.php	(revision 21527)
+++ branches/version-2_12-dev/data/class/SC_Product.php	(revision 21564)
@@ -173,5 +173,5 @@
         }
 
-        $where = 'alldtl.product_id IN (' . implode(',', array_fill(0, count($arrProductId), '?')) . ')';
+        $where = 'alldtl.product_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', count($arrProductId)) . ')';
         $where .= ' AND alldtl.del_flg = 0';
 
@@ -410,5 +410,5 @@
         }
         $objQuery =& SC_Query_Ex::getSingletonInstance();
-        $where = 'product_id IN (' . implode(', ', array_pad(array(), count($productIds), '?')) . ')';
+        $where = 'product_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', count($productIds)) . ')';
         if (!$has_deleted) {
             $where .= ' AND T1.del_flg = 0';
@@ -443,5 +443,5 @@
         $cols = 'product_id, product_status_id';
         $from = 'dtb_product_status';
-        $where = 'del_flg = 0 AND product_id IN (' . implode(', ', array_pad(array(), count($productIds), '?')) . ')';
+        $where = 'del_flg = 0 AND product_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', count($productIds)) . ')';
         $productStatus = $objQuery->select($cols, $from, $where, $productIds);
         $results = array();
Index: branches/version-2_12-dev/data/class/util/SC_Utils.php
===================================================================
--- branches/version-2_12-dev/data/class/util/SC_Utils.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/util/SC_Utils.php	(revision 21564)
@@ -2192,6 +2192,7 @@
     /**
      * 指定されたパスの配下を再帰的にコピーします.
-     * @param string $imageDir コピー元ディレクトリのパス 
-     * @param string $destDir コピー先ディレクトリのパス 
+     * @param string $imageDir コピー元ディレクトリのパス
+     * @param string $destDir コピー先ディレクトリのパス
+     * @return void
      */
     function copyDirectory($source_path, $dest_path) {
@@ -2199,5 +2200,5 @@
         $handle=opendir($source_path);  
         while ($filename = readdir($handle)) {
-            if($filename === '.' || $filename === '..') continue;
+            if ($filename === '.' || $filename === '..') continue;
             $cur_path = $source_path . $filename;
             $dest_file_path = $dest_path . $filename;
@@ -2205,8 +2206,8 @@
                 // ディレクトリの場合
                 // コピー先に無いディレクトリの場合、ディレクトリ作成.
-                if(!empty($filename) && !file_exists($dest_file_path)) mkdir($dest_file_path);
+                if (!empty($filename) && !file_exists($dest_file_path)) mkdir($dest_file_path);
                 SC_Utils_EX::copyDirectory($cur_path . '/', $dest_file_path . '/');
             } else {
-                if(file_exists($dest_file_path)) unlink($dest_file_path);
+                if (file_exists($dest_file_path)) unlink($dest_file_path);
                 copy($cur_path, $dest_file_path);
             }
@@ -2214,3 +2215,13 @@
     }
 
+    /**
+     * 文字列を区切り文字を挟み反復する
+     * @param string $input 繰り返す文字列。
+     * @param string $multiplier input を繰り返す回数。
+     * @param string $separator 区切り文字
+     * @return string
+     */
+    function repeatStrWithSeparator($input, $multiplier, $separator = ',') {
+        return implode($separator, array_fill(0, $multiplier, $input));
+    }
 }
Index: branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products.php	(revision 21564)
@@ -282,73 +282,76 @@
         $dbFactory = SC_DB_DBFactory_Ex::getInstance();
         switch ($key) {
-        // 商品ID
-        case 'search_product_id':
-            $where .= ' AND product_id = ?';
-            $arrValues[] = sprintf('%d', $objFormParam->getValue($key));
-            break;
-        // 商品コード
-        case 'search_product_code':
-            $where .= ' AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)';
-            $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key));
-            break;
-        // 商品名
-        case 'search_name':
-            $where .= ' AND name LIKE ?';
-            $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key));
-            break;
-        // カテゴリ
-        case 'search_category_id':
-            list($tmp_where, $tmp_Values) = $objDb->sfGetCatWhere($objFormParam->getValue($key));
-            if ($tmp_where != '') {
-                $where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
-                $arrValues = array_merge((array)$arrValues, (array)$tmp_Values);
-            }
-            break;
-        // 種別
-        case 'search_status':
-            $tmp_where = '';
-            foreach ($objFormParam->getValue($key) as $element) {
-                if ($element != '') {
-                    if (SC_Utils_Ex::isBlank($tmp_where)) {
-                        $tmp_where .= ' AND (status = ?';
-                    } else {
-                        $tmp_where .= ' OR status = ?';
+            // 商品ID
+            case 'search_product_id':
+                $where .= ' AND product_id = ?';
+                $arrValues[] = sprintf('%d', $objFormParam->getValue($key));
+                break;
+            // 商品コード
+            case 'search_product_code':
+                $where .= ' AND product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code ILIKE ? GROUP BY product_id)';
+                $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key));
+                break;
+            // 商品名
+            case 'search_name':
+                $where .= ' AND name LIKE ?';
+                $arrValues[] = sprintf('%%%s%%', $objFormParam->getValue($key));
+                break;
+            // カテゴリ
+            case 'search_category_id':
+                list($tmp_where, $tmp_Values) = $objDb->sfGetCatWhere($objFormParam->getValue($key));
+                if ($tmp_where != '') {
+                    $where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
+                    $arrValues = array_merge((array)$arrValues, (array)$tmp_Values);
+                }
+                break;
+            // 種別
+            case 'search_status':
+                $tmp_where = '';
+                foreach ($objFormParam->getValue($key) as $element) {
+                    if ($element != '') {
+                        if (SC_Utils_Ex::isBlank($tmp_where)) {
+                            $tmp_where .= ' AND (status = ?';
+                        } else {
+                            $tmp_where .= ' OR status = ?';
+                        }
+                        $arrValues[] = $element;
                     }
-                    $arrValues[] = $element;
-                }
-            }
-
-            if (!SC_Utils_Ex::isBlank($tmp_where)) {
-                $tmp_where .= ')';
-                $where .= " $tmp_where ";
-            }
-            break;
-        // 登録・更新日(開始)
-        case 'search_startyear':
-            $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_startyear'),
-                                                $objFormParam->getValue('search_startmonth'),
-                                                $objFormParam->getValue('search_startday'));
-            $where.= ' AND update_date >= ?';
-            $arrValues[] = $date;
-            break;
-        // 登録・更新日(終了)
-        case 'search_endyear':
-            $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_endyear'),
-                                                $objFormParam->getValue('search_endmonth'),
-                                                $objFormParam->getValue('search_endday'), true);
-            $where.= ' AND update_date <= ?';
-            $arrValues[] = $date;
-            break;
-        // 商品ステータス
-        case 'search_product_statuses':
-            if (count($objFormParam->getValue($key)) > 0) {
-                $where .= ' AND product_id IN (SELECT product_id FROM dtb_product_status WHERE product_status_id IN (';
-                foreach ($objFormParam->getValue($key) as $param) {
-                    $where .= '?,';
-                    $arrValues[] = $param;
-                }
-                $where = preg_replace("/,$/", "))", $where);
-            }
-            break;
+                }
+
+                if (!SC_Utils_Ex::isBlank($tmp_where)) {
+                    $tmp_where .= ')';
+                    $where .= " $tmp_where ";
+                }
+                break;
+            // 登録・更新日(開始)
+            case 'search_startyear':
+                $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_startyear'),
+                                                    $objFormParam->getValue('search_startmonth'),
+                                                    $objFormParam->getValue('search_startday'));
+                $where.= ' AND update_date >= ?';
+                $arrValues[] = $date;
+                break;
+            // 登録・更新日(終了)
+            case 'search_endyear':
+                $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_endyear'),
+                                                    $objFormParam->getValue('search_endmonth'),
+                                                    $objFormParam->getValue('search_endday'), true);
+                $where.= ' AND update_date <= ?';
+                $arrValues[] = $date;
+                break;
+            // 商品ステータス
+            case 'search_product_statuses':
+                $arrPartVal = $objFormParam->getValue($key);
+                $count = count($arrPartVal);
+                if ($count >= 1) {
+                    $where .= ' '
+                        . 'AND product_id IN ('
+                        . '    SELECT product_id FROM dtb_product_status WHERE product_status_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', $count) . ')'
+                        . ')';
+                    $arrValues = array_merge($arrValues, $arrPartVal);
+                }
+                break;
+            default:
+                break;
         }
     }
Index: branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
===================================================================
--- branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21563)
+++ branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php	(revision 21564)
@@ -785,5 +785,5 @@
         }
         $count = count($arrItems);
-        $where = $tblkey .' IN (' . implode(',', array_fill(0, $count, '?')) . ')';
+        $where = $tblkey .' IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', $count) . ')';
 
         $objQuery =& SC_Query_Ex::getSingletonInstance();
