Subversion Repositories SvarDOS

Compare Revisions

Ignore whitespace Rev 1229 → Rev 1228

/website/mateuszbb.php
97,8 → 97,6
 
function mateuszbb_rss() {
global $DATADIR;
global $RSS_TITLE;
 
$db = new SQLite3($DATADIR . 'mateuszbb.sqlite3', SQLITE3_OPEN_READONLY);
if (! $db) {
echo "SQL ERROR: ACCESS DENIED\n";
115,8 → 113,9
echo '<?xml version="1.0" encoding="utf-8" ?>' . "\n";
echo '<rss version="2.0">' . "\n";
echo "<channel>\n";
echo "<title>" . htmlspecialchars($RSS_TITLE, ENT_XML1) . "</title>\n";
echo "<link>" . selfurl(). "</link>\n";
echo "<title>Forum Ul Warré</title>\n";
echo "<link>https://ulwarre.pl/forum/</link>\n";
echo "<description>Forum na temat ula ojca Warré</description>\n";
 
while ($row = $sqlres->fetchArray()) {
$rawtitle = file_get_contents($DATADIR . 'threads/' . $row['thread'] . '/title.txt');
123,20 → 122,13
if (empty($rawtitle)) continue;
$title = htmlspecialchars($rawtitle, ENT_XML1, 'UTF-8');
$author = htmlspecialchars($row['author'], ENT_XML1, 'UTF-8');
if ($NICE_URLS) {
$link = selfurl();
if (substr($link, -1) !== '/') $link .= '/';
$link .= "{$row['thread']}";
} else {
$link = selfurl('thread=' . $row['thread']);
}
$link .= '#' . $row['msgid'];
$link = "https://ulwarre.pl/forum/{$row['thread']}#{$row['msgid']}";
echo "<item>\n";
echo "<title>{$author} @ '{$title}'</title>\n";
echo "<link>" . htmlspecialchars($link, ENT_XML1) . "</link>\n";
echo "<description>{$author} @ '{$title}'</description>\n";
echo "<title>{$author} napisał(a) wiadomość w wątku '{$title}'</title>\n";
echo "<link>{$link}</link>\n";
echo "<description>{$author} napisał(a) wiadomość w wątku '{$title}'</description>\n";
echo "<pubDate>" . date('r', $row['msgid']) . "</pubDate>\n";
echo "<guid>" . htmlspecialchars($link, ENT_XML1) . "</guid>\n";
echo "<guid>{$link}</guid>\n";
echo "</item>\n";
}
$db->close();