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