Use new Model methods for groups
This commit is contained in:
parent
fe89e7760e
commit
abdecd2b2f
17 changed files with 65 additions and 63 deletions
|
|
@ -376,8 +376,7 @@ class User
|
|||
|
||||
// Create a group with no members. This allows somebody to use it
|
||||
// right away as a default group for new contacts.
|
||||
|
||||
group_add($newuid, t('Friends'));
|
||||
Group::create($newuid, t('Friends'));
|
||||
|
||||
$r = q("SELECT `id` FROM `group` WHERE `uid` = %d AND `name` = '%s'",
|
||||
intval($newuid),
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ use Friendica\Core\Worker;
|
|||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\GContact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Util\XML;
|
||||
|
||||
|
|
@ -37,7 +39,6 @@ require_once 'include/queue_fn.php';
|
|||
*/
|
||||
class Diaspora
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Return a list of relay servers
|
||||
*
|
||||
|
|
@ -2462,11 +2463,7 @@ class Diaspora
|
|||
|
||||
logger("Author ".$author." was added as contact number ".$contact_record["id"].".", LOGGER_DEBUG);
|
||||
|
||||
$def_gid = get_default_group($importer['uid'], $ret["network"]);
|
||||
|
||||
if (intval($def_gid)) {
|
||||
group_add_member($importer["uid"], "", $contact_record["id"], $def_gid);
|
||||
}
|
||||
Group::addMember(User::getDefaultGroup($importer['uid'], $ret["network"]), $contact_record['id']);
|
||||
|
||||
Contact::updateAvatar($ret["photo"], $importer['uid'], $contact_record["id"], true);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use Friendica\Core\Config;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Group;
|
||||
use Friendica\Network\Probe;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Protocol\OStatus;
|
||||
|
|
@ -349,9 +350,9 @@ class Notifier {
|
|||
}
|
||||
|
||||
$allow_people = expand_acl($parent['allow_cid']);
|
||||
$allow_groups = expand_groups(expand_acl($parent['allow_gid']),true);
|
||||
$allow_groups = Group::expand(expand_acl($parent['allow_gid']),true);
|
||||
$deny_people = expand_acl($parent['deny_cid']);
|
||||
$deny_groups = expand_groups(expand_acl($parent['deny_gid']));
|
||||
$deny_groups = Group::expand(expand_acl($parent['deny_gid']));
|
||||
|
||||
// if our parent is a public forum (forum_mode == 1), uplink to the origional author causing
|
||||
// a delivery fork. private groups (forum_mode == 2) do not uplink
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue