Changeset 1328 for trunk/wp-trackback.php
- Timestamp:
- 06/13/08 17:21:00 (6 months ago)
- Files:
-
- trunk/wp-trackback.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-trackback.php
r1218 r1328 1 1 <?php 2 /** 3 * Handle Trackbacks and Pingbacks sent to WordPress 4 * 5 * @package WordPress 6 */ 2 7 3 8 if (empty($wp)) { 4 require_once('./wp- config.php');9 require_once('./wp-load.php'); 5 10 wp('tb=1'); 6 11 } 7 12 13 /** 14 * trackback_response() - Respond with error or success XML message 15 * 16 * @param int|bool $error Whether there was an error or not 17 * @param string $error_message Error message if an error occurred 18 */ 8 19 function trackback_response($error = 0, $error_message = '') { 9 20 header('Content-Type: text/xml; charset=' . get_option('blog_charset') ); … … 87 98 $comment_type = 'trackback'; 88 99 89 $dupe = $wpdb->get_results( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$comment_post_ID' AND comment_author_url = '$comment_author_url'");100 $dupe = $wpdb->get_results( $wpdb->prepare("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_author_url = %s", $comment_post_ID, $comment_author_url) ); 90 101 if ( $dupe ) 91 102 trackback_response(1, 'We already have a ping from that URL for this post.');
