Make sure trackback template is not double processed.

git-svn-id: http://svn.automattic.com/wordpress/trunk@2305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
rboren 2005-02-13 21:25:08 +00:00
parent 677a576cdb
commit 438753cfdd
2 changed files with 3 additions and 5 deletions

View File

@ -182,16 +182,13 @@ if ( (0 == count($posts)) && !is_404() && !is_search()
header('HTTP/1.x 404 Not Found');
}
if ( is_trackback() )
$doing_trackback = true;
// Template redirection
if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
do_action('template_redirect');
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH . '/wp-feed.php');
exit;
} else if ( is_trackback() ) {
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
} else if ( is_404() && get_404_template() ) {
@ -233,7 +230,7 @@ if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH . '/wp-feed.php');
exit;
} else if ( is_trackback() ) {
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
}

View File

@ -3,6 +3,7 @@ require_once( dirname(__FILE__) . '/wp-config.php' );
if ( empty($doing_trackback) ) {
$doing_trackback = true;
$tb = true;
require_once('wp-blog-header.php');
}