aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Widget
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-08-24 20:18:18 +0200
committerMario Vavti <mario@mariovavti.com>2017-08-24 20:18:18 +0200
commitcdccf601320ec7e59f5d96438edac34d5ea30085 (patch)
treed08cdd7e50dca5fbbffa96d922536db745bc0233 /Zotlabs/Widget
parentdf2725a360f173d7521d8a552608014968763288 (diff)
parent85f24c292f071b9a83aea0aa122231afd57e7f73 (diff)
downloadvolse-hubzilla-cdccf601320ec7e59f5d96438edac34d5ea30085.tar.gz
volse-hubzilla-cdccf601320ec7e59f5d96438edac34d5ea30085.tar.bz2
volse-hubzilla-cdccf601320ec7e59f5d96438edac34d5ea30085.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r--Zotlabs/Widget/Categories.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/Zotlabs/Widget/Categories.php b/Zotlabs/Widget/Categories.php
index d1dcfda93..84deb03d6 100644
--- a/Zotlabs/Widget/Categories.php
+++ b/Zotlabs/Widget/Categories.php
@@ -8,8 +8,13 @@ class Categories {
function widget($arr) {
+ $cards = ((array_key_exists('cards',$arr) && $arr['cards']) ? true : false);
+
+ if(($cards) && (! feature_enabled(\App::$profile['profile_uid'],'cards')))
+ return '';
+
if((! \App::$profile['profile_uid'])
- || (! perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),'view_stream'))) {
+ || (! perm_is_allowed(\App::$profile['profile_uid'],get_observer_hash(),(($cards) ? 'view_pages' : 'view_stream')))) {
return '';
}
@@ -18,6 +23,10 @@ class Categories {
$srchurl = rtrim(preg_replace('/cat\=[^\&].*?(\&|$)/is','',$srchurl),'&');
$srchurl = str_replace(array('?f=','&f='),array('',''),$srchurl);
- return categories_widget($srchurl, $cat);
+ if($cards)
+ return cardcategories_widget($srchurl, $cat);
+ else
+ return categories_widget($srchurl, $cat);
+
}
}