X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Frss.inc.php;h=0117fc0f65c814b715a6e5ecf3cf2a3a293cbdd0;hb=032b244ed3fd10b934697f2636fc9a4574822408;hp=9dc4f86d6aeac812ba028c34cc75d515ab67d5f5;hpb=dd9bac8f7903e9924525ad8db3e38650ff5ad1b6;p=platal.git diff --git a/include/rss.inc.php b/include/rss.inc.php index 9dc4f86..0117fc0 100644 --- a/include/rss.inc.php +++ b/include/rss.inc.php @@ -37,7 +37,8 @@ function init_rss($template, $alias, $hash, $require_uid = true) $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(); @@ -50,6 +51,7 @@ function init_rss($template, $alias, $hash, $require_uid = true) } if ($template) { + $page->assign('rss_hash', $hash); header('Content-Type: application/rss+xml; charset=utf8'); } return $uid;