$uid = $r[0]['uid'];
$updated = $r[0]['edited'];
- // The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
+ // POSSIBLE CLEANUP --> The following seems superfluous. We've already checked for "if (! intval($r[0]['parent']))" a few lines up
if(! $parent_id)
continue;
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);
dbesc($nickname)
);
- if(count($x)) {
- if($owner['page-flags'] == PAGE_COMMUNITY && ! $x[0]['writable']) {
+ if($x && count($x)) {
+ $write_flag = ((($x[0]['rel']) && ($x[0]['rel'] != CONTACT_IS_SHARING)) ? true : false);
+ if((($owner['page-flags'] == PAGE_COMMUNITY) || ($write_flag)) && (! $x[0]['writable'])) {
q("update contact set writable = 1 where id = %d limit 1",
intval($x[0]['id'])
);
continue;
// private emails may be in included in public conversations. Filter them.
- if(($public_message) && $item['private'])
+ if(($public_message) && $item['private'] == 1)
continue;
$item_contact = get_item_contact($item,$icontacts);