Changeset 21739 for branches/3.4/wp-admin/setup-config.php
- Timestamp:
- 09/04/2012 08:31:14 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.4/wp-admin/setup-config.php
r20661 r21739 45 45 require(ABSPATH . WPINC . '/version.php'); 46 46 47 // Also loads functions.php, plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php)48 wp_load_translations_early();49 50 47 // Check for the required PHP version and for the MySQL extension or a database drop-in. 51 48 wp_check_php_mysql_versions(); 49 50 require_once(ABSPATH . WPINC . '/functions.php'); 51 52 // Also loads plugin.php, l10n.php, pomo/mo.php (all required by setup-config.php) 53 wp_load_translations_early(); 52 54 53 55 // Turn register_globals off. … … 218 220 219 221 $key = 0; 220 foreach ( $config_file as &$line ) { 222 // Not a PHP5-style by-reference foreach, as this file must be parseable by PHP4. 223 foreach ( $config_file as $line_num => $line ) { 221 224 if ( '$table_prefix =' == substr( $line, 0, 16 ) ) { 222 $ line= '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n";225 $config_file[ $line_num ] = '$table_prefix = \'' . addcslashes( $prefix, "\\'" ) . "';\r\n"; 223 226 continue; 224 227 } … … 235 238 case 'DB_PASSWORD' : 236 239 case 'DB_HOST' : 237 $ line= "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n";240 $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . addcslashes( constant( $constant ), "\\'" ) . "');\r\n"; 238 241 break; 239 242 case 'AUTH_KEY' : … … 245 248 case 'LOGGED_IN_SALT' : 246 249 case 'NONCE_SALT' : 247 $ line= "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n";250 $config_file[ $line_num ] = "define('" . $constant . "'," . $padding . "'" . $secret_keys[$key++] . "');\r\n"; 248 251 break; 249 252 }
Note: See TracChangeset
for help on using the changeset viewer.