Changeset 1763
- Timestamp:
- 09/30/2008 04:37:18 PM (2 months ago)
- Files:
-
- trunk/scripts/settings.class.php (modified) (2 diffs)
- trunk/scripts/update/102To110.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/scripts/settings.class.php
r1762 r1763 494 494 // string values 495 495 else { 496 $output = ' "' . $this->escapeForPhp($value) . '"';496 $output = '\'' . $this->escapeForPhp($value) . '\''; 497 497 } 498 $file_content .= 'define(\'' . $key . '\', \'' . $output . '\');' . PHP_EOL; 498 $key = '\'' . $this->escapeForPhp(strtoupper($key)) . '\''; 499 $file_content .= 'define(' . $key . ', ' . $output . ');' . PHP_EOL; 499 500 } 500 501 … … 522 523 function escapeForPhp($value) { 523 524 $value = str_replace('\\', '\\\\', $value); 525 $value = str_replace("'", "\'", $value); 524 526 $value = str_replace("\0", '', $value); 527 $value = str_replace("\r\n", "'.chr(13).chr(10).'", $value); 525 528 $value = str_replace("\r", "'.chr(13).'", $value); 526 529 $value = str_replace("\n", "'.chr(10).'", $value); 527 $value = str_replace("'", "\'", $value);528 530 return $value; 529 531 } trunk/scripts/update/102To110.php
r1762 r1763 37 37 // read current settings from environment and POSTed data 38 38 $update = new Settings($l); 39 $update-> getDataByConstants();39 $update->importDataByConstants(); 40 40 41 41 // convert all settings to utf8
