[wpmu-trac] [WordPress MU Trac] #271: Improve wpmu_delete_blog

WordPress MU Trac wpmu-trac at lists.automattic.com
Sat Mar 3 02:22:21 GMT 2007


#271: Improve wpmu_delete_blog
---------------------------+------------------------------------------------
 Reporter:  momo360modena  |       Owner:  somebody              
     Type:  enhancement    |      Status:  new                   
 Priority:  normal         |   Milestone:  WPMU 2.0              
Component:  component1     |     Version:  2.0                   
 Severity:  normal         |    Keywords:  file, UPLOADS, delete,
---------------------------+------------------------------------------------
 Remplace :
 {{{
 while( list( $key, $val ) = each( $drop_tables  ) )
 $wpdb->query( "DROP TABLE IF EXISTS $val" );
 }}}

 By

 {{{
 foreach ($drop_tables as $drop_table) {
 $wpdb->query( "DROP TABLE IF EXISTS $drop_table" );
 }
 }}}

 and use constant UPLOADS for file

 Remplace :
 {{{
 $dir = constant( "ABSPATH" ) . "wp-content/blogs.dir/" . $blog_id
 ."/files/";
 }}}

 By

 {{{
 $dir = constant( "ABSPATH" ) . constant( "UPLOADS" );
 }}}

 Why not use a function for delete files ?
 Instead the same method used several times on the blog ?

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/271>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list