Fix some notices in wp-signup.php
git-svn-id: http://svn.automattic.com/wordpress/trunk@13584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
68741b4de7
commit
5e3f09b3ec
|
@ -8,7 +8,7 @@ add_action( 'wp_head', 'signuppageheaders' ) ;
|
||||||
require( 'wp-blog-header.php' );
|
require( 'wp-blog-header.php' );
|
||||||
require_once( ABSPATH . WPINC . '/registration.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}" );
|
wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -233,6 +233,9 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
|
||||||
$signup[ esc_html( $_POST[ 'signup_for' ] ) ] = 'checked="checked"';
|
$signup[ esc_html( $_POST[ 'signup_for' ] ) ] = 'checked="checked"';
|
||||||
else
|
else
|
||||||
$signup[ 'blog' ] = 'checked="checked"';
|
$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
|
// allow definition of default variables
|
||||||
$filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors ));
|
$filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors ));
|
||||||
|
@ -393,7 +396,8 @@ if ( $active_signup == "none" ) {
|
||||||
$login_url = site_url( 'wp-login.php?redirect_to=' . urlencode($proto . $_SERVER['HTTP_HOST'] . '/wp-signup.php' ));
|
$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 );
|
echo sprintf( __( "You must first <a href=\"%s\">login</a>, and then you can create a new site."), $login_url );
|
||||||
} else {
|
} else {
|
||||||
switch ($_POST['stage']) {
|
$stage = isset( $_POST['stage'] ) ? $_POST['stage'] : 'default';
|
||||||
|
switch ( $stage ) {
|
||||||
case 'validate-user-signup' :
|
case 'validate-user-signup' :
|
||||||
if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
|
if ( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' )
|
||||||
validate_user_signup();
|
validate_user_signup();
|
||||||
|
@ -409,8 +413,9 @@ if ( $active_signup == "none" ) {
|
||||||
case 'gimmeanotherblog':
|
case 'gimmeanotherblog':
|
||||||
validate_another_blog_signup();
|
validate_another_blog_signup();
|
||||||
break;
|
break;
|
||||||
|
case 'default':
|
||||||
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?
|
do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere?
|
||||||
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
|
if ( is_user_logged_in() && ( $active_signup == 'all' || $active_signup == 'blog' ) )
|
||||||
signup_another_blog($newblogname);
|
signup_another_blog($newblogname);
|
||||||
|
|
Loading…
Reference in New Issue