summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-18 10:53:02 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2005-07-18 10:53:02 +0000
commitf1ca60681936627b5695d8933f5ef81d761dd6a7 (patch)
tree13b16a1d6a2614daf17a759dbcc122b977763eb4 /index.php
parent8a98bebfd2c7071b74bd20fecf59948583ee7201 (diff)
downloadwordpress-mu-f1ca60681936627b5695d8933f5ef81d761dd6a7.tar.gz
wordpress-mu-f1ca60681936627b5695d8933f5ef81d761dd6a7.tar.xz
wordpress-mu-f1ca60681936627b5695d8933f5ef81d761dd6a7.zip
Strip "www." from domain.
Call createBlog properly. git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@37 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/index.php b/index.php
index 3d4b01f..6d94fb7 100644
--- a/index.php
+++ b/index.php
@@ -317,8 +317,8 @@ function step3() {
global $wpdb;
$base = dirname( $_SERVER["SCRIPT_NAME"] );
$domain = $_SERVER[ 'HTTP_HOST' ];
-
- $hostname = $_SERVER["HTTP_HOST"];
+ if( substr( $domain, 0, 4 ) == 'www.' )
+ $domain = substr( $domain, 4 );
$email = $wpdb->escape( $_POST[ 'email' ] );
$weblog_title = $wpdb->escape( $_POST[ 'weblog_title' ] );
@@ -329,8 +329,7 @@ function step3() {
$query = "INSERT INTO wp_sitemeta (meta_id, site_id, meta_key, meta_value) VALUES (2, 1, 'admin_user_id', '1')";
$wpdb->query( $query );
-
- $res = create_blog( $domain, $base, 'admin', $weblog_title, $email);
+ $res = createBlog( $domain, $base, 'admin', $weblog_title, $email );
if( $res == 'ok' ) {
if( $base == '/' ) {
$url = "http://".$_SERVER["HTTP_HOST"] . '/';