From 84709381af32c38df9da9150cea56b2f654fea97 Mon Sep 17 00:00:00 2001 From: onli Date: Sun, 3 Jul 2016 23:01:17 +0200 Subject: [PATCH] Fix: Category feed showed all entries --- include/functions_routing.inc.php | 3 +-- index.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/functions_routing.inc.php b/include/functions_routing.inc.php index f692aa1f..56b578dc 100644 --- a/include/functions_routing.inc.php +++ b/include/functions_routing.inc.php @@ -292,7 +292,7 @@ function servePlugin($matches) { serendipity_plugin_api::hook_event('external_plugin', $matches[2]); } -function serveFeed() { +function serveFeed($matches) { global $serendipity; $serendipity['view'] = 'feed'; header('Content-Type: text/html; charset=utf-8'); @@ -301,7 +301,6 @@ function serveFeed() { if (preg_match('@/(index|atom[0-9]*|rss|comments|trackbacks|comments_and_trackbacks|opml)\.(rss[0-9]?|rdf|rss|xml|atom)@', $uri, $vmatches)) { list($_GET['version'], $_GET['type']) = serendipity_discover_rss($vmatches[1], $vmatches[2]); } - if (is_array($matches)) { if (preg_match('@(/?' . preg_quote(PATH_FEEDS, '@') . '/)(.+?)(?:\.rss)?$@i', $uri, $uriparts)) { if (strpos($uriparts[2], $serendipity['permalinkCategoriesPath']) === 0) { diff --git a/index.php b/index.php index 7f42886b..83839358 100644 --- a/index.php +++ b/index.php @@ -74,7 +74,7 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range isset($_GET['p'])) { serveEntry($matches); } elseif (preg_match(PAT_PERMALINK_FEEDCATEGORIES, $uri, $matches) || preg_match(PAT_PERMALINK_FEEDAUTHORS, $uri, $matches) || preg_match(PAT_FEEDS, $uri)) { - serveFeed(); + serveFeed($matches); exit; } else if (preg_match(PAT_PLUGIN, $uri, $matches)) { servePlugin($matches);