Remove wp-register.php.

* Don't remove it on update. If you have it now, you'll keep it. New installs won't get it.
 * Peform a redirect using rewrite + canonical to the new location, if the file doesn't exist.
props SergeyBiryukov.
fixes #18544.


git-svn-id: http://svn.automattic.com/wordpress/trunk@20596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-04-25 20:49:57 +00:00
parent 54a1ee90b9
commit 548baad816
4 changed files with 11 additions and 15 deletions

View File

@ -277,6 +277,15 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
$redirect['path'] = trailingslashit($redirect['path']) . $addl_path;
$redirect_url = $redirect['scheme'] . '://' . $redirect['host'] . $redirect['path'];
}
if ( 'wp-register.php' == basename( $redirect['path'] ) ) {
if ( is_multisite() )
$redirect_url = apply_filters( 'wp_signup_location', site_url( 'wp-signup.php' ) );
else
$redirect_url = site_url( 'wp-login.php?action=register' );
wp_redirect( $redirect_url, 301 );
die();
}
}
// tack on any additional query vars

View File

@ -1534,6 +1534,7 @@ class WP_Rewrite {
$registration_pages['.*wp-signup.php$'] = $this->index . '?signup=true';
$registration_pages['.*wp-activate.php$'] = $this->index . '?activate=true';
}
$registration_pages['.*wp-register.php$'] = $this->index . '?register=true'; // Deprecated
// Post
$post_rewrite = $this->generate_rewrite_rules( $this->permalink_structure, EP_PERMALINK, false, true, false, false );

View File

@ -11,7 +11,7 @@ $wp_version = '3.4-beta3-20587';
*
* @global int $wp_db_version
*/
$wp_db_version = 20148;
$wp_db_version = 20596;
/**
* Holds the TinyMCE version

View File

@ -1,14 +0,0 @@
<?php
/**
* Used to be the page which displayed the registration form.
*
* This file is no longer used in WordPress and is
* deprecated.
*
* @package WordPress
* @deprecated Use wp_register() to create a registration link instead
*/
require('./wp-load.php');
wp_redirect( site_url('wp-login.php?action=register') );
exit;