git-svn-id: http://svn.automattic.com/wordpress/trunk@3384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-12-31 21:24:56 +00:00
parent 41a3730222
commit 90fc694201
2 changed files with 11 additions and 4 deletions

View File

@ -19,9 +19,13 @@ function execute_all_pings() {
echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>";
}
// Do Trackbacks
while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) {
echo "Trackback : $trackback->ID<br/>";
do_trackbacks($trackback->ID);
$trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'");
if (is_array($trackbacks) && count($trackbacks)) {
foreach ($trackbacks as $trackback ) {
echo "Trackback : $trackback->ID<br/>";
do_trackbacks($trackback->ID);
}
}
}

View File

@ -697,8 +697,11 @@ function do_trackbacks($post_id) {
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = $post_id");
$to_ping = get_to_ping($post_id);
$pinged = get_pung($post_id);
if ( empty($to_ping) )
if ( empty($to_ping) ) {
$wpdb->query("UPDATE $wpdb->posts SET to_ping = '' WHERE ID = '$post_id'");
return;
}
if (empty($post->post_excerpt))
$excerpt = apply_filters('the_content', $post->post_content);
else