Non-trackback requests to wp-trackback.php now redirect to the post.
git-svn-id: http://svn.automattic.com/wordpress/trunk@637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d3d08d60ef
commit
08709cf171
|
@ -1,21 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
require(dirname(__FILE__) . '/wp-config.php');
|
require(dirname(__FILE__) . '/wp-config.php');
|
||||||
if (!empty($HTTP_GET_VARS['tb_id'])) {
|
|
||||||
// trackback is done by a GET
|
// trackback is done by a POST
|
||||||
$tb_id = intval($HTTP_GET_VARS['tb_id']);
|
$request_array = 'HTTP_POST_VARS';
|
||||||
$tb_url = $HTTP_GET_VARS['url'];
|
$tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
|
||||||
$title = $HTTP_GET_VARS['title'];
|
$tb_id = intval($tb_id[count($tb_id)-1]);
|
||||||
$excerpt = $HTTP_GET_VARS['excerpt'];
|
$tb_url = $HTTP_POST_VARS['url'];
|
||||||
$blog_name = $HTTP_GET_VARS['blog_name'];
|
$title = $HTTP_POST_VARS['title'];
|
||||||
} elseif (!empty($HTTP_POST_VARS['url'])) {
|
$excerpt = $HTTP_POST_VARS['excerpt'];
|
||||||
// trackback is done by a POST
|
$blog_name = $HTTP_POST_VARS['blog_name'];
|
||||||
$request_array = 'HTTP_POST_VARS';
|
|
||||||
$tb_id = explode('/', $HTTP_SERVER_VARS['REQUEST_URI']);
|
|
||||||
$tb_id = intval($tb_id[count($tb_id)-1]);
|
if (empty($title) && empty($tb_url) && empty($blog_name)) {
|
||||||
$tb_url = $HTTP_POST_VARS['url'];
|
// If it doesn't look like a trackback at all...
|
||||||
$title = $HTTP_POST_VARS['title'];
|
header('Location: ' . get_permalink($tb_id));
|
||||||
$excerpt = $HTTP_POST_VARS['excerpt'];
|
|
||||||
$blog_name = $HTTP_POST_VARS['blog_name'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
|
if ((strlen(''.$tb_id)) && (empty($HTTP_GET_VARS['__mode'])) && (strlen(''.$tb_url))) {
|
||||||
|
|
Loading…
Reference in New Issue