Ticket #457: domain-mapping.diff

File domain-mapping.diff, 1.2 kB (added by ktlee, 11 months ago)
  • wpmu-settings.php

    old new  
    4545                                $current_site = $sites[0]; 
    4646                                die( "That blog does not exist. Please try <a href='http://{$current_site->domain}{$current_site->path}'>http://{$current_site->domain}{$current_site->path}</a>" ); 
    4747                        } else { 
     48                                return 0;       // add by KT 
    4849                                die( "No WPMU site defined on this host. If you are the owner of this site, please check <a href='http://trac.mu.wordpress.org/wiki/DebuggingWpmu'>Debugging WPMU</a> for further assistance." ); 
    4950                        } 
    5051                } else { 
     
    7677        $path = $current_site->path; 
    7778} else { 
    7879        $current_site = wpmu_current_site(); 
     80        if($current_site ==0) 
     81        { 
     82                $tmp=true; 
     83                $current_site = 1; 
     84        } 
    7985} 
    8086 
    8187 
     
    8389        $current_blog = $wpdb->get_row("SELECT * FROM $wpdb->blogs WHERE domain = '$domain'"); 
    8490        if( $current_blog != null ) { 
    8591                $current_site = $wpdb->get_row("SELECT * FROM $wpdb->site WHERE id='{$current_blog->site_id}'"); 
     92                if($tmp) $current_site->domain= $domain;  
    8693        } else { 
    8794                $blogname = substr( $domain, 0, strpos( $domain, '.' ) ); 
    8895        }