cards feature
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user