Changeset 13026 for trunk/wp-admin/setup-config.php
- Timestamp:
- 02/08/2010 06:15:44 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/setup-config.php
r12939 r13026 169 169 wp_die($wpdb->error->get_error_message()); 170 170 171 require_once( ABSPATH . WPINC . '/plugin.php' ); 172 require_once( ABSPATH . WPINC . '/http.php' ); 173 wp_fix_server_vars(); 174 /**#@+ 175 * @ignore 176 */ 177 function get_bloginfo() { 178 return 'http://' . $_SERVER['HTTP_HOST'] . str_replace( $_SERVER['PHP_SELF'], '/wp-admin/setup-config.php', '' ); 179 } 180 /**#@-*/ 181 182 $secret_keys = wp_remote_get( 'https://api.wordpress.org/secret-key/1.1/?salt=1' ); 183 if ( is_wp_error( $secret_keys ) ) 184 $secret_keys = false; 185 else 186 $secret_keys = explode( "\n", wp_remote_retrieve_body( $secret_keys ) ); 187 $key = 0; 188 171 189 foreach ($configFile as $line_num => $line) { 172 190 switch (substr($line,0,16)) { … … 185 203 case '$table_prefix =': 186 204 $configFile[$line_num] = str_replace('wp_', $prefix, $line); 205 break; 206 case "define('AUTH_KEY": 207 case "define('SECURE_A": 208 case "define('LOGGED_I": 209 case "define('NONCE_KE": 210 case "define('AUTH_SAL": 211 case "define('SECURE_A": 212 case "define('LOGGED_I": 213 case "define('NONCE_SA": 214 if ( $secret_keys ) 215 $configFile[$line_num] = str_replace('put your unique phrase here', substr( $secret_keys[$key++], 27, 64 ), $line ); 187 216 break; 188 217 }
Note: See TracChangeset
for help on using the changeset viewer.