diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-31 11:29:43 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-08-31 11:29:43 +0000 |
commit | 122f51eaeaa3c4d0918db8f1d1920df5df06d72d (patch) | |
tree | b454a35f1e892b7dd0eee063af1ad7a3444f9549 /index.php | |
parent | a9e72f0794dfe341a216e74d2af2b54b371fee0a (diff) | |
download | wordpress-mu-122f51eaeaa3c4d0918db8f1d1920df5df06d72d.tar.gz wordpress-mu-122f51eaeaa3c4d0918db8f1d1920df5df06d72d.tar.xz wordpress-mu-122f51eaeaa3c4d0918db8f1d1920df5df06d72d.zip |
Fixed problem with installing WPMU into folders.
Make sure "path" always has a slash at the end.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@264 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -229,9 +229,9 @@ function step1() { if( substr( $url, -1 ) == '/' ) $url = substr( $url, 0, -1 ); $base = dirname( $_SERVER["SCRIPT_NAME"] ); - if( $base == "/") + if( $base != "/") { - $base = ""; + $base .= "/"; } $realpath = dirname(__FILE__); @@ -247,7 +247,7 @@ function step1() { } fclose( $fp ); } - $configfile = str_replace( "BASE", $base."/", $configfile ); + $configfile = str_replace( "BASE", $base, $configfile ); $fp = fopen( "./wp-inst/wpmu-settings.php", "w" ); fwrite( $fp, $configfile ); fclose( $fp ); @@ -389,6 +389,10 @@ function printuserdetailsform( $weblog_title = 'My new Blog', $username = '', $e function step3() { global $wpdb; $base = dirname( $_SERVER["SCRIPT_NAME"] ); + if( $base != "/") + { + $base .= "/"; + } $domain = $_SERVER[ 'HTTP_HOST' ]; if( substr( $domain, 0, 4 ) == 'www.' ) $domain = substr( $domain, 4 ); @@ -423,11 +427,7 @@ SITE_NAME')" ); $res = createBlog( $domain, $base, 'admin', $weblog_title, $email ); if( $res == 'ok' ) { - if( $base == '/' ) { - $url = "http://".$_SERVER["HTTP_HOST"] . '/'; - } else { - $url = "http://".$_SERVER["HTTP_HOST"] . $base . '/'; - } + $url = "http://".$_SERVER["HTTP_HOST"] . $base; $realpath = dirname(__FILE__); do_htaccess( "htaccess.dist", ".htaccess", $realpath, $base, $url ); do_htaccess( "wp-inst/htaccess.dist", "wp-inst/.htaccess", $realpath, $base, $url ); |