Skip to content

Commit

Permalink
Fix some notices in wp-signup.php
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.automattic.com/wordpress/trunk@13584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
westi committed Mar 4, 2010
1 parent 68741b4 commit 5e3f09b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions wp-signup.php
Expand Up @@ -8,7 +8,7 @@
require( 'wp-blog-header.php' );
require_once( ABSPATH . WPINC . '/registration.php' );

if ( is_array( get_site_option( 'illegal_names' )) && $_GET[ 'new' ] != '' && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
die();
}
Expand Down Expand Up @@ -233,6 +233,9 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
$signup[ esc_html( $_POST[ 'signup_for' ] ) ] = 'checked="checked"';
else
$signup[ 'blog' ] = 'checked="checked"';

//TODO - This doesn't seem to do anything do we really need it?
$signup['user'] = isset( $signup['user'] ) ? $signup['user'] : '';

// allow definition of default variables
$filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors ));
Expand Down Expand Up @@ -393,7 +396,8 @@ function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . '/wp-signup.php' ));
echo sprintf( __( "You must first <a href=\"%s\">login</a>, and then you can create a new site."), $login_url );
} else {
switch ($_POST['stage']) {
$stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default';
switch ( $stage ) {
case 'validate-user-signup' :
if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
validate_user_signup();
Expand All @@ -409,8 +413,9 @@ function confirm_blog_signup($domain, $path, $blog_title, $user_name = '', $user
case 'gimmeanotherblog':
validate_another_blog_signup();
break;
case 'default':
default :
$user_email = $_POST[ 'user_email' ];
$user_email = isset( $_POST[ 'user_email' ] ) ? $_POST[ 'user_email' ] : '';
do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
signup_another_blog($newblogname);
Expand Down

0 comments on commit 5e3f09b

Please sign in to comment.