diff options
author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-06-08 19:30:46 +0000 |
---|---|---|
committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-06-08 19:30:46 +0000 |
commit | 483d1c2dc5a6056baee2793337fe3a8773210e31 (patch) | |
tree | bd5b04c0f619c98b884363e1e87e87842c3bfd91 /wp-settings.php | |
parent | 094bce1a0679c6d175921e5e634a8be4709358ba (diff) | |
download | wordpress-mu-483d1c2dc5a6056baee2793337fe3a8773210e31.tar.gz wordpress-mu-483d1c2dc5a6056baee2793337fe3a8773210e31.tar.xz wordpress-mu-483d1c2dc5a6056baee2793337fe3a8773210e31.zip |
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
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@995 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-settings.php')
-rw-r--r-- | wp-settings.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/wp-settings.php b/wp-settings.php index 9fa1350..e57af7e 100644 --- a/wp-settings.php +++ b/wp-settings.php @@ -125,6 +125,9 @@ $wpdb->blog_versions = $wpdb->prefix . 'blog_versions'; $wpdb->users = $wpdb->prefix . 'users'; $wpdb->usermeta = $wpdb->prefix . 'usermeta'; +if( defined( 'SUNRISE' ) ) + include_once( ABSPATH . 'wp-content/sunrise.php' ); + require_once ( ABSPATH . 'wpmu-settings.php' ); $wpdb->prefix = $table_prefix; $wpdb->posts = $wpdb->prefix . 'posts'; @@ -136,8 +139,8 @@ $wpdb->links = $wpdb->prefix . 'links'; $wpdb->linkcategories = $wpdb->prefix . 'linkcategories'; $wpdb->options = $wpdb->prefix . 'options'; $wpdb->postmeta = $wpdb->prefix . 'postmeta'; -$wpdb->siteid = $site_id; -$wpdb->blogid = $blog_id; +$wpdb->siteid = $current_blog->site_id; +$wpdb->blogid = $current_blog->blog_id; if ( defined('CUSTOM_USER_TABLE') ) $wpdb->users = CUSTOM_USER_TABLE; @@ -333,4 +336,4 @@ register_shutdown_function('shutdown_action_hook'); // Everything is loaded and initialized. do_action('init'); -?>
\ No newline at end of file +?> |