- Timestamp:
- 2007/09/04 13:07:32 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/feature-module-update/data/class/helper/SC_Helper_CSV.php
r15582 r15583 46 46 47 47 $masterData = new SC_DB_MasterData_Ex(); 48 $this->arrPref = $masterData->getMasterData("mtb_pref", 49 array("pref_id", "pref_name", "rank")); 48 50 $this->arrSex = $masterData->getMasterData("mtb_sex"); 49 51 $this->arrDISP = $masterData->getMasterData("mtb_disp"); … … 176 178 177 179 $max = count($list_data); 180 if (!isset($data)) $data = ""; 178 181 for($i = 0; $i < $max; $i++) { 179 182 // 各項目をCSV出力用に変換する。 … … 185 188 // 各項目をCSV出力用に変換する。 186 189 function lfMakeCSV($list) { 187 global $arrPref;188 189 190 $line = ""; 190 191 … … 193 194 switch($key) { 194 195 case 'order_pref': 195 $tmp = $ arrPref[$val];196 $tmp = $this->arrPref[$val]; 196 197 break; 197 198 default: … … 204 205 } 205 206 // 文末の","を変換 206 $line = ereg_replace(",$", "\r\n",$line);207 $line = $this->replaceLineSuffix($line); 207 208 return $line; 208 209 } … … 231 232 } 232 233 // 文末の","を変換 233 $line = ereg_replace(",$", "\r\n",$line);234 $line = $this->replaceLineSuffix($line); 234 235 } 235 236 return $line; … … 262 263 } 263 264 // 文末の","を変換 264 $line = ereg_replace(",$", "\r\n",$line);265 $line = $this->replaceLineSuffix($line); 265 266 return $line; 266 267 } … … 286 287 } 287 288 // 文末の","を変換 288 $line = ereg_replace(",$", "\r\n",$line);289 $line = $this->replaceLineSuffix($line); 289 290 return $line; 291 } 292 293 /** 294 * 行末の ',' を CRLF へ変換する. 295 * 296 * @access private 297 * @param string $line CSV出力用の1行分の文字列 298 * @return string 行末の ',' を CRLF に変換した文字列 299 */ 300 function replaceLineSuffix($line) { 301 return mb_ereg_replace(",$", "\r\n", $line); 290 302 } 291 303
Note: See TracChangeset
for help on using the changeset viewer.