diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-10-20 11:40:31 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-10-20 11:40:31 +0200 |
commit | bb5b33a0d3963aabed2e7b55c67bb7b81492cf9e (patch) | |
tree | 3fde2940c90151f1f80b3cc7b5f8ff90628e503d /Zotlabs | |
parent | 53931017b99c6fc77fc7632747e51b06a89b2287 (diff) | |
download | volse-hubzilla-bb5b33a0d3963aabed2e7b55c67bb7b81492cf9e.tar.gz volse-hubzilla-bb5b33a0d3963aabed2e7b55c67bb7b81492cf9e.tar.bz2 volse-hubzilla-bb5b33a0d3963aabed2e7b55c67bb7b81492cf9e.zip |
fix more php warnings
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 9 | ||||
-rw-r--r-- | Zotlabs/Module/Appman.php | 6 | ||||
-rw-r--r-- | Zotlabs/Module/Cdav.php | 4 | ||||
-rw-r--r-- | Zotlabs/Widget/Cdav.php | 5 |
4 files changed, 15 insertions, 9 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index a29992bbc..ad80e1094 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -236,6 +236,7 @@ class Apps { $ret['photo'] = $baseurl . '/' . get_default_profile_photo(80); $ret['type'] = 'system'; + $ret['plugin'] = ''; foreach($ret as $k => $v) { if(strpos($v,'http') === 0) { @@ -600,12 +601,12 @@ class Apps { '$edit' => ((local_channel() && $installed && $mode == 'edit') ? t('Edit') : ''), '$delete' => ((local_channel() && $mode == 'edit') ? t('Delete') : ''), '$undelete' => ((local_channel() && $mode == 'edit') ? t('Undelete') : ''), - '$settings_url' => ((local_channel() && $installed && $mode == 'list') ? $papp['settings_url'] : ''), - '$deleted' => $papp['deleted'], + '$settings_url' => ((local_channel() && $installed && $mode == 'list' && isset($papp['settings_url'])) ? $papp['settings_url'] : ''), + '$deleted' => $papp['deleted'] ?? false, '$feature' => ((isset($papp['embed']) || $mode == 'edit') ? false : true), '$pin' => ((isset($papp['embed']) || $mode == 'edit') ? false : true), - '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true), - '$pinned' => ((strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true), + '$featured' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_featured_app') === false) ? false : true), + '$pinned' => ((isset($papp['categories']) && strpos($papp['categories'], 'nav_pinned_app') === false) ? false : true), '$mode' => $mode, '$add' => t('Add to app-tray'), '$remove' => t('Remove from app-tray'), diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php index d287115d4..2ada83c3e 100644 --- a/Zotlabs/Module/Appman.php +++ b/Zotlabs/Module/Appman.php @@ -13,7 +13,7 @@ class Appman extends \Zotlabs\Web\Controller { if(! local_channel()) return; - if($_POST['url']) { + if(isset($_POST['url']) && $_POST['url']) { $arr = array( 'uid' => intval($_REQUEST['uid']), 'url' => escape_tags($_REQUEST['url']), @@ -50,7 +50,7 @@ class Appman extends \Zotlabs\Web\Controller { return; } - if($_POST['install']) { + if(isset($_POST['install']) && $_POST['install']) { Apps::app_install(local_channel(),$papp); if(Apps::app_installed(local_channel(),$papp)) info( t('App installed.') . EOL); @@ -73,7 +73,7 @@ class Appman extends \Zotlabs\Web\Controller { } - if($_POST['delete']) { + if(isset($_POST['deleted']) && $_POST['deleted']) { // Fetch the app for sync before it is deleted (if it is deletable)) $sync = q("SELECT * FROM app WHERE app_channel = %d AND app_id = '%s' LIMIT 1", diff --git a/Zotlabs/Module/Cdav.php b/Zotlabs/Module/Cdav.php index 599552545..6c168b2c9 100644 --- a/Zotlabs/Module/Cdav.php +++ b/Zotlabs/Module/Cdav.php @@ -914,6 +914,7 @@ class Cdav extends Controller { head_add_js('/library/fullcalendar/packages/timegrid/main.min.js'); head_add_js('/library/fullcalendar/packages/list/main.min.js'); + $o = ''; $sources = ''; $resource_id = ''; $resource = null; @@ -921,6 +922,8 @@ class Cdav extends Controller { if(argc() == 3) $resource_id = argv(2); + $categories = ''; + if($resource_id) { $r = q("SELECT event.*, item.author_xchan, item.owner_xchan, item.plink, item.id as item_id FROM event LEFT JOIN item ON event.event_hash = item.resource_id WHERE event.uid = %d AND event.event_hash = '%s' LIMIT 1", @@ -944,7 +947,6 @@ class Cdav extends Controller { $resource = $r[0]; $catsenabled = feature_enabled(local_channel(),'categories'); - $categories = ''; if($catsenabled){ if($r[0]['term']) { $cats = get_terms_oftype($r[0]['term'], TERM_CATEGORY); diff --git a/Zotlabs/Widget/Cdav.php b/Zotlabs/Widget/Cdav.php index f84f5cb04..3a86f0d25 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) |