X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Frss.inc.php;h=9d38d3150c6cfd2053219269f245db7c74da6586;hb=a9cd2babbdceaeb57e9de04ce0e7113a14926ec1;hp=41ede2cf6f900561bfba8b1d85f5b1cb6d0c0b1d;hpb=963c0b2e2125e4ba08348fcf3a13a6eba1204a3e;p=platal.git diff --git a/include/rss.inc.php b/include/rss.inc.php index 41ede2c..9d38d31 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 = {?} ) - WHERE a.alias = {?} AND a.type != "homonyme"', $hash, $alias); - $uid = $res->fetchOneCell(); - + $uid = Platal::session()->tokenAuth($alias, $hash); if (empty($uid)) { if ($require_uid) { exit; @@ -60,8 +33,9 @@ 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; }