Don't check blog options for user-settings

git-svn-id: https://develop.svn.wordpress.org/trunk@10060 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-12-05 06:08:46 +00:00
parent 7c243ba2b7
commit fee741345b

View File

@ -674,7 +674,7 @@ function wp_user_settings() {
if ( ! $user = wp_get_current_user() ) if ( ! $user = wp_get_current_user() )
return; return;
$settings = get_user_option( 'user-settings', $user->ID ); $settings = get_user_option( 'user-settings', $user->ID, false );
if ( isset($_COOKIE['wp-settings-'.$user->ID]) ) { if ( isset($_COOKIE['wp-settings-'.$user->ID]) ) {
$cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-'.$user->ID] ); $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-'.$user->ID] );
@ -683,7 +683,7 @@ function wp_user_settings() {
if ( $cookie == $settings ) if ( $cookie == $settings )
return; return;
$last_time = (int) get_user_option( 'user-settings-time', $user->ID ); $last_time = (int) get_user_option( 'user-settings-time', $user->ID, false );
$saved = isset($_COOKIE['wp-settings-time-'.$user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-'.$user->ID] ) : 0; $saved = isset($_COOKIE['wp-settings-time-'.$user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-'.$user->ID] ) : 0;
if ( $saved > $last_time ) { if ( $saved > $last_time ) {