~katiekitty/+junk/wordpress-byet

« back to all changes in this revision

Viewing changes to wp-trackback.php

  • Committer: kserver
  • Date: 2010-05-15 01:16:36 UTC
  • Revision ID: kserver@kserver-desktop-20100515011636-mnr1j7t637suptdq
Wordpress 2.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
// trackback is done by a POST
37
37
$request_array = 'HTTP_POST_VARS';
38
38
 
39
 
if ( !$_GET['tb_id'] ) {
 
39
if ( !isset($_GET['tb_id']) || !$_GET['tb_id'] ) {
40
40
        $tb_id = explode('/', $_SERVER['REQUEST_URI']);
41
41
        $tb_id = intval( $tb_id[ count($tb_id) - 1 ] );
42
42
}
43
43
 
44
 
$tb_url  = $_POST['url'];
45
 
$charset = $_POST['charset'];
 
44
$tb_url  = isset($_POST['url'])     ? $_POST['url']     : '';
 
45
$charset = isset($_POST['charset']) ? $_POST['charset'] : '';
46
46
 
47
47
// These three are stripslashed here so that they can be properly escaped after mb_convert_encoding()
48
 
$title     = stripslashes($_POST['title']);
49
 
$excerpt   = stripslashes($_POST['excerpt']);
50
 
$blog_name = stripslashes($_POST['blog_name']);
 
48
$title     = isset($_POST['title'])     ? stripslashes($_POST['title'])      : '';
 
49
$excerpt   = isset($_POST['excerpt'])   ? stripslashes($_POST['excerpt'])    : '';
 
50
$blog_name = isset($_POST['blog_name']) ? stripslashes($_POST['blog_name'])  : '';
51
51
 
52
52
if ($charset)
53
53
        $charset = str_replace( array(',', ' '), '', strtoupper( trim($charset) ) );
72
72
if ( is_single() || is_page() )
73
73
        $tb_id = $posts[0]->ID;
74
74
 
75
 
if ( !intval( $tb_id ) )
 
75
if ( !isset($tb_id) || !intval( $tb_id ) )
76
76
        trackback_response(1, 'I really need an ID for this to work.');
77
77
 
78
78
if (empty($title) && empty($tb_url) && empty($blog_name)) {