aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-12-02 19:28:52 +0000
committerMario <mario@mariovavti.com>2022-12-02 19:28:52 +0000
commit2fd2dc964be32b5a298cded17d910200d9f2bc2d (patch)
tree02b6e2ec9131b4eaa6c7972fe3efe9afb7f56712
parent935b032f15583321e826fc1072e60734e5e2cd25 (diff)
parent6f0979614222f562ecf5a8e90f914126c9eaf9eb (diff)
downloadvolse-hubzilla-2fd2dc964be32b5a298cded17d910200d9f2bc2d.tar.gz
volse-hubzilla-2fd2dc964be32b5a298cded17d910200d9f2bc2d.tar.bz2
volse-hubzilla-2fd2dc964be32b5a298cded17d910200d9f2bc2d.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
-rw-r--r--Zotlabs/Widget/Categories.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/Zotlabs/Widget/Categories.php b/Zotlabs/Widget/Categories.php
index b31856e48..b0eda253b 100644
--- a/Zotlabs/Widget/Categories.php
+++ b/Zotlabs/Widget/Categories.php
@@ -24,15 +24,16 @@ class Categories {
}
$cat = ((x($_REQUEST, 'cat')) ? htmlspecialchars($_REQUEST['cat'], ENT_COMPAT, 'UTF-8') : '');
- $srchurl = App::$query_string;
- $srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is', '', $srchurl), '&');
- $srchurl = str_replace(['?f=','&f=', '/?'], ['', '', ''], $srchurl);
+
+ // Discard queries from the current URL, as the template expects a base
+ // URL without any queries.
+ $base = substr(App::$query_string, 0, strcspn(App::$query_string, '?'));
if($files) {
- return filecategories_widget($srchurl, $cat);
+ return filecategories_widget($base, $cat);
}
- return categories_widget($srchurl, $cat);
+ return categories_widget($base, $cat);
}
}