Ticket #18091: 18091.patch
File 18091.patch, 1.3 KB (added by , 13 years ago) |
---|
-
wp-includes/functions.php
843 843 if ( isset( $_COOKIE['wp-settings-' . $user->ID] ) ) { 844 844 $cookie = preg_replace( '/[^A-Za-z0-9=&_]/', '', $_COOKIE['wp-settings-' . $user->ID] ); 845 845 846 if ( ! empty( $cookie ) && strpos( $cookie, '=' ) ) { 847 if ( $cookie == $settings ) 848 return; 846 if ( $cookie == $settings ) 847 return; 849 848 850 851 849 $last_time = (int) get_user_option( 'user-settings-time', $user->ID ); 850 $saved = isset( $_COOKIE['wp-settings-time-' . $user->ID]) ? preg_replace( '/[^0-9]/', '', $_COOKIE['wp-settings-time-' . $user->ID] ) : 0; 852 851 853 if ( $saved > $last_time ) { 854 update_user_option( $user->ID, 'user-settings', $cookie, false ); 855 update_user_option( $user->ID, 'user-settings-time', time() - 5, false ); 856 return; 857 } 852 if ( $saved > $last_time ) { 853 update_user_option( $user->ID, 'user-settings', $cookie, false ); 854 update_user_option( $user->ID, 'user-settings-time', time() - 5, false ); 855 return; 858 856 } 859 857 } 860 858