Changeset 908

Show
Ignore:
Timestamp:
03/08/07 17:37:46 (2 years ago)
Author:
donncha
Message:

Warn of "www." in URL of installer and die(), should help avoid some http://com/wpmu/ issues

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/index-install.php

    r907 r908  
    1111 
    1212function printheader() { 
    13     print ' 
     13        if( substr( $_SERVER[ 'SERVER_NAME' ], 0, 4 ) == 'www.' ) { 
     14                $url = 'http://' . str_replace( 'www.', '', $_SERVER[ 'SERVER_NAME' ] ) . $_SERVER[ 'REQUEST_URI' ]; 
     15                print "<html><head><title>WordPress MU Installer</title><body>"; 
     16                print "<p style='margin-left: 20%; margin-right: 20%; margin-top: 5%; text-align: center'><strong>Warning!</strong> WordPress MU must be installed without the 'www.' in the URL.<br />Please click here to continue the install: <a href='$url'>$url</a></p></body></html>"; 
     17                die(); 
     18        } 
     19        print ' 
    1420<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    1521<html xmlns="http://www.w3.org/1999/xhtml"> 
     
    365371        $domain =   $wpdb->escape( $_POST[ 'basedomain' ] ); 
    366372        if( substr( $domain, 0, 4 ) == 'www.' ) 
    367         $domain = substr( $domain, 4 ); 
     373               $domain = substr( $domain, 4 ); 
    368374 
    369375        $email = $wpdb->escape( $_POST[ 'email' ] );