Changeset 12 for trunk/RSS.php


Ignore:
Timestamp:
Dec 21, 2018, 8:51:54 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Use absolute links for RSS channels.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/RSS.php

    r10 r12  
    1818  function Generate()
    1919  {
     20    Header('Content-Type: text/xml; charset=utf-8');
    2021    $Result = '<?xml version="1.0" encoding="'.$this->Charset.'" ?>'."\n". //<?
    21   '<rss version="2.0">'."\n".
    22   "  <channel>\n".
    23   "    <title>".$this->Title."</title>\n".
    24   "    <link>".$this->Link."</link>\n".
    25   "    <description>".$this->Description."</description>\n".
    26   "    <language>cs</language>\n".
    27   "    <webMaster>".$this->WebmasterEmail."</webMaster>\n".
    28   "    <pubDate>".date('r')."</pubDate>\n".
    29   "    <ttl>20</ttl>\n";
     22      '<rss version="2.0">'."\n".
     23      "  <channel>\n".
     24      "    <title>".$this->Title."</title>\n".
     25      "    <link>".$this->Link."</link>\n".
     26      "    <description>".$this->Description."</description>\n".
     27      "    <language>cs</language>\n".
     28      "    <webMaster>".$this->WebmasterEmail."</webMaster>\n".
     29      "    <pubDate>".date('r')."</pubDate>\n".
     30      "    <ttl>20</ttl>\n";
    3031    foreach($this->Items as $Item)
    3132    {
     
    3334        '      <title>'.htmlspecialchars($Item['Title'])."</title>\n".
    3435        '      <description>'.htmlspecialchars($Item['Description'])."</description>\n".
    35   '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
    36   '      <link>'.$Item['Link']."</link>\n".
     36        '      <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".
     37        '      <link>'.$Item['Link']."</link>\n".
    3738        "    </item>\n";
    3839    }
Note: See TracChangeset for help on using the changeset viewer.