Make WordPress Core

Ticket #21728: 21728.patch

File 21728.patch, 4.8 KB (added by SergeyBiryukov, 12 years ago)
  • wp-admin/includes/ms.php

     
    222222
    223223        if ( $current_user->user_email != $_POST['email'] ) {
    224224                if ( !is_email( $_POST['email'] ) ) {
    225                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address isn't correct." ), array( 'form-field' => 'email' ) );
     225                        $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address isn&#8217;t correct." ), array( 'form-field' => 'email' ) );
    226226                        return;
    227227                }
    228228
    229229                if ( $wpdb->get_var( $wpdb->prepare( "SELECT user_email FROM {$wpdb->users} WHERE user_email=%s", $_POST['email'] ) ) ) {
    230                         $errors->add( 'user_email', __( "<strong>ERROR</strong>: The e-mail address is already used." ), array( 'form-field' => 'email' ) );
     230                        $errors->add( 'user_email', __( "<strong>ERROR</strong>: The email address is already used." ), array( 'form-field' => 'email' ) );
    231231                        delete_option( $current_user->ID . '_new_email' );
    232232                        return;
    233233                }
  • wp-admin/includes/user.php

     
    144144        if ( empty( $user->user_email ) ) {
    145145                $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an e-mail address.' ), array( 'form-field' => 'email' ) );
    146146        } elseif ( !is_email( $user->user_email ) ) {
    147                 $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The e-mail address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
     147                $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
    148148        } elseif ( ( $owner_id = email_exists($user->user_email) ) && ( !$update || ( $owner_id != $user->ID ) ) ) {
    149149                $errors->add( 'email_exists', __('<strong>ERROR</strong>: This email is already registered, please choose another one.'), array( 'form-field' => 'email' ) );
    150150        }
  • wp-includes/ms-functions.php

     
    182182
    183183        if ( ! $user ) {
    184184                restore_current_blog();
    185                 return new WP_Error('user_does_not_exist', __('That user does not exist.'));
     185                return new WP_Error( 'user_does_not_exist', __( 'The requested user does not exist.' ) );
    186186        }
    187187
    188188        if ( !get_user_meta($user_id, 'primary_blog', true) ) {
     
    462462                $errors->add('user_name', __('Sorry, usernames must have letters too!'));
    463463
    464464        if ( !is_email( $user_email ) )
    465                 $errors->add('user_email', __( 'Please enter a correct email address.' ) );
     465                $errors->add('user_email', __( 'Please enter a valid email address.' ) );
    466466
    467467        $limited_email_domains = get_site_option( 'limited_email_domains' );
    468468        if ( is_array( $limited_email_domains ) && empty( $limited_email_domains ) == false ) {
     
    553553                $errors->add('blogname', __( 'Please enter a site name.' ) );
    554554
    555555        if ( preg_match( '/[^a-z0-9]+/', $blogname ) )
    556                 $errors->add('blogname', __( 'Only lowercase letters and numbers allowed.' ) );
     556                $errors->add('blogname', __( 'Only lowercase letters (a-z) and numbers are allowed.' ) );
    557557
    558558        if ( in_array( $blogname, $illegal_names ) == true )
    559559                $errors->add('blogname',  __( 'That name is not allowed.' ) );
     
    590590                $path = $base.$blogname.'/';
    591591        }
    592592        if ( domain_exists($mydomain, $path) )
    593                 $errors->add('blogname', __('Sorry, that site already exists!'));
     593                $errors->add( 'blogname', __( 'Sorry, that site already exists!' ) );
    594594
    595595        if ( username_exists( $blogname ) ) {
    596596                if ( is_object( $user ) == false || ( is_object($user) && ( $user->user_login != $blogname ) ) )
     
    956956
    957957        // Check if the domain has been used already. We should return an error message.
    958958        if ( domain_exists($domain, $path, $site_id) )
    959                 return new WP_Error('blog_taken', __('Site already exists.'));
     959                return new WP_Error( 'blog_taken', __( 'Sorry, that site already exists!' ) );
    960960
    961961        if ( !defined('WP_INSTALLING') )
    962962                define( 'WP_INSTALLING', true );
  • wp-login.php

     
    309309                $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
    310310                $sanitized_user_login = '';
    311311        } elseif ( username_exists( $sanitized_user_login ) ) {
    312                 $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered, please choose another one.' ) );
     312                $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
    313313        }
    314314
    315315        // Check the e-mail address