Changeset 20738


Ignore:
Timestamp:
2011/03/20 10:24:44 (13 years ago)
Author:
kotani
Message:

#1176 (商品登録CSVにて、入力エラーがあった場合に無駄にシーケンス番号が消費される)

  • PHP4でサポートされていない"clone"が使用されているため、r20731 のコミットキャンセル
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php

    r20731 r20738  
    158158    /** 
    159159     * CSVアップロードを実行します. 
    160      *  
     160     * 
    161161     * @return void 
    162162     */ 
     
    196196        $errFlag = false; 
    197197 
    198         $arrTargets = array(); 
    199  
    200198        while (!feof($fp)) { 
    201199            $arrCSV = fgetcsv($fp, CSV_LINE_MAX); 
     
    235233            } 
    236234 
    237             $arrTargets[$line_count] = clone $objFormParam; 
    238         } 
    239         fclose($fp); 
    240  
    241         if (!$errFlag) { 
    242             foreach ($arrTargets as $line_count=>$objFormParam) { 
    243                 $this->lfRegistProduct($objQuery, $line_count, $objFormParam); 
    244                 $arrParam = $objFormParam->getHashArray(); 
    245  
    246                 $this->addRowResult($line_count, "商品ID:".$arrParam['product_id'] . " / 商品名:" . $arrParam['name']); 
    247             } 
     235            $this->lfRegistProduct($objQuery, $line_count, $objFormParam); 
     236            $arrParam = $objFormParam->getHashArray(); 
     237 
     238            $this->addRowResult($line_count, "商品ID:".$arrParam['product_id'] . " / 商品名:" . $arrParam['name']); 
    248239        } 
    249240 
    250241        // 実行結果画面を表示 
    251242        $this->tpl_mainpage = 'products/upload_csv_complete.tpl'; 
     243 
     244        fclose($fp); 
    252245 
    253246        if ($errFlag) { 
Note: See TracChangeset for help on using the changeset viewer.