Make WordPress Core

Changeset 12774


Ignore:
Timestamp:
01/20/2010 04:50:09 PM (15 years ago)
Author:
ryan
Message:

Use update. see #11644

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/ms-edit.php

    r12770 r12774  
    215215
    216216        // update blogs table
    217         $result = $wpdb->query( "UPDATE {$wpdb->blogs} SET
    218                 domain       = '".$_POST[ 'blog' ][ 'domain' ]."',
    219                 path         = '".$_POST[ 'blog' ][ 'path' ]."',
    220                 registered   = '".$_POST[ 'blog' ][ 'registered' ]."',
    221                 public       = '".$_POST[ 'blog' ][ 'public' ]."',
    222                 archived     = '".$_POST[ 'blog' ][ 'archived' ]."',
    223                 mature       = '".$_POST[ 'blog' ][ 'mature' ]."',
    224                 deleted      = '".$_POST[ 'blog' ][ 'deleted' ]."',
    225                 spam         = '".$_POST[ 'blog' ][ 'spam' ]."'
    226             WHERE  blog_id = '$id'" );
     217        $blog_data = stripslashes_deep($_POST[ 'blog' ]);
     218        $result = $wpdb->update( $wpdb->blogs, $blog_data, array('blog_id' => $id) );
    227219
    228220        update_blog_status( $id, 'spam', $_POST[ 'blog' ][ 'spam' ] );
Note: See TracChangeset for help on using the changeset viewer.