aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-12-14 11:02:20 +0000
committerMario <mario@mariovavti.com>2020-12-14 11:02:20 +0000
commit2a154f8c9a772d61e7dabb5e3fd110ba00cc6007 (patch)
treef57522c894e96f5a386f2fea9c379702b4c2781e /Zotlabs/Widget
parent634ace552d40f9f287a6419dd6fe5b19d3f390ca (diff)
downloadvolse-hubzilla-2a154f8c9a772d61e7dabb5e3fd110ba00cc6007.tar.gz
volse-hubzilla-2a154f8c9a772d61e7dabb5e3fd110ba00cc6007.tar.bz2
volse-hubzilla-2a154f8c9a772d61e7dabb5e3fd110ba00cc6007.zip
merge branch files_ng into dev
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Categories.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Categories.php b/Zotlabs/Widget/Categories.php
index 82c37cd0c..94ad469da 100644
--- a/Zotlabs/Widget/Categories.php
+++ b/Zotlabs/Widget/Categories.php
@@ -21,7 +21,9 @@ class Categories {
if(($articles) && (! Apps::system_app_installed(App::$profile['profile_uid'],'Articles')))
return '';
- if((! App::$profile['profile_uid'])
+ $files = ((array_key_exists('files',$arr) && $arr['files']) ? true : false);
+
+ if((! App::$profile['profile_uid'])
|| (! perm_is_allowed(App::$profile['profile_uid'],get_observer_hash(),(($cards || $articles) ? 'view_pages' : 'view_stream')))) {
return '';
}
@@ -29,12 +31,14 @@ class Categories {
$cat = ((x($_REQUEST,'cat')) ? htmlspecialchars($_REQUEST['cat'],ENT_COMPAT,'UTF-8') : '');
$srchurl = (($cards) ? App::$argv[0] . '/' . App::$argv[1] : App::$query_string);
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
- $srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
+ $srchurl = str_replace(array('?f=','&f=', '/?'),array('', '', ''),$srchurl);
if($cards)
return cardcategories_widget($srchurl, $cat);
elseif($articles)
return articlecategories_widget($srchurl, $cat);
+ elseif($files)
+ return filecategories_widget($srchurl, $cat);
else
return categories_widget($srchurl, $cat);