Changeset 2064
- Timestamp:
- 01/07/05 01:21:12 (4 years ago)
- Files:
-
- trunk/wp-includes/functions-post.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-includes/functions-post.php
r2062 r2064 88 88 89 89 // First get all of the original fields 90 extract(wp_get_single_post($postarr['ID'], ARRAY_A));90 extract(wp_get_single_post($postarr['ID'], ARRAY_A)); 91 91 92 92 // Now overwrite any changed values being passed in 93 93 extract($postarr); 94 94 95 95 // Make sure we set a valid category 96 if ( 0 == count($post_category) || !is_array($post_category)) {96 if ( 0 == count($post_category) || !is_array($post_category) ) 97 97 $post_category = array($post_default_category); 98 }99 98 100 99 // Do some escapes for safety 101 $post_title = $wpdb->escape($post_title);100 $post_title = $wpdb->escape($post_title); 102 101 $post_excerpt = $wpdb->escape($post_excerpt); 103 102 $post_content = $wpdb->escape($post_content); … … 122 121 $result = $wpdb->query($sql); 123 122 124 wp_set_post_cats('',$ID,$post_category); 125 123 wp_set_post_cats('', $ID, $post_category); 124 125 do_action('edit_post', $ID); 126 126 127 return $wpdb->rows_affected; 127 128 }
