diff options
author | Mario <mario@mariovavti.com> | 2022-09-07 12:50:46 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-09-07 12:50:46 +0000 |
commit | fcfb9e975836c4abbbfd339d46bf8ea937747e57 (patch) | |
tree | bbe6a8f19831eba6f9488c8e26687362870e0021 /Zotlabs/Module | |
parent | 9beee689ce5537d0b64f20ccfe461eeb7c41ffa8 (diff) | |
download | volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.tar.gz volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.tar.bz2 volse-hubzilla-fcfb9e975836c4abbbfd339d46bf8ea937747e57.zip |
fix random php warnings
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Acl.php | 14 | ||||
-rw-r--r-- | Zotlabs/Module/Home.php | 2 | ||||
-rw-r--r-- | Zotlabs/Module/Hq.php | 16 | ||||
-rw-r--r-- | Zotlabs/Module/Sse_bs.php | 2 |
4 files changed, 10 insertions, 24 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 5b37f2707..9dc422e6b 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -66,6 +66,11 @@ class Acl extends \Zotlabs\Web\Controller { killme(); $permitted = []; + $sql_extra = ''; + $sql_extra2 = ''; + $sql_extra3 = ''; + $sql_extra2_xchan = ''; + $order_extra2 = ''; if(in_array($type, [ 'm', 'a', 'c', 'f' ])) { @@ -81,7 +86,6 @@ class Acl extends \Zotlabs\Web\Controller { } - if($search) { $sql_extra = " AND pgrp.gname LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " "; $sql_extra2 = "AND ( xchan_name LIKE " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " OR xchan_addr LIKE " . protect_sprintf( "'%" . dbesc(punify($search)) . ((strpos($search,'@') === false) ? "%@%'" : "%'")) . ") "; @@ -100,10 +104,6 @@ class Acl extends \Zotlabs\Web\Controller { $sql_extra3 = "AND ( xchan_addr like " . protect_sprintf( "'%" . dbesc(punify($search)) . "%'" ) . " OR xchan_name like " . protect_sprintf( "'%" . dbesc($search) . "%'" ) . " ) "; } - else { - $sql_extra = $sql_extra2 = $sql_extra3 = ""; - } - $groups = array(); $contacts = array(); @@ -342,7 +342,7 @@ class Acl extends \Zotlabs\Web\Controller { $x = []; foreach($r as $g) { - if(in_array($g['net'],['rss','anon','unknown']) && ($type != 'a')) + if(isset($g['net']) && in_array($g['net'], ['rss','anon','unknown']) && ($type != 'a')) continue; $g['hash'] = urlencode($g['hash']); @@ -383,7 +383,7 @@ class Acl extends \Zotlabs\Web\Controller { "self" => (intval($g['abook_self']) ? 'abook-self' : ''), "taggable" => '', "label" => '', - "net" => $g['net'] + "net" => $g['net'] ?? '' ); } } diff --git a/Zotlabs/Module/Home.php b/Zotlabs/Module/Home.php index 315d05af6..8d78960cc 100644 --- a/Zotlabs/Module/Home.php +++ b/Zotlabs/Module/Home.php @@ -36,7 +36,7 @@ class Home extends Controller { $channel = App::get_channel(); if (local_channel() && $channel && $channel['xchan_url'] && !$splash) { - $dest = (($ret['startpage']) ? $ret['startpage'] : ''); + $dest = $ret['startpage'] ?? ''; if (!$dest) $dest = get_config('system', 'startpage'); if (!$dest) diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php index efbfcf084..120f7caeb 100644 --- a/Zotlabs/Module/Hq.php +++ b/Zotlabs/Module/Hq.php @@ -47,24 +47,10 @@ class Hq extends \Zotlabs\Web\Controller { $sys = get_sys_channel(); $sys_item = false; $sql_extra = ''; - - if(! $item_hash) { - //$r = q("SELECT mid FROM item - //WHERE uid = %d $item_normal - //AND mid = parent_mid - //AND item_private IN (0, 1) - //ORDER BY created DESC LIMIT 1", - //intval(local_channel()) - //); - //if($r[0]['mid']) { - //$item_hash = $r[0]['mid']; - //} - } + $target_item = null; if($item_hash) { - $target_item = null; - $r = q("select id, uid, mid, parent_mid, thr_parent, verb, item_type, item_deleted, item_blocked from item where mid = '%s' limit 1", dbesc($item_hash) ); diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php index ad9be0938..619050aaf 100644 --- a/Zotlabs/Module/Sse_bs.php +++ b/Zotlabs/Module/Sse_bs.php @@ -41,7 +41,7 @@ class Sse_bs extends Controller { self::$offset = 0; self::$xchans = ''; - if($_REQUEST['sse_rmids']) + if(isset($_REQUEST['sse_rmids'])) self::mark_read($_REQUEST['sse_rmids']); if(!empty($_REQUEST['nquery']) && $_REQUEST['nquery'] !== '%') { |