diff options
Diffstat (limited to 'modules/comment/helpers')
-rw-r--r-- | modules/comment/helpers/comment_installer.php | 8 | ||||
-rw-r--r-- | modules/comment/helpers/comment_rss.php | 12 |
2 files changed, 17 insertions, 3 deletions
diff --git a/modules/comment/helpers/comment_installer.php b/modules/comment/helpers/comment_installer.php index 5c6bd586..327e4941 100644 --- a/modules/comment/helpers/comment_installer.php +++ b/modules/comment/helpers/comment_installer.php @@ -48,7 +48,8 @@ class comment_installer { module::set_var("comment", "spam_caught", 0); module::set_var("comment", "access_permissions", "everybody"); - module::set_version("comment", 4); + module::set_var("comment", "rss_available", "both"); + module::set_version("comment", 5); } static function upgrade($version) { @@ -75,6 +76,11 @@ class comment_installer { "ALTER TABLE {comments} CHANGE `server_remote_host` `server_remote_host` varchar(255)"); module::set_version("comment", $version = 4); } + + if ($version == 4) { + module::set_var("comment", "rss_available", "both"); + module::set_version("comment", $version = 5); + } } static function uninstall() { diff --git a/modules/comment/helpers/comment_rss.php b/modules/comment/helpers/comment_rss.php index d04e74cf..dd6efd87 100644 --- a/modules/comment/helpers/comment_rss.php +++ b/modules/comment/helpers/comment_rss.php @@ -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))); } |