Changeset 1345
- Timestamp:
- 07/02/08 16:58:00 (2 months ago)
- Files:
-
- trunk/index-install.php (modified) (1 diff)
- trunk/wp-admin/includes/mu.php (modified) (1 diff)
- trunk/wp-config-sample.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/index-install.php
r1302 r1345 340 340 case "define('SECRET_K": 341 341 case "define('SECRET_S": 342 case "define('LOGGED_I": 342 343 fwrite($handle, str_replace('put your unique phrase here', md5( mt_rand() ) . md5( mt_rand() ), $line)); 343 344 break; trunk/wp-admin/includes/mu.php
r1343 r1345 632 632 if( !is_site_admin() ) 633 633 return; 634 if( !defined( 'SECRET_KEY' ) || !defined( 'SECRET_SALT' ) ) { 635 $salt1 = wp_generate_password() . wp_generate_password(); 636 $salt2 = wp_generate_password() . wp_generate_password(); 637 $msg = sprintf( __( 'Warning! You must define SECRET_KEY and SECRET_SALT in <strong>%swp-config.php</strong><br />Please add the following code before the line, <code>/* That\'s all, stop editing! Happy blogging. */</code>' ), ABSPATH ); 638 $msg .= "<blockquote>define('SECRET_KEY', '$salt1');<br />define('SECRET_SALT', '$salt2');</blockquote>"; 634 $secret_keys = array( 'SECRET_KEY', 'SECRET_SALT', 'LOGGED_IN_KEY', 'LOGGED_IN_SALT' ); 635 $out = ''; 636 foreach( $secret_keys as $key ) { 637 if( !defined( $key ) ) 638 $out .= "define( '$key', '" . wp_generate_password() . wp_generate_password() . "' );<br />"; 639 } 640 if( $out != '' ) { 641 $msg = sprintf( __( 'Warning! WordPress encrypts user cookies, but you must add the following lines to <strong>%swp-config.php</strong> for it to work properly.<br />Please add the code before the line, <code>/* That\'s all, stop editing! Happy blogging. */</code>' ), ABSPATH ); 642 $msg .= "<blockquote>$out</blockquote>"; 639 643 640 644 echo "<div id='update-nag'>$msg</div>"; trunk/wp-config-sample.php
r1328 r1345 14 14 // so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/ 15 15 // to get a secret key generated for you, or just make something up. 16 define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase. 17 define('SECRET_SALT', 'put your unique phrase here'); // Change this to a unique phrase. 16 define('SECRET_KEY', 'put your unique phrase here'); // Change these to unique phrases. 17 define('SECRET_SALT', 'put your unique phrase here'); 18 define('LOGGED_IN_KEY', 'put your unique phrase here'); 19 define('LOGGED_IN_SALT', 'put your unique phrase here'); 18 20 19 21 // double check $base
