Changeset 1062
- Timestamp:
- 10/04/07 15:07:51 (1 year ago)
- Files:
-
- trunk/index-install.php (modified) (1 diff)
- trunk/wp-admin/wpmu-edit.php (modified) (1 diff)
- trunk/wp-admin/wpmu-options.php (modified) (1 diff)
- trunk/wp-signup.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/index-install.php
r1049 r1062 368 368 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_email', '".$email."')" ); 369 369 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'admin_user_id', '1')" ); 370 $wpdb->query( "INSERT INTO ".$wpdb->sitemeta." (meta_id, site_id, meta_key, meta_value) VALUES (NULL, 1, 'registration', 'all')" ); 370 371 $wpdb->query( "INSERT INTO ".$wpdb->site." ( id, domain, path ) VALUES ( NULL, '$domain', '$base' )" ); 371 372 $wpdb->query( "INSERT INTO " . $wpdb->sitecategories . " ( cat_ID, cat_name, category_nicename, last_updated ) VALUES (1, 'Uncategorized', 'uncategorized', NOW())" ); trunk/wp-admin/wpmu-edit.php
r1033 r1062 25 25 } 26 26 update_site_option( "illegal_names", $names ); 27 update_site_option( "registration", $wpdb->escape( $_POST[ 'registration' ] ) ); 27 28 if( $_POST[ 'limited_email_domains' ] != '' ) { 28 29 update_site_option( "limited_email_domains", split( ' ', $_POST[ 'limited_email_domains' ] ) ); trunk/wp-admin/wpmu-options.php
r990 r1062 34 34 <br /> 35 35 <?php printf( __( 'Registration and support mails will come from this address. Make it generic like "support@%s"' ), $current_site->domain ); ?></td> 36 </tr> 37 <tr valign="top"> 38 <th scope="row"><?php _e('Allow new blog registrations') ?></th> 39 <?php 40 if( !get_site_option('registration') ) 41 update_site_option( 'registration', 'all' ); 42 ?> 43 <td><input name="registration1" type="radio" id="registration1" value='none' <?php echo get_site_option('registration') == 'none' ? 'checked' : ''; ?> /> Disabled<br /> 44 <input name="registration2" type="radio" id="registration2" value='all' <?php echo get_site_option('registration') == 'all' ? 'checked' : ''; ?> /> Enabled for all. Blogs and user accounts can be created.<br /> 45 <input name="registration3" type="radio" id="registration3" value='user' <?php echo get_site_option('registration') == 'user' ? 'checked' : ''; ?> /> Enabled for users only. Only user account can be created.<br /> 46 <input name="registration4" type="radio" id="registration4" value='blog' <?php echo get_site_option('registration') == 'blog' ? 'checked' : ''; ?> /> Enabled for blogs only. Only logged in users can create new blogs.<br /> 47 <?php _e('Disable or enable registration and who or what can be registered. (Default=all)') ?></td> 36 48 </tr> 37 49 <tr valign="top"> trunk/wp-signup.php
r1046 r1062 368 368 369 369 // Main 370 $active_signup = 'all'; 370 $active_signup = get_site_option( 'registration' ); 371 if( !$active_signup ) 372 $active_signup = 'all'; 373 371 374 $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user" 372 375 … … 401 404 } elseif( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) ) { 402 405 signup_user( $newblogname, $user_email ); 406 } elseif( is_user_logged_in() == false && ( $active_signup == 'blog' ) ) { 407 _e( "I'm sorry. We're not accepting new registrations at this time." ); 403 408 } else { 404 409 _e( "You're logged in already. No need to register again!" );
