diff options
Diffstat (limited to 'Zotlabs/Widget')
-rw-r--r-- | Zotlabs/Widget/Categories.php | 2 | ||||
-rw-r--r-- | Zotlabs/Widget/Cdav.php | 8 | ||||
-rw-r--r-- | Zotlabs/Widget/Fullprofile.php | 2 | ||||
-rw-r--r-- | Zotlabs/Widget/Helpindex.php | 2 | ||||
-rw-r--r-- | Zotlabs/Widget/Messages.php | 2 | ||||
-rw-r--r-- | Zotlabs/Widget/Permcats.php | 5 | ||||
-rw-r--r-- | Zotlabs/Widget/Photo_albums.php | 3 | ||||
-rw-r--r-- | Zotlabs/Widget/Profile.php | 2 |
8 files changed, 15 insertions, 11 deletions
diff --git a/Zotlabs/Widget/Categories.php b/Zotlabs/Widget/Categories.php index 0a1c80061..b31856e48 100644 --- a/Zotlabs/Widget/Categories.php +++ b/Zotlabs/Widget/Categories.php @@ -19,7 +19,7 @@ class Categories { $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(), 'view_stream')) { + if(!isset(App::$profile['profile_uid']) || !perm_is_allowed(App::$profile['profile_uid'], get_observer_hash(), 'view_stream')) { return ''; } diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index f84f5cb04..f5c3c3799 100644 --- a/Zotlabs/Widget/Cdav.php +++ b/Zotlabs/Widget/Cdav.php @@ -38,7 +38,7 @@ class Cdav { intval($channel['channel_id']) ); - $sharee_options .= '<option value="">' . t('Select Channel') . '</option>' . "\r\n"; + $sharee_options = '<option value="">' . t('Select Channel') . '</option>' . "\r\n"; foreach($local_channels as $local_channel) { $sharee_options .= '<option value="' . $local_channel['channel_hash'] . '">' . $local_channel['channel_name'] . '</option>' . "\r\n"; } @@ -46,6 +46,9 @@ class Cdav { $access_options = '<option value="3">' . t('Read-write') . '</option>' . "\r\n"; $access_options .= '<option value="2">' . t('Read-only') . '</option>' . "\r\n"; + $shared_calendars = []; + $my_calendars = []; + //list calendars foreach($sabrecals as $sabrecal) { if($sabrecal['share-access'] == 1) @@ -66,7 +69,6 @@ class Cdav { $editable = (($sabrecal['share-access'] == 2) ? 'false' : 'true'); // false/true must be string since we're passing it to javascript $sharees = []; - $share_displayname = []; foreach($invites as $invite) { if(strpos($invite->href, 'mailto:') !== false) { @@ -111,7 +113,7 @@ class Cdav { if(!$access || $access === 'read-write') { $writable_calendars[] = [ - 'displayname' => ((!$access) ? $sabrecal['{DAV:}displayname'] : $share_displayname[0]), + 'displayname' => $sabrecal['{DAV:}displayname'], 'id' => $sabrecal['id'] ]; } diff --git a/Zotlabs/Widget/Fullprofile.php b/Zotlabs/Widget/Fullprofile.php index edff88e31..e40188c9e 100644 --- a/Zotlabs/Widget/Fullprofile.php +++ b/Zotlabs/Widget/Fullprofile.php @@ -12,7 +12,7 @@ class Fullprofile { function widget($arr) { - if(! \App::$profile['profile_uid']) + if(!(isset(\App::$profile['profile_uid']) && \App::$profile['profile_uid'])) return; $block = observer_prohibited(); diff --git a/Zotlabs/Widget/Helpindex.php b/Zotlabs/Widget/Helpindex.php index fbcd8c8b2..63e686d3a 100644 --- a/Zotlabs/Widget/Helpindex.php +++ b/Zotlabs/Widget/Helpindex.php @@ -13,7 +13,7 @@ class Helpindex { require_once('include/help.php'); - $o .= '<div class="widget">'; + $o = '<div class="widget">'; $level_0 = get_help_content('sitetoc'); if(! $level_0) { diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php index c92b9e311..267467bb0 100644 --- a/Zotlabs/Widget/Messages.php +++ b/Zotlabs/Widget/Messages.php @@ -198,6 +198,8 @@ class Messages { } } + $recipients = ''; + if(is_array($recips)) { stringify_array_elms($recips, true); diff --git a/Zotlabs/Widget/Permcats.php b/Zotlabs/Widget/Permcats.php index 9226b3c71..9bda5b8f1 100644 --- a/Zotlabs/Widget/Permcats.php +++ b/Zotlabs/Widget/Permcats.php @@ -24,6 +24,7 @@ class Permcats { $roles = []; $active_role = ''; + $members = []; foreach($pcatlist as $pc) { if (!$active_role) { @@ -76,8 +77,6 @@ class Permcats { dbesc($active_role) ); - $members = []; - foreach ($r as $rr) { $members[] = [ 'name' => $rr['xchan_name'], @@ -89,7 +88,7 @@ class Permcats { } $tpl = get_markup_template("permcats_widget.tpl"); - $o .= replace_macros($tpl, [ + $o = replace_macros($tpl, [ '$roles_label' => t('Contact roles'), '$members_label' => t('Role members'), '$roles' => $roles, diff --git a/Zotlabs/Widget/Photo_albums.php b/Zotlabs/Widget/Photo_albums.php index 2ce916048..d0004e68d 100644 --- a/Zotlabs/Widget/Photo_albums.php +++ b/Zotlabs/Widget/Photo_albums.php @@ -14,8 +14,9 @@ class Photo_albums { function widget($arr) { - if(! \App::$profile['profile_uid']) + if (!(isset(\App::$profile['profile_uid']) && \App::$profile['profile_uid'])) { return ''; + } $channelx = channelx_by_n(\App::$profile['profile_uid']); diff --git a/Zotlabs/Widget/Profile.php b/Zotlabs/Widget/Profile.php index a0bb1a66a..9e04524c1 100644 --- a/Zotlabs/Widget/Profile.php +++ b/Zotlabs/Widget/Profile.php @@ -13,7 +13,7 @@ use App; class Profile { function widget($args) { - if(!App::$profile['profile_uid']) { + if(!isset(App::$profile['profile_uid'])) { return; } |