diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-02 16:58:00 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2008-07-02 16:58:00 +0000 |
commit | 9a3b52a00835411618a6ca1b3859c3121b836e8d (patch) | |
tree | 1829b93ea69b3b4c28f1d9a61552226fa55f78a7 /wp-admin/includes | |
parent | 6d572cbe19ffedb5b92d8528798c5683154bb185 (diff) | |
download | wordpress-mu-9a3b52a00835411618a6ca1b3859c3121b836e8d.tar.gz wordpress-mu-9a3b52a00835411618a6ca1b3859c3121b836e8d.tar.xz wordpress-mu-9a3b52a00835411618a6ca1b3859c3121b836e8d.zip |
Added LOGGED_IN KEY and SALT, fixes #670
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1345 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/includes')
-rw-r--r-- | wp-admin/includes/mu.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/wp-admin/includes/mu.php b/wp-admin/includes/mu.php index 8d7aa1a..03d6c42 100644 --- a/wp-admin/includes/mu.php +++ b/wp-admin/includes/mu.php @@ -631,11 +631,15 @@ remove_action( 'media_buttons', 'media_buttons' ); function secret_salt_warning() { if( !is_site_admin() ) return; - if( !defined( 'SECRET_KEY' ) || !defined( 'SECRET_SALT' ) ) { - $salt1 = wp_generate_password() . wp_generate_password(); - $salt2 = wp_generate_password() . wp_generate_password(); - $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 ); - $msg .= "<blockquote>define('SECRET_KEY', '$salt1');<br />define('SECRET_SALT', '$salt2');</blockquote>"; + $secret_keys = array( 'SECRET_KEY', 'SECRET_SALT', 'LOGGED_IN_KEY', 'LOGGED_IN_SALT' ); + $out = ''; + foreach( $secret_keys as $key ) { + if( !defined( $key ) ) + $out .= "define( '$key', '" . wp_generate_password() . wp_generate_password() . "' );<br />"; + } + if( $out != '' ) { + $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 ); + $msg .= "<blockquote>$out</blockquote>"; echo "<div id='update-nag'>$msg</div>"; } |