Make WordPress Core


Ignore:
Timestamp:
03/01/2013 04:28:40 PM (12 years ago)
Author:
ryan
Message:

Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r23416 r23554  
    506506            $autoload = 'yes';
    507507
     508        $option = $wpdb->escape($option);
    508509        if ( is_array($value) )
    509510            $value = serialize($value);
     511        $value = $wpdb->escape($value);
    510512        if ( !empty($insert) )
    511513            $insert .= ', ';
    512         $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload );
     514        $insert .= "('$option', '$value', '$autoload')";
    513515    }
    514516
     
    920922    $insert = '';
    921923    foreach ( $sitemeta as $meta_key => $meta_value ) {
     924        $meta_key = $wpdb->escape( $meta_key );
    922925        if ( is_array( $meta_value ) )
    923926            $meta_value = serialize( $meta_value );
     927        $meta_value = $wpdb->escape( $meta_value );
    924928        if ( !empty( $insert ) )
    925929            $insert .= ', ';
    926         $insert .= $wpdb->prepare( "( %d, %s, %s)", $network_id, $meta_key, $meta_value );
     930        $insert .= "( $network_id, '$meta_key', '$meta_value')";
    927931    }
    928932    $wpdb->query( "INSERT INTO $wpdb->sitemeta ( site_id, meta_key, meta_value ) VALUES " . $insert );
Note: See TracChangeset for help on using the changeset viewer.