X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Frss.inc.php;h=0117fc0f65c814b715a6e5ecf3cf2a3a293cbdd0;hb=ba34dc615f6511353ee079dcaa7dbc08e3873f3f;hp=dfa0c43b6afd6b9a25d4d83fc5143f0082d88fe2;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/include/rss.inc.php b/include/rss.inc.php index dfa0c43..0117fc0 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 FROM aliases AS a - INNER JOIN auth_user_quick AS q ON ( a.id = q.user_id AND q.core_rss_hash = {?} ) + INNER JOIN auth_user_md5 AS u ON (a.id = u.user_id AND u.perms IN ("admin", "user")) + INNER JOIN auth_user_quick AS q ON (a.id = q.user_id AND q.core_rss_hash = {?}) WHERE a.alias = {?} AND a.type != "homonyme"', $hash, $alias); $uid = $res->fetchOneCell(); @@ -59,7 +50,10 @@ function init_rss($template, $alias, $hash, $require_uid = true) } } - header('Content-Type: application/rss+xml; charset=utf8'); + if ($template) { + $page->assign('rss_hash', $hash); + header('Content-Type: application/rss+xml; charset=utf8'); + } return $uid; }