Use update. see #11644

git-svn-id: http://svn.automattic.com/wordpress/trunk@12774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-20 16:50:09 +00:00
parent 6ad023b5e0
commit 9aa40449a9

View File

@ -214,16 +214,8 @@ switch ( $_GET['action'] ) {
$wp_rewrite->flush_rules();
// update blogs table
$result = $wpdb->query( "UPDATE {$wpdb->blogs} SET
domain = '".$_POST[ 'blog' ][ 'domain' ]."',
path = '".$_POST[ 'blog' ][ 'path' ]."',
registered = '".$_POST[ 'blog' ][ 'registered' ]."',
public = '".$_POST[ 'blog' ][ 'public' ]."',
archived = '".$_POST[ 'blog' ][ 'archived' ]."',
mature = '".$_POST[ 'blog' ][ 'mature' ]."',
deleted = '".$_POST[ 'blog' ][ 'deleted' ]."',
spam = '".$_POST[ 'blog' ][ 'spam' ]."'
WHERE blog_id = '$id'" );
$blog_data = stripslashes_deep($_POST[ 'blog' ]);
$result = $wpdb->update( $wpdb->blogs, $blog_data, array('blog_id' => $id) );
update_blog_status( $id, 'spam', $_POST[ 'blog' ][ 'spam' ] );
update_option( 'blog_public', $_POST[ 'blog' ][ 'public' ] );