equal
deleted
inserted
replaced
44 // Trackback is done by a POST. |
44 // Trackback is done by a POST. |
45 $request_array = 'HTTP_POST_VARS'; |
45 $request_array = 'HTTP_POST_VARS'; |
46 |
46 |
47 if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) { |
47 if ( ! isset( $_GET['tb_id'] ) || ! $_GET['tb_id'] ) { |
48 $tb_id = explode( '/', $_SERVER['REQUEST_URI'] ); |
48 $tb_id = explode( '/', $_SERVER['REQUEST_URI'] ); |
49 $tb_id = intval( $tb_id[ count( $tb_id ) - 1 ] ); |
49 $tb_id = (int) $tb_id[ count( $tb_id ) - 1 ]; |
50 } |
50 } |
51 |
51 |
52 $tb_url = isset( $_POST['url'] ) ? $_POST['url'] : ''; |
52 $tb_url = isset( $_POST['url'] ) ? $_POST['url'] : ''; |
53 $charset = isset( $_POST['charset'] ) ? $_POST['charset'] : ''; |
53 $charset = isset( $_POST['charset'] ) ? $_POST['charset'] : ''; |
54 |
54 |
82 |
82 |
83 if ( is_single() || is_page() ) { |
83 if ( is_single() || is_page() ) { |
84 $tb_id = $posts[0]->ID; |
84 $tb_id = $posts[0]->ID; |
85 } |
85 } |
86 |
86 |
87 if ( ! isset( $tb_id ) || ! intval( $tb_id ) ) { |
87 if ( ! isset( $tb_id ) || ! (int) $tb_id ) { |
88 trackback_response( 1, __( 'I really need an ID for this to work.' ) ); |
88 trackback_response( 1, __( 'I really need an ID for this to work.' ) ); |
89 } |
89 } |
90 |
90 |
91 if ( empty( $title ) && empty( $tb_url ) && empty( $blog_name ) ) { |
91 if ( empty( $title ) && empty( $tb_url ) && empty( $blog_name ) ) { |
92 // If it doesn't look like a trackback at all. |
92 // If it doesn't look like a trackback at all. |