-
- private static function isForumPost(array $item, array $owner)
- {
- if (($item['author-id'] == $item['owner-id']) ||
- ($owner['id'] == $item['contact-id']) ||
- ($item['uri'] != $item['parent-uri'])) {
- return false;
- }
-
- return self::isForum($item['contact-id']);
- }
-
- private static function isForum($contactid)
- {
- $fields = ['forum', 'prv'];
- $condition = ['id' => $contactid];
- $contact = DBA::selectFirst('contact', $fields, $condition);
- if (!DBA::isResult($contact)) {
- // Should never happen
- return false;
- }
-
- // Is it a forum?
- return ($contact['forum'] || $contact['prv']);
- }