Changeset 4383 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 10/13/2006 12:23:25 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/admin-functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r4382 r4383 984 984 985 985 if ( is_serialized($entry['meta_value']) ) { 986 if ( 's' == $entry['meta_value']{0}) {986 if ( is_serialized_string($entry['meta_value']) ) { 987 987 // this is a serialized string, so we should display it 988 988 $entry['meta_value'] = maybe_unserialize($entry['meta_value']); … … 1069 1069 $metakeyselect = $wpdb->escape(stripslashes(trim($_POST['metakeyselect']))); 1070 1070 $metakeyinput = $wpdb->escape(stripslashes(trim($_POST['metakeyinput']))); 1071 $metavalue = prepare_data(stripslashes((trim($_POST['metavalue']))));1071 $metavalue = maybe_serialize(stripslashes((trim($_POST['metavalue'])))); 1072 1072 $metavalue = $wpdb->escape($metavalue); 1073 1073 … … 1101 1101 function update_meta($mid, $mkey, $mvalue) { 1102 1102 global $wpdb; 1103 if ( is_serialized(stripslashes($mvalue)) ) // $mvalue looks to be already serialized, so we should serialize it again to prevent the data from coming out in a different form than it came in1104 $mvalue = serialize($mvalue);1103 $mvalue = maybe_serialize(stripslashes($mvalue)); 1104 $mvalue = $wpdb->escape($mvalue); 1105 1105 $mid = (int) $mid; 1106 1106 return $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '$mkey', meta_value = '$mvalue' WHERE meta_id = '$mid'");
Note: See TracChangeset
for help on using the changeset viewer.