diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-10-13 16:38:18 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-10-13 16:38:18 +0200 |
commit | 71accb6b0a2aa5e3c77f7ef73d685639d0c6526a (patch) | |
tree | f38a48b65f692aab7076bb0ba23818295c2960f1 /Zotlabs/Lib | |
parent | 2a95500b6538f130df9434f1fb253247872679e8 (diff) | |
download | volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.gz volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.tar.bz2 volse-hubzilla-71accb6b0a2aa5e3c77f7ef73d685639d0c6526a.zip |
fix php warnings
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 11 | ||||
-rw-r--r-- | Zotlabs/Lib/ThreadItem.php | 5 |
2 files changed, 12 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index a19af98e3..01d403c09 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -473,7 +473,7 @@ class Libzot { unset($new_connection[0]['abook_account']); unset($new_connection[0]['abook_channel']); - $abconfig = load_abconfig($channel['channel_id'], $new_connection['abook_xchan']); + $abconfig = load_abconfig($channel['channel_id'], $new_connection[0]['abook_xchan']); if ($abconfig) { $new_connection['abconfig'] = $abconfig; @@ -1979,13 +1979,18 @@ class Libzot { logger('FOF Activity rejected: ' . print_r($activity, true)); continue; } - $arr = Activity::decode_note($AS); // logger($AS->debug()); + if(empty($AS->actor['id'])) { + logger('No actor id!'); + continue; + } + $r = q("select hubloc_hash, hubloc_network from hubloc where hubloc_id_url = '%s'", dbesc($AS->actor['id']) ); + $r = self::zot_record_preferred($r); if (!$r) { @@ -2010,6 +2015,8 @@ class Libzot { } } + $arr = Activity::decode_note($AS); + if ($r) { $arr['author_xchan'] = $r['hubloc_hash']; } diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php index 0343dc1e5..472e2c6db 100644 --- a/Zotlabs/Lib/ThreadItem.php +++ b/Zotlabs/Lib/ThreadItem.php @@ -240,6 +240,7 @@ class ThreadItem { } $like_button_label = tt('Like','Likes',$like_count,'noun'); + $showdislike = ''; if (feature_enabled($conv->get_profile_owner(),'dislike')) { $dislike_count = ((x($conv_responses['dislike'],$item['mid'])) ? $conv_responses['dislike'][$item['mid']] : ''); $dislike_list = ((x($conv_responses['dislike'],$item['mid'])) ? $conv_responses['dislike'][$item['mid'] . '-l'] : ''); @@ -250,11 +251,11 @@ class ThreadItem { } else { $dislike_list_part = ''; } + + $showdislike = ((x($conv_responses['dislike'],$item['mid'])) ? format_like($conv_responses['dislike'][$item['mid']],$conv_responses['dislike'][$item['mid'] . '-l'],'dislike',$item['mid']) : ''); } $showlike = ((x($conv_responses['like'],$item['mid'])) ? format_like($conv_responses['like'][$item['mid']],$conv_responses['like'][$item['mid'] . '-l'],'like',$item['mid']) : ''); - $showdislike = ((x($conv_responses['dislike'],$item['mid']) && feature_enabled($conv->get_profile_owner(),'dislike')) - ? format_like($conv_responses['dislike'][$item['mid']],$conv_responses['dislike'][$item['mid'] . '-l'],'dislike',$item['mid']) : ''); /* * We should avoid doing this all the time, but it depends on the conversation mode |