diff --git a/README.md b/README.md index 2f000cc58..7a1f81a47 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,32 @@ ZAP Zap is an open source decentralised social network with more privacy and less drama. + +===== + +The Zot Manifesto + +You have the right to a permanent internet identity which is not associated with what server you are currently using and cannot be taken away from you by anybody, ever. + +You have the right to refuse/reject or possibly moderate comments on your posts by anybody you don't know. + +You also have the right to not allow them to comment on your posts in the first place, until such time as they have earned your trust. + +You have the right to show your photos and videos to anybody you desire and also NOT show them to anybody you desire. + +If your software does not implement these rights, you have the right to fix it or replace it. + +===== + +The Earth Manifesto + +The earth is your mother. She gave you life. Respect her or she will take it away. + +Silence is complicity. Speak. + +Those who are leading us to destruction can be stopped. + +7.5 billion people cannot be stopped. + +===== + diff --git a/include/connections.php b/include/connections.php index 6a99973c4..984fd6fe3 100644 --- a/include/connections.php +++ b/include/connections.php @@ -140,7 +140,7 @@ function vcard_from_xchan($xchan, $observer = null, $mode = '') { return replace_macros(get_markup_template('xchan_vcard.tpl'),array( '$name' => $xchan['xchan_name'], '$photo' => ((is_array(App::$profile) && array_key_exists('photo',App::$profile)) ? App::$profile['photo'] : $xchan['xchan_photo_l']), - '$follow' => (($xchan['xchan_addr']) ? $xchan['xchan_addr'] : $xchan['xchan_url']), + '$follow' => urlencode(($xchan['xchan_addr']) ? $xchan['xchan_addr'] : $xchan['xchan_url']), '$link' => zid($xchan['xchan_url']), '$connect' => $connect, '$newwin' => (($mode === 'chanview') ? t('New window') : ''), diff --git a/include/conversation.php b/include/conversation.php index afcd15a7e..f2a964bbd 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1479,21 +1479,26 @@ function jot_collections($channel,$collections) { } function get_item_children($arr, $parent) { - $children = array(); - foreach($arr as $item) { - if($item['id'] != $item['parent']) { - if(get_config('system','thread_allow',true)) { + + $children = []; + if (! $arr) { + return $children; + } + foreach ($arr as $item) { + if (intval($item['id']) !== intval($item['parent'])) { + if (get_config('system','thread_allow',true)) { // Fallback to parent_mid if thr_parent is not set $thr_parent = $item['thr_parent']; - if($thr_parent === '') + if ($thr_parent === '') { $thr_parent = $item['parent_mid']; + } - if($thr_parent === $parent['mid']) { + if ($thr_parent === $parent['mid']) { $item['children'] = get_item_children($arr, $item); $children[] = $item; } } - else if($item['parent'] == $parent['id']) { + elseif ($item['parent'] == $parent['id']) { $children[] = $item; } }