[wpmu-trac] [WordPress MU Trac] #1192: too much queries during blog creation

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Jan 15 19:13:22 UTC 2010


#1192: too much queries during blog creation
---------------------+------------------------------------------------------
 Reporter:  lesion   |       Owner:  somebody                     
     Type:  defect   |      Status:  new                          
 Priority:  high     |   Milestone:                               
Component:  General  |     Version:                               
 Severity:  normal   |    Keywords:  blog creation, lot of queries
---------------------+------------------------------------------------------

Comment(by wpmuguru):

 Replying to [comment:1 wpmuguru]:
 > I tested the attached patch and it seemed fine while creating a few test
 blogs. The user_role option looks fine on the new blogs.
 >
 > The patch should have more testing though.

 Seem to be missing the attachment button / link

 {{{
 Index: wp-admin/includes/schema.php
 ===================================================================
 --- wp-admin/includes/schema.php        (revision 2057)
 +++ wp-admin/includes/schema.php        (working copy)
 @@ -562,11 +562,14 @@
   * @since 2.1.0
   */
  function populate_roles_210() {
 +       global $wp_roles;
 +
         $roles = array('administrator', 'editor');
         foreach ($roles as $role) {
                 $role =& get_role($role);
                 if ( empty($role) )
                         continue;
 +               $wp_roles->use_db = false;

                 $role->add_cap('edit_others_pages');
                 $role->add_cap('edit_published_pages');
 @@ -601,6 +604,9 @@
         if ( ! empty($role) ) {
                 $role->add_cap('delete_posts');
         }
 +       if( !empty( $wp_roles ) ) {
 +               update_option( $wp_roles->role_key, $wp_roles->roles );
 +       }
  }

  /**
 }}}

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/1192#comment:2>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list