Changeset 995

Show
Ignore:
Timestamp:
06/08/07 19:30:46 (1 year ago)
Author:
donncha
Message:

Add support for sunrise initialisation script at wp-content/sunrise.php
This script is called before site and blog lookup and could be used
to perform domain mapping or skip the lookup process.
Define SUNRISE constant in wp-config.php to enable.
Create $current_site and $current_blog objects to skip regular lookup

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-config-sample.php

    r972 r995  
    1919// chosen language must be installed to wp-content/languages. 
    2020// For example, install de.mo to wp-content/languages and set WPLANG to 'de' 
    21 // to enable German language support. 
    22 define ('WPLANG', ''); 
     21// to enable language support. 
     22define('WPLANG', ''); 
     23// uncomment this to enable wp-content/sunrise.php support 
     24//define( 'SUNRISE', 'on' ); 
    2325 
    2426define( "WP_USE_MULTIPLE_DB", false ); 
  • trunk/wp-settings.php

    r972 r995  
    126126$wpdb->usermeta         = $wpdb->prefix . 'usermeta'; 
    127127 
     128if( defined( 'SUNRISE' ) ) 
     129        include_once( ABSPATH . 'wp-content/sunrise.php' ); 
     130 
    128131require_once ( ABSPATH . 'wpmu-settings.php' ); 
    129132$wpdb->prefix           = $table_prefix; 
     
    137140$wpdb->options          = $wpdb->prefix . 'options'; 
    138141$wpdb->postmeta         = $wpdb->prefix . 'postmeta'; 
    139 $wpdb->siteid           = $site_id; 
    140 $wpdb->blogid           = $blog_id; 
     142$wpdb->siteid           = $current_blog->site_id; 
     143$wpdb->blogid           = $current_blog->blog_id; 
    141144 
    142145if ( defined('CUSTOM_USER_TABLE') ) 
  • trunk/wpmu-settings.php

    r912 r995  
    11<?php 
    2 if( defined( 'ABSPATH' ) == false
    3         die()
     2if( $current_site && $current_blog
     3        return
    44 
    55$wpmuBaseTablePrefix = $table_prefix;