<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14575] trunk/wp-signup.php: signup cleanup, props ocean90, fixes #13087</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14575">14575</a></dd>
<dt>Author</dt> <dd>wpmuguru</dd>
<dt>Date</dt> <dd>2010-05-12 00:45:01 +0000 (Wed, 12 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>signup cleanup, props ocean90, fixes <a href="http://trac.wordpress.org/ticket/13087">#13087</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpsignupphp">trunk/wp-signup.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpsignupphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-signup.php (14574 => 14575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-signup.php        2010-05-11 23:58:26 UTC (rev 14574)
+++ trunk/wp-signup.php        2010-05-12 00:45:01 UTC (rev 14575)
</span><span class="lines">@@ -9,7 +9,7 @@
</span><span class="cx"> require_once( ABSPATH . WPINC . '/registration.php' );
</span><span class="cx">
</span><span class="cx"> if ( is_array( get_site_option( 'illegal_names' )) && isset( $_GET[ 'new' ] ) && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
</span><del>-        wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
</del><ins>+        wp_redirect( network_home_url() );
</ins><span class="cx">         die();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -28,10 +28,13 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( !is_main_site() ) {
</span><del>-        wp_redirect( "http://" . $current_site->domain . $current_site->path . "wp-signup.php" );
</del><ins>+        wp_redirect( network_home_url( 'wp-signup.php' ) );
</ins><span class="cx">         die();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+// Fix for page title
+$wp_query->is_404 = false;
+
</ins><span class="cx"> function wpmu_signup_stylesheet() {
</span><span class="cx">         ?>
</span><span class="cx">         <style type="text/css">
</span><span class="lines">@@ -75,7 +78,7 @@
</span><span class="cx">         if ( !is_subdomain_install() )
</span><span class="cx">                 echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="50" /><br />';
</span><span class="cx">         else
</span><del>-                echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
</del><ins>+                echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . '</span><br />';
</ins><span class="cx">
</span><span class="cx">         if ( !is_user_logged_in() ) {
</span><span class="cx">                 print '(<strong>' . __( 'Your address will be ' );
</span><span class="lines">@@ -83,7 +86,7 @@
</span><span class="cx">                         print $current_site->domain . $current_site->path . __( 'sitename' );
</span><span class="cx">                 else
</span><span class="cx">                         print __( 'domain.' ) . $current_site->domain . $current_site->path;
</span><del>-                echo '.</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
</del><ins>+                echo '.)</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         // Blog Title
</span><span class="lines">@@ -98,7 +101,7 @@
</span><span class="cx">         <div id="privacy">
</span><span class="cx"> <p class="privacy-intro">
</span><span class="cx"> <label for="blog_public_on"><?php _e('Privacy:') ?></label>
</span><del>- <?php _e('I would like my site to appear in search engines like Google and Technorati, and in public listings around this network.'); ?>
</del><ins>+ <?php _e('Allow my site to appear in search engines like Google, Technorati, and in public listings around this network.'); ?>
</ins><span class="cx"> <div style="clear:both;"></div>
</span><span class="cx"> <label class="checkbox" for="blog_public_on">
</span><span class="cx"> <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if ( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
</span><span class="lines">@@ -137,7 +140,7 @@
</span><span class="cx">         <?php if ( $errmsg = $errors->get_error_message('user_email') ) { ?>
</span><span class="cx">                 <p class="error"><?php echo $errmsg ?></p>
</span><span class="cx">         <?php } ?>
</span><del>-        <input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('(We&#8217;ll send your password to this address, so <strong>triple-check it</strong>.)') ?>
</del><ins>+        <input name="user_email" type="text" id="user_email" value="<?php echo esc_attr($user_email) ?>" maxlength="200" /><br /><?php _e('We send your registration email to this address. (Double-check your email address before continuing.)') ?>
</ins><span class="cx">         <?php
</span><span class="cx">         if ( $errmsg = $errors->get_error_message('generic') ) {
</span><span class="cx">                 echo '<p class="error">' . $errmsg . '</p>';
</span><span class="lines">@@ -177,7 +180,8 @@
</span><span class="cx">                         <?php _e( 'Sites you are already a member of:' ) ?>
</span><span class="cx">                         <ul>
</span><span class="cx">                                 <?php foreach ( $blogs as $blog ) {
</span><del>-                                        echo "<li><a href='http://" . $blog->domain . $blog->path . "'>" . $blog->domain . $blog->path . "</a></li>";
</del><ins>+                                        $home_url = get_home_url( $blog->userblog_id );
+                                        echo '<li><a href="' . esc_url( $home_url ) . '">' . $home_url . '</a></li>';
</ins><span class="cx">                                 } ?>
</span><span class="cx">                         </ul>
</span><span class="cx">                 </p>
</span><span class="lines">@@ -360,15 +364,15 @@
</span><span class="cx">         <h2><?php printf( __( 'Congratulations! Your new site, %s, is almost ready.' ), "<a href='http://{$domain}{$path}'>{$blog_title}</a>" ) ?></h2>
</span><span class="cx">
</span><span class="cx">         <p><?php _e( 'But, before you can start using your site, <strong>you must activate it</strong>.' ) ?></p>
</span><del>-        <p><?php printf( __( 'Check your inbox at <strong>%s</strong> and click the link given. It should arrive within 30 minutes.' ), $user_email) ?></p>
</del><ins>+        <p><?php printf( __( 'Check your inbox at <strong>%s</strong> and click the link given.' ), $user_email) ?></p>
</ins><span class="cx">         <p><?php _e( 'If you do not activate your site within two days, you will have to sign up again.' ); ?></p>
</span><span class="cx">         <h2><?php _e( 'Still waiting for your email?' ); ?></h2>
</span><span class="cx">         <p>
</span><span class="cx">                 <?php _e( 'If you haven&#8217;t received your email yet, there are a number of things you can do:' ) ?>
</span><span class="cx">                 <ul id="noemail-tips">
</span><del>-                        <li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ) ?></strong></p></li>
-                        <li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ) ?></p></li>
-                        <li><?php printf( __( 'Have you entered your email correctly? We think it&#8217;s %s but if you have entered it incorrectly, you will not receive it.' ), $user_email ) ?></li>
</del><ins>+                        <li><p><strong><?php _e( 'Wait a little longer. Sometimes delivery of email can be delayed by processes outside of our control.' ) ?></strong></p></li>
+                        <li><p><?php _e( 'Check the junk or spam folder of your email client. Sometime emails wind up there by mistake.' ) ?></p></li>
+                        <li><?php printf( __( 'Have you entered your email correctly? You have entered %s, if it&#8217;s incorrect, you will not receive your email.' ), $user_email ) ?></li>
</ins><span class="cx">                 </ul>
</span><span class="cx">         </p>
</span><span class="cx">         <?php
</span><span class="lines">@@ -383,7 +387,7 @@
</span><span class="cx"> $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user"
</span><span class="cx">
</span><span class="cx"> if ( is_super_admin() )
</span><del>-        echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="wp-admin/ms-options.php">Options page</a>.' ), $active_signup ) . '</div>';
</del><ins>+        echo '<div class="mu_alert">' . sprintf( __( 'Greetings Site Administrator! You are currently allowing &#8220;%s&#8221; registrations. To change or disable registration go to your <a href="%s">Options page</a>.' ), $active_signup, esc_url( network_admin_url( 'ms-options.php' ) ) ) . '</div>';
</ins><span class="cx">
</span><span class="cx"> $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null;
</span><span class="cx">
</span><span class="lines">@@ -424,7 +428,7 @@
</span><span class="cx">                         elseif ( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) )
</span><span class="cx">                                 signup_user( $newblogname, $user_email );
</span><span class="cx">                         elseif ( is_user_logged_in() == false && ( $active_signup == 'blog' ) )
</span><del>-                                _e( 'We are sorry. We are not accepting new registrations at this time.' );
</del><ins>+                                _e( 'Sorry, new registrations are not allowed at this time.' );
</ins><span class="cx">                         else
</span><span class="cx">                                 _e( 'You are logged in already. No need to register again!' );
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>