X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fitems.php;h=275052c1fdb73deab8337c78b2b840f8168994ad;hb=0305aa2d8218a0919526a08910ffaebfdc5bb2c5;hp=0779ed91e19da00bf3f4eec2ac984f57cf37a3db;hpb=5ba6c7717a06842c27fec15508ff8cabb3d9a31b;p=friendica.git diff --git a/include/items.php b/include/items.php index 0779ed91e1..275052c1fd 100644 --- a/include/items.php +++ b/include/items.php @@ -12,9 +12,12 @@ use Friendica\Core\System; use Friendica\Database\DBM; use Friendica\Model\Contact; use Friendica\Model\GContact; +use Friendica\Model\Group; +use Friendica\Model\User; use Friendica\Object\Image; use Friendica\Protocol\DFRN; use Friendica\Protocol\OStatus; +use Friendica\Protocol\Feed; require_once 'include/bbcode.php'; require_once 'include/oembed.php'; @@ -24,10 +27,8 @@ require_once 'include/files.php'; require_once 'include/text.php'; require_once 'include/threads.php'; require_once 'include/plaintext.php'; -require_once 'include/feed.php'; require_once 'mod/share.php'; require_once 'include/enotify.php'; -require_once 'include/group.php'; function construct_verb($item) { if ($item['verb']) { @@ -41,7 +42,6 @@ function construct_verb($item) { * The purpose of this function is to apply system message length limits to * imported messages without including any embedded photos in the length */ -if (! function_exists('limit_body_size')) { function limit_body_size($body) { // logger('limit_body_size: start', LOGGER_DEBUG); @@ -124,7 +124,7 @@ function limit_body_size($body) { } else { return $body; } -}} +} function title_is_body($title, $body) { @@ -1550,7 +1550,7 @@ function consume_feed($xml, $importer, &$contact, &$hub, $datedir = 0, $pass = 0 if ($contact['network'] === NETWORK_FEED) { if ($pass < 2) { logger("Consume feeds", LOGGER_DEBUG); - feed_import($xml, $importer, $contact, $hub); + Feed::import($xml, $importer, $contact, $hub); } return; } @@ -1720,11 +1720,7 @@ function new_follower($importer, $contact, $datarray, $item, $sharing = false) { 'hash' => $hash, 'datetime' => datetime_convert())); } - $def_gid = get_default_group($importer['uid'], $contact_record["network"]); - - if (intval($def_gid)) { - group_add_member($importer['uid'], '', $contact_record['id'], $def_gid); - } + Group::addMember(User::getDefaultGroup($importer['uid'], $contact_record["network"]), $contact_record['id']); if (($r[0]['notify-flags'] & NOTIFY_INTRO) && in_array($r[0]['page-flags'], array(PAGE_NORMAL))) { @@ -1958,9 +1954,9 @@ function compare_permissions($obj1, $obj2) { /// @TODO type-hint is array function enumerate_permissions($obj) { $allow_people = expand_acl($obj['allow_cid']); - $allow_groups = expand_groups(expand_acl($obj['allow_gid'])); + $allow_groups = Group::expand(expand_acl($obj['allow_gid'])); $deny_people = expand_acl($obj['deny_cid']); - $deny_groups = expand_groups(expand_acl($obj['deny_gid'])); + $deny_groups = Group::expand(expand_acl($obj['deny_gid'])); $recipients = array_unique(array_merge($allow_people, $allow_groups)); $deny = array_unique(array_merge($deny_people, $deny_groups)); $recipients = array_diff($recipients, $deny);