Make WordPress Core

Changeset 1376


Ignore:
Timestamp:
05/31/2004 11:35:32 PM (20 years ago)
Author:
rboren
Message:

index.php now handles feeds and trackbacks.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-blog-header.php

    r1355 r1376  
    6969    }
    7070
     71if ($feed != '') {
     72    $doing_rss = 1;
     73}
     74
     75if ($tb == 1) {
     76    $doing_trackback = 1;
     77}
    7178
    7279// Sending HTTP headers
     
    161168}
    162169
     170if ($pagenow != 'wp-feed.php' && $feed != '') {
     171    require(dirname(__FILE__) . '/wp-feed.php');
     172    exit;
     173}
     174
     175if ($pagenow != 'wp-trackback.php' && $tb == 1) {
     176    require(dirname(__FILE__) . '/wp-trackback.php');
     177    exit;
     178}
     179
    163180if ($pagenow != 'post.php' && $pagenow != 'edit.php') {
    164181    if ($use_gzipcompression) {
  • trunk/wp-feed.php

    r839 r1376  
    11<?php
    22
    3 $blog = 1;
    4 $doing_rss = 1;
    5 require('wp-blog-header.php');
     3if (! $doing_rss) {
     4    $doing_rss = 1;
     5    require('wp-blog-header.php');
     6}
     7
     8// Remove the pad, if present.
     9$feed = preg_replace('/^_+/', '', $feed);
    610
    711if ($feed == '' || $feed == 'feed') {
  • trunk/wp-includes/functions.php

    r1374 r1376  
    12281228
    12291229    $index = 'index.php';
    1230     $feedindex = 'wp-feed.php';
    1231     $trackbackindex = 'wp-trackback.php';
     1230    $feedindex = 'index.php';
     1231    $trackbackindex = 'index.php';
    12321232    for ($i = 0; $i < $num_tokens; ++$i) {
    12331233             if (0 < $i) {
     
    12641264                $post = 1;
    12651265                $trackbackmatch = $match . $trackbackregex;
    1266                 $trackbackquery = $trackbackindex . '?' . $query;
     1266                $trackbackquery = $trackbackindex . '?' . $query . '&tb=1';
    12671267                $match = $match . '?([0-9]+)?/?$';
    12681268                $query = $index . '?' . $query . '&page=' . preg_index($num_toks + 1, $matches);
     
    13161316    // Site feed
    13171317    $sitefeedmatch = 'feed/?([_0-9a-z-]+)?/?$';
    1318     $sitefeedquery = 'wp-feed.php?feed=' . preg_index(1, $matches);
     1318    $sitefeedquery = 'index.php?feed=_' . preg_index(1, $matches);
    13191319
    13201320    // Site comment feed
    13211321    $sitecommentfeedmatch = 'comments/feed/?([_0-9a-z-]+)?/?$';
    1322     $sitecommentfeedquery = 'wp-feed.php?feed=' . preg_index(1, $matches) . '&withcomments=1';
     1322    $sitecommentfeedquery = 'index.php?feed=_' . preg_index(1, $matches) . '&withcomments=1';
    13231323
    13241324    // Site page
     
    13441344    $author_structure = $front . 'author/%author%';
    13451345    $author_rewrite = generate_rewrite_rules($author_structure);
    1346 
    13471346
    13481347    // Put them together.
  • trunk/wp-trackback.php

    r1355 r1376  
    1111$blog_name = $_POST['blog_name'];
    1212
    13 require('wp-blog-header.php');
     13if (! $doing_trackback) {
     14    $doing_trackback = 1;
     15    require('wp-blog-header.php');
     16}
    1417
    1518if ( (($p != '') && ($p != 'all')) || ($name != '') ) {
Note: See TracChangeset for help on using the changeset viewer.