php8: daily warning fixes (deriving from mod network)

This commit is contained in:
Mario
2021-03-11 13:03:54 +00:00
parent db0e1c9f31
commit f980c2e3de
3 changed files with 12 additions and 9 deletions

View File

@@ -130,17 +130,19 @@ class Network extends \Zotlabs\Web\Controller {
$pf = ((x($_GET,'pf')) ? $_GET['pf'] : '');
$unseen = ((x($_GET,'unseen')) ? $_GET['unseen'] : '');
if (Apps::system_app_installed(local_channel(),'Affinity Tool')) {
if (Apps::system_app_installed(local_channel(),'Affinity Tool')) {
$affinity_locked = intval(get_pconfig(local_channel(),'affinity','lock',1));
if ($affinity_locked) {
set_pconfig(local_channel(),'affinity','cmin',$cmin);
set_pconfig(local_channel(),'affinity','cmax',$cmax);
set_pconfig(local_channel(),'affinity','cmin',$cmin);
set_pconfig(local_channel(),'affinity','cmax',$cmax);
}
}
}
if(x($_GET,'search') || $file || (!$pf && $cid) || $hashtags || $verb || $category || $conv || $unseen)
$nouveau = true;
$cid_r = [];
if($cid) {
$cid_r = q("SELECT abook.abook_xchan, xchan.xchan_addr, xchan.xchan_name, xchan.xchan_url, xchan.xchan_photo_s, xchan.xchan_pubforum from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and abook_blocked = 0 limit 1",
intval($cid),

View File

@@ -63,6 +63,7 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
$single_group = false;
$just_me = false;
$custom = false;
$groups = '';
if($allow_cid || $allow_gid || $deny_gid || $deny_cid) {
$has_acl = true;
@@ -112,11 +113,11 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
$forums_count = 0;
$forum_otions = '';
foreach($forums as $f) {
if($f['no_post_perms'])
if(isset($f['no_post_perms']))
continue;
$private = (($f['private_forum']) ? ' (' . t('Private Forum') . ')' : '');
$selected = (($single_group && $f['hash'] === $allow_cid[0]) ? ' selected = "selected" ' : '');
$private = ((isset($f['private_forum'])) ? ' (' . t('Private Forum') . ')' : '');
$selected = (($single_group && isset($f['hash'], $allow_cid[0]) && $f['hash'] === $allow_cid[0]) ? ' selected = "selected" ' : '');
$forum_otions .= '<option id="^' . $f['abook_id'] . '" value="^' . $f['xchan_hash'] . '"' . $selected . '>' . $f['xchan_name'] . $private . '</option>' . "\r\n";
$forums_count++;
}
@@ -133,7 +134,7 @@ function populate_acl($defaults = null,$show_jotnets = true, $emptyACL_descripti
$o = replace_macros($tpl, array(
'$showall' => $showall_caption,
'$onlyme' => t('Only me'),
'$groups' => $groups,
'$groups' => $groups,
'$public_selected' => (($has_acl) ? false : true),
'$justme_selected' => $just_me,
'$custom_selected' => $custom,

View File

@@ -3691,7 +3691,7 @@ function get_forum_channels($uid) {
if(! $uid)
return;
if(App::$data['forum_channels'])
if(isset(App::$data['forum_channels']))
return App::$data['forum_channels'];
$xf = '';