1 | *** execute-pings.php.orig Thu Dec 29 14:35:46 2005 |
---|
2 | --- execute-pings.php Thu Dec 29 14:38:45 2005 |
---|
3 | *************** |
---|
4 | *** 19,28 **** |
---|
5 | echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>"; |
---|
6 | } |
---|
7 | // Do Trackbacks |
---|
8 | ! while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) { |
---|
9 | ! echo "Trackback : $trackback->ID<br/>"; |
---|
10 | ! do_trackbacks($trackback->ID); |
---|
11 | } |
---|
12 | } |
---|
13 | |
---|
14 | _e('Done.'); |
---|
15 | --- 19,46 ---- |
---|
16 | echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>"; |
---|
17 | } |
---|
18 | // Do Trackbacks |
---|
19 | ! // The old code will cause infinite loop when trackback failed. |
---|
20 | ! // |
---|
21 | ! |
---|
22 | ! $trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'"); |
---|
23 | ! |
---|
24 | ! if (is_array($trackbacks) && count($trackbacks)) { |
---|
25 | ! foreach ($trackbacks AS $trackback ) { |
---|
26 | ! echo "Trackback : $trackback->ID<br/>"; |
---|
27 | ! do_trackbacks($trackback->ID); |
---|
28 | ! |
---|
29 | ! } // end foreach |
---|
30 | ! |
---|
31 | } |
---|
32 | + |
---|
33 | + |
---|
34 | + |
---|
35 | + // while ($trackback = $wpdb->get_row("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft' LIMIT 1")) { |
---|
36 | + // echo "Trackback : $trackback->ID<br/>"; |
---|
37 | + // do_trackbacks($trackback->ID); |
---|
38 | + // } |
---|
39 | + |
---|
40 | + |
---|
41 | } |
---|
42 | |
---|
43 | _e('Done.'); |
---|