viewgit/inc/functions.php:22 Function utf8_encode() is deprecated [8192]

Make link tag for rss feed for news, a=chris

Chris Pollett [2020-08-04 18:Aug:th]
Make link tag for rss feed for news, a=chris
Filename
src/controllers/SearchController.php
src/views/elements/GroupfeedElement.php
diff --git a/src/controllers/SearchController.php b/src/controllers/SearchController.php
index 5ef543f00..55df08001 100755
--- a/src/controllers/SearchController.php
+++ b/src/controllers/SearchController.php
@@ -908,6 +908,11 @@ class SearchController extends Controller implements CrawlConstants
         $data["SUBSEARCHES"] = $subsearches;
         if ($this->subsearch_name != "" && $this->subsearch_identifier != "") {
             $data["SUBSEARCH"] = $this->subsearch_name;
+            if ($no_query && !empty($data["SUBSEARCH"]) &&
+                !empty($this->subsearch_default_query)) {
+                $data['RSS_FEED_URL'] = B\subsearchUrl($data["SUBSEARCH"],true).
+                    "f=rss";
+            }
         }
         $data['IMAGE_SUBSEARCH_ENABLED'] =
             (empty($this->image_subsearch_enabled)) ? false : true;
diff --git a/src/views/elements/GroupfeedElement.php b/src/views/elements/GroupfeedElement.php
index 134cd3409..c127ff4c9 100644
--- a/src/views/elements/GroupfeedElement.php
+++ b/src/views/elements/GroupfeedElement.php
@@ -131,7 +131,7 @@ class GroupfeedElement extends Element implements CrawlConstants
                 "<div class=\"slight-pad\">" .
                 "<b>" . tl('groupfeed_element_last_post')
                 . "</b> ");
-                if ($group['THREAD_ID'] >= 0) {
+                if ($group['THREAD_ID'] >= 0 || $group['NUM_THREADS'] > 0) {
                     e("<a href=\"" . B\feedsUrl("thread", $group['THREAD_ID'],
                         true, $data['CONTROLLER']) . $token_string . "\">" .
                         $group['ITEM_TITLE'] . "</a>");
ViewGit