New delivery module for ap

This commit is contained in:
Michael 2018-09-17 21:13:08 +00:00
parent 91d1b4de5d
commit f772ece86f
7 changed files with 183 additions and 89 deletions

View file

@ -2851,7 +2851,7 @@ class Item extends BaseObject
}
// returns an array of contact-ids that are allowed to see this object
private static function enumeratePermissions($obj)
public static function enumeratePermissions($obj)
{
$allow_people = expand_acl($obj['allow_cid']);
$allow_groups = Group::expand(expand_acl($obj['allow_gid']));

View file

@ -33,6 +33,17 @@ class Term
return $tag_text;
}
public static function tagArrayFromItemId($itemid)
{
$condition = ['otype' => TERM_OBJ_POST, 'oid' => $itemid, 'type' => [TERM_HASHTAG, TERM_MENTION]];
$tags = DBA::select('term', ['type', 'term', 'url'], $condition);
if (!DBA::isResult($tags)) {
return [];
}
return DBA::toArray($tags);
}
public static function fileTextFromItemId($itemid)
{
$file_text = '';