﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
20305	update_blog_status should also handle delete/undelete cases	Kyrylo	ryan	"function update_blog_status defined in /includes/ms-blog.php fires the following actions:

{{{
...
	if ( 'spam' == $pref )
		( $value == 1 ) ? do_action( 'make_spam_blog', $blog_id ) :	do_action( 'make_ham_blog', $blog_id );
	elseif ( 'mature' == $pref )
		( $value == 1 ) ? do_action( 'mature_blog', $blog_id ) : do_action( 'unmature_blog', $blog_id );
	elseif ( 'archived' == $pref )
		( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
	elseif ( 'archived' == $pref )
		( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
...
}}}

As you see 'archived' is handled twice, while 'deleted' is not handled at all.

The the code should go as follows:

{{{
...
	if ( 'spam' == $pref )
		( $value == 1 ) ? do_action( 'make_spam_blog', $blog_id ) :	do_action( 'make_ham_blog', $blog_id );
	elseif ( 'mature' == $pref )
		( $value == 1 ) ? do_action( 'mature_blog', $blog_id ) : do_action( 'unmature_blog', $blog_id );
	elseif ( 'archived' == $pref )
		( $value == 1 ) ? do_action( 'archive_blog', $blog_id ) : do_action( 'unarchive_blog', $blog_id );
	elseif ( 'deleted' == $pref )
		( $value == 1 ) ? do_action( 'delete_blog', $blog_id ) : do_action( 'undelete_blog', $blog_id );
...
}}}

Please include in the next release. Thank you.
"	defect (bug)	closed	normal	3.5	Multisite	3.2.1	normal	fixed	dev-feedback has-patch	
