WordPress.org

Make WordPress Core

Changeset 1044


Ignore:
Timestamp:
03/31/2004 09:25:48 PM (16 years ago)
Author:
michelvaldrighi
Message:

lastBuildDate now uses the last modification date (as GMT), redundant old conditional get code now removed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-rss.php

    r1022 r1044  
    99header('Content-type: text/xml', true);
    1010
    11 /* This doesn't take into account edits
    12 // Get the time of the most recent article
    13 $maxdate = $wpdb->get_var("SELECT max(post_date) FROM $tableposts");
    14 $unixtime = strtotime($maxdate);
    15 
    16 // format timestamp for Last-Modified header
    17 $clast = gmdate("D, d M Y H:i:s \G\M\T", $unixtime);
    18 $cetag = (isset($clast)) ? md5($clast) : '';
    19 
    20 // send it in a Last-Modified header
    21 header("Last-Modified: " . $clast, true);
    22 header("Etag: " . $cetag, true);
    23 */
    24 
    2511?>
    2612<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>
     
    3117        <link><?php bloginfo_rss("url") ?></link>
    3218        <description><?php bloginfo_rss("description") ?></description>
    33         <lastBuildDate><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</lastBuildDate>
     19        <lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_lastpostmodified('GMT')); ?></lastBuildDate>
    3420        <docs>http://backend.userland.com/rss092</docs>
    3521        <managingEditor><?php echo antispambot(get_settings('admin_email')) ?></managingEditor>
Note: See TracChangeset for help on using the changeset viewer.