Changeset 593
- Timestamp:
- 06/23/06 15:55:37 (2 years ago)
- Files:
-
- trunk/wp-activate.php (modified) (1 diff)
- trunk/wp-includes/wpmu-functions.php (modified) (2 diffs)
- trunk/wpmu-settings.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-activate.php
r591 r593 69 69 </tr> 70 70 </table> 71 <h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, 'http://' . $ _SERVER[ 'SERVER_NAME' ] . '/' ); ?></h3>71 <h3 class="view"><?php printf(__('<a href="%1$s">View your site</a> or <a href="%2$s">Login</a>'), $url, 'http://' . $url . '/wp-login.php' ); ?></h3> 72 72 <?php 73 73 } trunk/wp-includes/wpmu-functions.php
r589 r593 1027 1027 $activate_url = "http://" . $current_site->domain . $current_site->path . "wp-activate.php?key=$key"; 1028 1028 } else { 1029 $activate_url = "http://{$domain}{$path} /wp-activate.php?key=$key";1029 $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; 1030 1030 } 1031 1031 $message_headers = 'From: ' . stripslashes($title) . ' <support@' . $_SERVER[ 'SERVER_NAME' ] . '>'; 1032 $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.$path");1032 $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}{$path}"); 1033 1033 // TODO: Don't hard code activation link. 1034 1034 $subject = sprintf(__('Activate %s'), $domain.$path); … … 1039 1039 // Send email with activation link. 1040 1040 $message_headers = 'From: ' . stripslashes($user) . ' <support@' . $_SERVER[ 'SERVER_NAME' ] . '>'; 1041 $message = sprintf(__("To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), 1042 "http://{$_SERVER[ 'SERVER_NAME' ]}/wp-activate.php?key=$key", "http://{$_SERVER[ 'SERVER_NAME' ]}"); 1041 $message = sprintf(__("To activate your user, please click the following link:\n\n%s\n\nAfter you activate, you will receive *another email* with your login.\n\n"), "http://{$_SERVER[ 'SERVER_NAME' ]}/wp-activate.php?key=$key" ); 1043 1042 // TODO: Don't hard code activation link. 1044 1043 $subject = sprintf(__('Activate %s'), $user); trunk/wpmu-settings.php
r591 r593 16 16 $wpdb->hide_errors(); 17 17 18 #$sites = $wpdb->get_results( "SELECT * FROM $wpdb->site" ); 19 #if( count( $sites ) == 1 ) { 20 #$current_site = $sites[0]; 21 #} 22 23 if( isset( $current_site ) == false ) { 24 $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) ); 25 if( constant( 'VHOST' ) == 'yes' ) { 26 $sitedomain = substr( $domain, 1 + strpos( $domain, '.' ) ); 27 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$sitedomain' AND path='$path'" ); 28 if( $current_site == null ) { 29 $path = '/'; 30 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$sitedomain' AND path='$path'" ); 31 if( $current_site == null && defined( "WP_INSTALLING" ) == false ) 32 die( "No WPMU site defined on this host." ); 33 } 34 } else { 35 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$domain' AND path='$path'" ); 36 if( $current_site == null ) { 37 $path = '/'; 38 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$domain' AND path='$path'" ); 39 if( $current_site == null && defined( "WP_INSTALLING" ) == false ) 40 die( "No WPMU site defined on this host." ); 41 } 42 } 43 } 44 45 18 46 // Get site and blog details 19 47 if( defined( "WP_INSTALLING" ) == false ) { … … 23 51 $current_site = $wpdb->get_row("SELECT * FROM $wpdb->site WHERE id='{$current_blog->site_id}'"); 24 52 } else { 25 $path = substr( $_SERVER[ 'REQUEST_URI' ], 0, 1 + strpos( $_SERVER[ 'REQUEST_URI' ], '/', 1 ) ); 26 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$domain' AND path='$path'" ); 27 if( $current_site == null ) { 28 $path = '/'; 29 $current_site = $wpdb->get_row( "SELECT * FROM $wpdb->site WHERE domain = '$domain' AND path='$path'" ); 30 if( $current_site == null ) 31 die( "No WPMU site defined on this host." ); 32 } 33 $blogname = htmlspecialchars( str_replace( $path, '', $_SERVER[ 'REQUEST_URI' ] ) ); 34 $blogname = substr( $blogname, 0, strpos( $blogname, '/' ) ); 35 if( $blogname == '' || $blogname == 'blog' || $blogname == 'wp-admin' || $blogname == 'files' ) { 53 $blogname = htmlspecialchars( substr( $_SERVER[ 'REQUEST_URI' ], strlen( $path ) ) ); 54 if( strpos( $blogname, '/' ) ) 55 $blogname = substr( $blogname, 0, strpos( $blogname, '/' ) ); 56 if( $blogname == '' || $blogname == 'blog' || $blogname == 'wp-admin' || $blogname == 'files' || $blogname == 'feed' ) { 36 57 $current_blog = $wpdb->get_row("SELECT * FROM $wpdb->blogs WHERE domain = '$domain' AND path = '$path'"); 37 58 } else { … … 51 72 52 73 $current_site->site_name = $wpdb->get_var( "SELECT meta_value FROM $wpdb->sitemeta WHERE site_id = '$site_id' AND meta_key = 'site_name'" ); 74 if( $current_site->site_name == null ) 75 $current_site->site_name = ucfirst( $current_site->domain ); 53 76 } 54 77 if( $blog_id == false ) {
