diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-06 15:14:52 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2005-09-06 15:14:52 +0000 |
| commit | cf99c632672c0d0212cf534f102dd9a6c4e49183 (patch) | |
| tree | 852dcf06dcc4353c41641a6443724921c9fe7a47 | |
| parent | f8099cb02aeb59f1f570431ed5518b6cb5b8e5d8 (diff) | |
Added a "source" for registrations.
Added a filter so a plugin can figure out what the source is.
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@299 7be80a69-a1ef-0310-a953-fb0f7c49ff36
| -rw-r--r-- | wp-inst/wp-includes/wpmu-functions.php | 6 | ||||
| -rw-r--r-- | wp-inst/wp-newblog.php | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/wp-inst/wp-includes/wpmu-functions.php b/wp-inst/wp-includes/wpmu-functions.php index 47cdd55..4fd6d2d 100644 --- a/wp-inst/wp-includes/wpmu-functions.php +++ b/wp-inst/wp-includes/wpmu-functions.php @@ -77,7 +77,7 @@ function wpmu_checkAvailableSpace($action) { } add_filter('fileupload_init','wpmu_checkAvailableSpace'); -function createBlog( $domain, $path, $username, $weblog_title, $admin_email, $site_id = 1 ) { +function createBlog( $domain, $path, $username, $weblog_title, $admin_email, $source = 'regpage', $site_id = 1 ) { global $wpdb, $table_prefix, $wp_queries, $wpmuBaseTablePrefix, $current_site; $domain = addslashes( $domain ); @@ -196,7 +196,9 @@ function createBlog( $domain, $path, $username, $weblog_title, $admin_email, $si $metavalues = array( "user_nickname" => addslashes($username), $table_prefix . "user_level" => 10, "source_domain" => $domain, - "{$table_prefix}capabilities" => serialize(array('administrator' => true)) ); + "primary_blog" => $blog_id, + "{$table_prefix}capabilities" => serialize(array('administrator' => true)), + "source" => $source ); reset( $metavalues ); while( list( $key, $val ) = each ( $metavalues ) ) { diff --git a/wp-inst/wp-newblog.php b/wp-inst/wp-newblog.php index 2a19bea..38bb938 100644 --- a/wp-inst/wp-newblog.php +++ b/wp-inst/wp-newblog.php @@ -188,7 +188,11 @@ switch( $_POST[ 'stage' ] ) } else { $url = 'http://'.$serverName.$scriptBaseName.$newBlogID."/"; } - $err = createBlog( $newBlogID.".".$domain, $scriptBaseName, $newBlogID, $weblog_title, $admin_email ); + $source = 'regpage'; + if( $_POST[ 'u' ] ) { + $source = apply_filters( "get_wpmu_reg_source", $source ); + } + $err = createBlog( $newBlogID.".".$domain, $scriptBaseName, $newBlogID, $weblog_title, $admin_email, $source ); if( $err == 'ok' ) { if( $_POST[ 'u' ] ) { $details = get_invited_details( $_POST[ 'u' ] ); |
