Use update. see #11644

git-svn-id: https://develop.svn.wordpress.org/trunk@12774 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-01-20 16:50:09 +00:00
parent b8323c4ee9
commit f12c5fdd6e
1 changed files with 2 additions and 10 deletions

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' ] );