availability of rss is now configurable

This commit is contained in:
Thomas E. Horner
2011-07-08 09:33:51 +02:00
parent e8382b960a
commit fc942aacda
3 changed files with 26 additions and 3 deletions

View File

@@ -20,8 +20,16 @@
class comment_rss_Core {
static function available_feeds($item, $tag) {
$feeds["comment/newest"] = t("All new comments");
if ($item) {
$avail = module::get_var("comment", "rss_available");
if($avail == "none") {
return array();
}
if($avail == "both" || $avail == "newest") {
$feeds["comment/newest"] = t("All new comments");
}
if ($item && ($avail == "both" || $avail == "onitem")) {
$feeds["comment/item/$item->id"] =
t("Comments on %title", array("title" => html::purify($item->title)));
}