Changeset 1604
- Timestamp:
- 09/05/2004 02:03:51 AM (21 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/post.php
r1599 r1604 168 168 169 169 add_meta($post_ID); 170 171 $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'"); 170 172 171 173 if (isset($sleep_after_edit) && $sleep_after_edit > 0) { -
trunk/wp-includes/functions-post.php
r1599 r1604 42 42 $result = $wpdb->query($sql); 43 43 $post_ID = $wpdb->insert_id; 44 45 wp_set_post_cats('',$post_ID,$post_category); 44 45 // Set GUID 46 $wpdb->query("UPDATE $wpdb->posts SET guid = '" . get_permalink($post_ID) . "' WHERE ID = '$post_ID'"); 47 48 wp_set_post_cats('', $post_ID, $post_category); 46 49 47 50 if ($post_status == 'publish') { 48 51 do_action('publish_post', $post_ID); 49 52 } 53 54 pingback($content, $post_ID); 50 55 51 56 // Return insert_id if we got a good result, otherwise return zero. -
trunk/wp-mail.php
r1599 r1604 115 115 $content = trim($content); 116 116 117 $ content = apply_filters('phone_content', $content);117 $post_content = apply_filters('phone_content', $content); 118 118 119 119 $post_title = xmlrpc_getposttitle($content); … … 123 123 if (empty($post_categories)) $post_categories[] = get_settings('default_email_category'); 124 124 125 $post_title = addslashes(trim($post_title)); 126 // Make sure that we get a nice post-slug 127 $post_name = sanitize_title( $post_title ); 128 $content = preg_replace("|\n([^\n])|", " $1", $content); 129 $content = addslashes(trim($content)); 125 $post_category = $post_categories; 130 126 131 $ sql = "INSERT INTO $wpdb->posts (post_author, post_date, post_date_gmt, post_content, post_title, post_name, post_modified, post_modified_gmt) VALUES (1, '$post_date', '$post_date_gmt', '$content', '$post_title', '$post_name', '$post_date', '$post_date_gmt')";127 $post_data = compact('post_content','post_title','post_date','post_date_gmt','post_author','post_category'); 132 128 133 $result = $wpdb->query($sql); 134 $post_ID = $wpdb->insert_id; 129 wp_insert_post($post_data); 135 130 136 do_action('publish_post', $post_ID);137 131 do_action('publish_phone', $post_ID); 138 pingback($content, $post_ID);139 132 140 133 echo "\n<p><b>Posted title:</b> $post_title<br />";
Note: See TracChangeset
for help on using the changeset viewer.