Changeset 23554 for trunk/wp-admin/includes/schema.php
- Timestamp:
- 03/01/2013 04:28:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/schema.php
r23416 r23554 506 506 $autoload = 'yes'; 507 507 508 $option = $wpdb->escape($option); 508 509 if ( is_array($value) ) 509 510 $value = serialize($value); 511 $value = $wpdb->escape($value); 510 512 if ( !empty($insert) ) 511 513 $insert .= ', '; 512 $insert .= $wpdb->prepare( "(%s, %s, %s)", $option, $value, $autoload );514 $insert .= "('$option', '$value', '$autoload')"; 513 515 } 514 516 … … 920 922 $insert = ''; 921 923 foreach ( $sitemeta as $meta_key => $meta_value ) { 924 $meta_key = $wpdb->escape( $meta_key ); 922 925 if ( is_array( $meta_value ) ) 923 926 $meta_value = serialize( $meta_value ); 927 $meta_value = $wpdb->escape( $meta_value ); 924 928 if ( !empty( $insert ) ) 925 929 $insert .= ', '; 926 $insert .= $wpdb->prepare( "( %d, %s, %s)", $network_id, $meta_key, $meta_value );930 $insert .= "( $network_id, '$meta_key', '$meta_value')"; 927 931 } 928 932 $wpdb->query( "INSERT INTO $wpdb->sitemeta ( site_id, meta_key, meta_value ) VALUES " . $insert );
Note: See TracChangeset
for help on using the changeset viewer.