Changeset 21514 for branches/version-2_12-dev/data/class/SC_FormParam.php
- Timestamp:
- 2012/02/15 19:56:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_FormParam.php
r21480 r21514 66 66 67 67 // パラメーターの追加 68 function addParam($disp_name, $keyname, $length = "", $convert = "", $arrCheck = array(), $default = "", $input_db = 'true') {68 function addParam($disp_name, $keyname, $length = '', $convert = '', $arrCheck = array(), $default = "", $input_db = 'true') { 69 69 $this->disp_name[] = $disp_name; 70 70 $this->keyname[] = $keyname; … … 111 111 $this->html_disp_name[$cnt] = $this->disp_name[$cnt]; 112 112 } 113 if ($this->default[$cnt] != "") {113 if ($this->default[$cnt] != '') { 114 114 $this->html_disp_name[$cnt] .= ' [省略時初期値: ' . $this->default[$cnt] . ']'; 115 115 } … … 133 133 for ($cnt = 0; $cnt < $count; $cnt++) { 134 134 $key = $keyname.$no; 135 if ($arrVal[$cnt][$keyname] != "") {135 if ($arrVal[$cnt][$keyname] != '') { 136 136 $this->setValue($key, $arrVal[$cnt][$keyname]); 137 137 } … … 143 143 144 144 if (!empty($db_date)) { 145 list($y, $m, $d) = preg_split( "/[- ]/", $db_date);145 list($y, $m, $d) = preg_split('/[- ]/', $db_date); 146 146 $this->setValue($year_key, $y); 147 147 $this->setValue($month_key, $m); … … 180 180 foreach ($this->keyname as $val) { 181 181 foreach ($this->arrCheck[$cnt] as $func) { 182 if (!isset($this->param[$cnt])) $this->param[$cnt] = "";182 if (!isset($this->param[$cnt])) $this->param[$cnt] = ''; 183 183 switch ($func) { 184 184 case 'EXIST_CHECK': … … 217 217 // ファイルの存在チェック 218 218 case 'FILE_EXISTS': 219 if ($this->param[$cnt] != ""&& !file_exists($this->check_dir . $this->param[$cnt])) {220 $objErr->arrErr[$val] = "※ " . $this->disp_name[$cnt] . "のファイルが存在しません。<br>";219 if ($this->param[$cnt] != '' && !file_exists($this->check_dir . $this->param[$cnt])) { 220 $objErr->arrErr[$val] = '※ ' . $this->disp_name[$cnt] . 'のファイルが存在しません。<br>'; 221 221 } 222 222 break; 223 223 // ダウンロード用ファイルの存在チェック 224 224 case 'DOWN_FILE_EXISTS': 225 if ($this->param[$cnt] != ""&& !file_exists(DOWN_SAVE_REALDIR . $this->param[$cnt])) {226 $objErr->arrErr[$val] = "※ " . $this->disp_name[$cnt] . "のファイルが存在しません。<br>";225 if ($this->param[$cnt] != '' && !file_exists(DOWN_SAVE_REALDIR . $this->param[$cnt])) { 226 $objErr->arrErr[$val] = '※ ' . $this->disp_name[$cnt] . 'のファイルが存在しません。<br>'; 227 227 } 228 228 break; … … 295 295 $cnt = 0; 296 296 foreach ($this->keyname as $val) { 297 if (!isset($this->param[$cnt])) $this->param[$cnt] = "";297 if (!isset($this->param[$cnt])) $this->param[$cnt] = ''; 298 298 $this->recursionConvParam($this->param[$cnt], $this->convert[$cnt]); 299 299 $cnt++; … … 340 340 foreach ($this->keyname as $val) { 341 341 if ($this->input_db[$cnt]) { 342 $arrRet[$val] = isset($this->param[$cnt]) ? $this->param[$cnt] : "";342 $arrRet[$val] = isset($this->param[$cnt]) ? $this->param[$cnt] : ''; 343 343 } 344 344 $cnt++; … … 383 383 } 384 384 385 if (!isset($this->param[$cnt])) $this->param[$cnt] = "";386 387 if ($this->default[$cnt] != "" && $this->param[$cnt] == "") {385 if (!isset($this->param[$cnt])) $this->param[$cnt] = ''; 386 387 if ($this->default[$cnt] != '' && $this->param[$cnt] == '') { 388 388 $arrRet[$val]['value'] = $this->default[$cnt]; 389 389 } … … 409 409 foreach ($this->keyname as $val) { 410 410 if ($val == $keyname) { 411 $ret = isset($this->param[$cnt]) ? $this->param[$cnt] : "";411 $ret = isset($this->param[$cnt]) ? $this->param[$cnt] : ''; 412 412 break; 413 413 } … … 437 437 if ($val == $keyname) { 438 438 if (isset($this->param[$cnt]) && !is_array($this->param[$cnt])) { 439 $this->param[$cnt] = explode( "-", $this->param[$cnt]);439 $this->param[$cnt] = explode('-', $this->param[$cnt]); 440 440 } 441 441 } … … 453 453 $cnt = 0; 454 454 foreach ($this->keyname as $val) { 455 if (!isset($this->param[$cnt])) $this->param[$cnt] = "";455 if (!isset($this->param[$cnt])) $this->param[$cnt] = ''; 456 456 $this->recursionTrim($this->param[$cnt], $has_wide_space); 457 457 $cnt++; … … 496 496 if (preg_match('/^' . $prefix . '/', $key)) { 497 497 $arrResults[$key] = isset($this->param[$cnt]) 498 ? $this->param[$cnt] : "";498 ? $this->param[$cnt] : ''; 499 499 } 500 500 $cnt++; … … 519 519 } 520 520 521 if (!isset($this->param[$cnt])) $this->param[$cnt] = "";522 523 if ($this->default[$cnt] != "" && $this->param[$cnt] == "") {521 if (!isset($this->param[$cnt])) $this->param[$cnt] = ''; 522 523 if ($this->default[$cnt] != '' && $this->param[$cnt] == '') { 524 524 $arrRet[$cnt]['value'] = $this->default[$cnt]; 525 525 }
Note: See TracChangeset
for help on using the changeset viewer.