X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Frss.inc.php;h=22a8a2b947ab9a96722345f519ca1d5f25acadb7;hb=52e30b581cddb796b19186139c8c79997f659936;hp=afe4c86965869e715cd45fca5072db0d49f0e48d;hpb=a3a049fc80d3707bcc76903ab89f73974c470c0c;p=platal.git diff --git a/include/rss.inc.php b/include/rss.inc.php index afe4c86..22a8a2b 100644 --- a/include/rss.inc.php +++ b/include/rss.inc.php @@ -1,6 +1,6 @@ changeTpl($template, NO_SKIN); $page->register_modifier('rss_date', '_rss_encode_date'); - $page->default_modifiers = Array('@to_rss'); $res = XDB::query( 'SELECT a.id @@ -52,12 +42,18 @@ function init_rss($template, $alias, $hash) $uid = $res->fetchOneCell(); if (empty($uid)) { - exit; + if ($require_uid) { + exit; + } else { + $uid = null; + } } - header('Content-Type: application/rss+xml; charset=utf8'); + if ($template) { + header('Content-Type: application/rss+xml; charset=utf8'); + } return $uid; } -// vim:set et sw=4 sts=4 sws=4 foldmethod=marker: +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>