Changeset 3317
- Timestamp:
- 12/16/2005 03:04:33 AM (19 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-footer.php
r3306 r3317 7 7 8 8 </div> 9 <?php check_for_pings(); ?>10 9 <?php do_action('admin_footer', ''); ?> 11 10 <script type="text/javascript">if(typeof wpOnload=='function')wpOnload();</script> -
trunk/wp-admin/execute-pings.php
r3295 r3317 1 1 <?php 2 require_once(' admin.php');2 require_once('../wp-config.php'); 3 3 4 if ( ! current_user_can('edit_posts') )5 die (__("Cheatin' uh?"));6 7 echo '/* No Styles Here */';8 4 register_shutdown_function('execute_all_pings'); 9 5 //execute_all_pings(); … … 15 11 foreach($pings as $ping) { 16 12 pingback($ping->post_content, $ping->ID); 17 //echo "Pingback: $ping->post_title : $ping->ID<br/>";13 echo "Pingback: $ping->post_title : $ping->ID<br/>"; 18 14 $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$ping->ID} AND meta_key = '_pingme';"); 19 15 } … … 23 19 foreach($enclosures as $enclosure) { 24 20 do_enclose($enclosure->post_content, $enclosure->ID); 25 //echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>";21 echo "Enclosure: $enclosure->post_title : $enclosure->ID<br/>"; 26 22 $wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE post_id = {$enclosure->ID} AND meta_key = '_encloseme';"); 27 23 } … … 30 26 if($trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE TRIM(to_ping) != '' AND post_status != 'draft'")) { 31 27 foreach($trackbacks as $trackback) { 32 //echo "trackback : $trackback->ID<br/>";28 echo "Trackback : $trackback->ID<br/>"; 33 29 do_trackbacks($trackback->ID); 34 30 } 35 31 } 36 32 } 33 34 _e('Done.'); 35 37 36 ?> -
trunk/wp-includes/comment-functions.php
r3272 r3317 640 640 641 641 if ($pingback_server_url) { 642 642 @ set_time_limit( 60 ); 643 643 // Now, the RPC call 644 644 debug_fwrite($log, "Page Linked To: $pagelinkedto \n"); -
trunk/wp-includes/functions-post.php
r3311 r3317 182 182 do_action('publish_post', $post_ID); 183 183 184 if ( $post_pingback && !defined('WP_IMPORTING'))185 $result = $wpdb->query("186 INSERT INTO $wpdb->postmeta187 (post_id,meta_key,meta_value)188 VALUES ('$post_ID','_pingme','1')189 ");190 if ( !defined('WP_IMPORTING') )184 if ( !defined('WP_IMPORTING') ) { 185 if ( $post_pingback ) 186 $result = $wpdb->query(" 187 INSERT INTO $wpdb->postmeta 188 (post_id,meta_key,meta_value) 189 VALUES ('$post_ID','_pingme','1') 190 "); 191 191 $result = $wpdb->query(" 192 192 INSERT INTO $wpdb->postmeta … … 194 194 VALUES ('$post_ID','_encloseme','1') 195 195 "); 196 //register_shutdown_function('do_trackbacks', $post_ID); 197 } else if ($post_status == 'static') { 196 spawn_pinger(); 197 } 198 } else if ($post_status == 'static') { 198 199 generate_page_rewrite_rules(); 199 200 … … 703 704 trackback($tb_ping, $post_title, $excerpt, $post_id); 704 705 $pinged[] = $tb_ping; 706 } else { 707 $wpdb->query("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_ping', '')) WHERE ID = '$post_id'"); 705 708 } 706 709 endforeach; endif; -
trunk/wp-includes/functions.php
r3303 r3317 861 861 $tb_url = addslashes( $tb_url ); 862 862 $wpdb->query("UPDATE $wpdb->posts SET pinged = CONCAT(pinged, '\n', '$tb_url') WHERE ID = '$ID'"); 863 return $wpdb->query("UPDATE $wpdb->posts SET to_ping = REPLACE(to_ping, '$tb_url', '') WHERE ID = '$ID'");863 return $wpdb->query("UPDATE $wpdb->posts SET to_ping = TRIM(REPLACE(to_ping, '$tb_url', '')) WHERE ID = '$ID'"); 864 864 } 865 865 … … 938 938 } 939 939 940 function check_for_pings() {940 function spawn_pinger() { 941 941 global $wpdb; 942 942 $doping = false; … … 947 947 $doping = true; 948 948 949 if ( $doping ) 950 echo '<iframe id="pingcheck" src="' . get_settings('siteurl') .'/wp-admin/execute-pings.php?time=' . time() . '" style="border:none;width:1px;height:1px;"></iframe>'; 949 if ( $doping ) { 950 $ping_url = get_settings('siteurl') .'/wp-admin/execute-pings.php'; 951 $parts = parse_url($ping_url); 952 $argyle = @ fsockopen($parts['host'], $_SERVER['SERVER_PORT'], $errno, $errstr, 0.01); 953 if ( $argyle ) 954 fputs($argyle, "GET {$parts['path']}?time=".time()." HTTP/1.0\r\nHost: {$_SERVER['HTTP_HOST']}\r\n\r\n"); 955 } 951 956 } 952 957
Note: See TracChangeset
for help on using the changeset viewer.