diff options
Diffstat (limited to 'include/widgets.php')
-rw-r--r-- | include/widgets.php | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/widgets.php b/include/widgets.php index cff58d225..1cc6dfc28 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -8,17 +8,17 @@ require_once('include/dir_fns.php'); require_once('include/contact_widgets.php'); require_once('include/attach.php'); -require_once('include/Contact.php'); + function widget_profile($args) { - $block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false); + $block = observer_prohibited(); return profile_sidebar(App::$profile, $block, true); } function widget_zcard($args) { - $block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false); + $block = observer_prohibited(); $channel = channelx_by_n(App::$profile_uid); return get_zcard($channel,get_observer_hash(),array('width' => 875)); } @@ -369,7 +369,7 @@ function widget_fullprofile($arr) { if(! App::$profile['profile_uid']) return; - $block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false); + $block = observer_prohibited(); return profile_sidebar(App::$profile, $block); } @@ -379,7 +379,7 @@ function widget_shortprofile($arr) { if(! App::$profile['profile_uid']) return; - $block = (((get_config('system', 'block_public')) && (! local_channel()) && (! remote_channel())) ? true : false); + $block = observer_prohibited(); return profile_sidebar(App::$profile, $block, true, true); } @@ -771,7 +771,6 @@ function widget_eventstools($arr) { } function widget_design_tools($arr) { - $a = get_app(); // mod menu doesn't load a profile. For any modules which load a profile, check it. // otherwise local_channel() is sufficient for permissions. @@ -806,7 +805,6 @@ function widget_photo_albums($arr) { function widget_vcard($arr) { - require_once ('include/Contact.php'); return vcard_from_xchan('', App::get_observer()); } @@ -835,8 +833,7 @@ function widget_menu_preview($arr) { function widget_chatroom_list($arr) { - require_once("include/chat.php"); - $r = chatroom_list(App::$profile['profile_uid']); + $r = Zotlabs\Lib\Chatroom::roomlist(App::$profile['profile_uid']); if($r) { return replace_macros(get_markup_template('chatroomlist.tpl'), array( @@ -1085,7 +1082,7 @@ function widget_photo($arr) { function widget_cover_photo($arr) { - require_once('include/identity.php'); + require_once('include/channel.php'); $o = ''; if(App::$module == 'channel' && $_REQUEST['mid']) |