Changeset 20368
- Timestamp:
- 2011/02/24 10:30:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
r20346 r20368 110 110 $this->arrInfo = $this->objDb->sfGetBasisData(); 111 111 // CSV管理ヘルパー 112 $ this->objCSV = new SC_Helper_CSV_Ex();112 $objCSV = new SC_Helper_CSV_Ex(); 113 113 // CSV構造読み込み 114 $arrCSVFrame = $ this->objCSV->sfGetCsvOutput($this->csv_id);114 $arrCSVFrame = $objCSV->sfGetCsvOutput($this->csv_id); 115 115 116 116 // CSV構造がインポート可能かのチェック 117 if( !$this->objCSV->sfIsImportCSVFrame($arrCSVFrame) ) {117 if(!$objCSV->sfIsImportCSVFrame($arrCSVFrame) ) { 118 118 // 無効なフォーマットなので初期状態に強制変更 119 $arrCSVFrame = $ this->objCSV->sfGetCsvOutput($this->csv_id, '', array(), 'no');119 $arrCSVFrame = $objCSV->sfGetCsvOutput($this->csv_id, '', array(), 'no'); 120 120 $this->tpl_is_format_default = true; 121 121 } 122 122 // CSV構造は更新可能なフォーマットかのフラグ取得 123 $this->tpl_is_update = $ this->objCSV->sfIsUpdateCSVFrame($arrCSVFrame);123 $this->tpl_is_update = $objCSV->sfIsUpdateCSVFrame($arrCSVFrame); 124 124 125 125 // CSVファイルアップロード情報の初期化 … … 196 196 $err = false; 197 197 198 // レコード行数を得る199 $record_count = $this->objCSV->sfGetCSVRecordCount($fp);200 // ファイルが無効な場合はエラー201 if($record_count === FALSE) {202 SC_Utils_Ex::sfDispError("");203 }204 205 198 // 登録対象の列数 206 199 $col_max_count = $this->objFormParam->getCount(); … … 226 219 } 227 220 // 列数が異なる場合はエラー 221 $col_count = count($arrCSV); 228 222 if ($col_max_count != count($arrCSV)) { 223 $this->addRowErr($line_count, "※ 項目数が" . $col_count . "個検出されました。項目数は" . $col_max_count . "個になります。"); 229 224 $errFlag = true; 230 225 break;
Note: See TracChangeset
for help on using the changeset viewer.