Make WordPress Core

Ticket #25779: 25779.2.patch

File 25779.2.patch, 2.3 KB (added by SergeyBiryukov, 12 years ago)

Fixed a typo

  • src/wp-admin/includes/ms.php

     
    756756        $super_admins = get_site_option( 'site_admins', array( 'admin' ) );
    757757
    758758        $user = get_userdata( $user_id );
    759         if ( $user && $user->user_email != get_site_option( 'admin_email' ) ) {
     759        if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
    760760                if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
    761761                        unset( $super_admins[$key] );
    762762                        update_site_option( 'site_admins', $super_admins );
  • src/wp-includes/pluggable.php

     
    11371137        $post = get_post($comment->comment_post_ID);
    11381138        $user = get_userdata( $post->post_author );
    11391139        // Send to the administration and to the post author if the author can modify the comment.
    1140         $emails = array( get_option('admin_email') );
    1141         if ( user_can($user->ID, 'edit_comment', $comment_id) && !empty($user->user_email) && ( get_option('admin_email') != $user->user_email) )
    1142                 $emails[] = $user->user_email;
     1140        $emails = array( get_option( 'admin_email' ) );
     1141        if ( user_can( $user->ID, 'edit_comment', $comment_id ) && ! empty( $user->user_email ) ) {
     1142                if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) )
     1143                        $emails[] = $user->user_email;
     1144        }
    11431145
    11441146        $comment_author_domain = @gethostbyaddr($comment->comment_author_IP);
    11451147        $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'");
     
    12131215function wp_password_change_notification(&$user) {
    12141216        // send a copy of password change notification to the admin
    12151217        // but check to see if it's the admin whose password we're changing, and skip this
    1216         if ( $user->user_email != get_option('admin_email') ) {
     1218        if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
    12171219                $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
    12181220                // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    12191221                // we want to reverse this for the plain text arena of emails.