summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-20 17:40:39 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2006-06-20 17:40:39 +0000
commit8fa5ef02569b5b763f886e1bd96d2268639eaea8 (patch)
tree6170a7d9c37c406ebeeb64b9015c474c86d0a13a
parent47a26a806ec364dc7598422f717259ba314116f5 (diff)
Use VHOST to decide what urls to print
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@585 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-inst/wp-includes/wpmu-functions.php9
-rw-r--r--wp-inst/wp-signup.php18
2 files changed, 20 insertions, 7 deletions
diff --git a/wp-inst/wp-includes/wpmu-functions.php b/wp-inst/wp-includes/wpmu-functions.php
index dc87ab7..e779a12 100644
--- a/wp-inst/wp-includes/wpmu-functions.php
+++ b/wp-inst/wp-includes/wpmu-functions.php
@@ -1021,10 +1021,15 @@ function wpmu_signup_user($user, $user_email, $meta = '') {
// Notify user of signup success.
function wpmu_signup_blog_notification($domain, $path, $title, $user, $user_email, $key, $meta = '') {
+ global $current_site;
// Send email with activation link.
+ if( constant( "VHOST" ) == 'no' ) {
+ $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key";
+ } else {
+ $activate_url = "http://{$domain}{$path}/wp-activate.php?key=$key";
+ }
$message_headers = 'From: ' . stripslashes($title) . ' <support@' . $_SERVER[ 'SERVER_NAME' ] . '>';
- $message = sprintf(__("To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s"),
- "http://$domain/wp-activate.php?key=$key", "http://$domain");
+ $message = sprintf(__("To activate your blog, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your blog here:\n\n%s"), $activate_url, "http://$domain");
// TODO: Don't hard code activation link.
$subject = sprintf(__('Activate %s'), $domain);
wp_mail($user_email, $subject, $message, $message_headers);
diff --git a/wp-inst/wp-signup.php b/wp-inst/wp-signup.php
index a8714dc..636b9ba 100644
--- a/wp-inst/wp-signup.php
+++ b/wp-inst/wp-signup.php
@@ -36,10 +36,18 @@ function show_blog_form($blog_id = '', $blog_title = '', $errors = '') {
echo '<th valign="top">' . __('Blog Domain:') . '</th><td>';
if ( $errmsg = $errors->get_error_message('blog_id') ) {
-?><p><strong><?php echo $errmsg ?></strong></p><?php
+ ?><p><strong><?php echo $errmsg ?></strong></p><?php
+ }
+ print '<input name="blog_id" type="text" id="blog_id" value="'.$blog_id.'" maxlength="50" style="width:40%; text-align: right; font-size: 30px;" /><span style="font-size: 30px">.' . $current_site->domain . $current_site->path . '</span><br />';
+ if ( !is_user_logged_in() ) {
+ print '(<strong>Your address will be ';
+ if( constant( "VHOST" == 'no' ) ) {
+ print $current_site->domain . $current_site->path . 'blogname';
+ } else {
+ print 'domain.' . $current_site->domain . $current_site->path;
+ }
+ print '.</strong> Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)</td> </tr>';
}
- print '<input name="blog_id" type="text" id="blog_id" value="'.$blog_id.'" maxlength="50" style="width:40%; text-align: right; font-size: 30px;" /><span style="font-size: 30px">.' . $current_site->domain . '</span><br />';
- if ( !is_user_logged_in() ) print '(<strong>Your address will be domain.' . $current_site->domain . '.</strong> Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)</td> </tr>';
// Blog Title
if ( $errors->get_error_message('blog_title')) {
@@ -84,7 +92,7 @@ function show_user_form($user_name = '', $user_email = '', $errors = '') {
echo '<th valign="top">' . __('Username:') . '</th><td>';
if ( $errmsg = $errors->get_error_message('user_name') ) {
-?><p><strong><?php echo $errmsg ?></strong></p><?php
+ ?><p><strong><?php echo $errmsg ?></strong></p><?php
}
print '<input name="user_name" type="text" id="user_name" value="'.$user_name.'" maxlength="50" style="width:50%; font-size: 30px;" /><br />';
@@ -136,7 +144,7 @@ function signup_another_blog($blog_id = '', $blog_title = '', $errors = '') {
if ( ! empty($blogs) ) foreach ( $blogs as $blog ) {
$display = str_replace(".$domain", '', $blog->domain);
- echo "<li><a href='https://$blog->domain/'>$display</a></li>";
+ echo "<li><a href='http://$blog->domain'>$display</a></li>";
}
?>
</ul>