X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Frss.inc.php;h=f292fe8c0d87203002d8d2b7580a3bdb9fc39bea;hb=7c7d62fce3e3973b576ffbc4051ba443d6a6b849;hp=9d38d3150c6cfd2053219269f245db7c74da6586;hpb=d4775fe2dea4db5e6ca3db4a6034bb03a8b711cc;p=platal.git diff --git a/include/rss.inc.php b/include/rss.inc.php index 9d38d31..f292fe8 100644 --- a/include/rss.inc.php +++ b/include/rss.inc.php @@ -1,6 +1,6 @@ changeTpl($template, NO_SKIN); - $uid = Platal::session()->tokenAuth($alias, $hash); - if (empty($uid)) { + $user = Platal::session()->tokenAuth($alias, $hash); + if (is_null($user)) { if ($require_uid) { exit; } else { - $uid = null; + $user = null; } } if ($template) { $page->assign('rss_hash', $hash); - header('Content-Type: application/rss+xml; charset=utf8'); + pl_content_headers("application/rss+xml"); } - return $uid; + return is_null($user) ? null : $user->id(); } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: