aboutsummaryrefslogtreecommitdiffstats
path: root/include/widgets.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-05-27 06:35:15 -0400
committerAndrew Manning <tamanning@zoho.com>2016-05-27 06:35:15 -0400
commitd554681174084e1715dfae4c21af9f6edcbad59e (patch)
treeeb585cce4ebe24d663b2e7eab28a62da612efec1 /include/widgets.php
parente00b8a70829213a4333a53a097c2c498d529f5d6 (diff)
parent551cf8ee9413c5c57e7b71d6016466e598636900 (diff)
downloadvolse-hubzilla-d554681174084e1715dfae4c21af9f6edcbad59e.tar.gz
volse-hubzilla-d554681174084e1715dfae4c21af9f6edcbad59e.tar.bz2
volse-hubzilla-d554681174084e1715dfae4c21af9f6edcbad59e.zip
Merge remote-tracking branch 'upstream/dev' into wiki
Diffstat (limited to 'include/widgets.php')
-rw-r--r--include/widgets.php17
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'])