Merge pull request #471 from MrPetovan/task/3878-move-group-to-src

Move Group to src
This commit is contained in:
Michael Vogel 2017-12-10 13:33:20 +01:00 committed by GitHub
commit 042507e157
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 24 deletions

View file

@ -10,6 +10,8 @@ use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\Contact;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\User;
require 'addon/pumpio/oauth/http.php';
require 'addon/pumpio/oauth/oauth_client.php';
@ -1022,14 +1024,7 @@ function pumpio_get_contact($uid, $contact, $no_insert = false) {
$contact_id = $r[0]['id'];
$g = q("select def_gid from user where uid = %d limit 1",
intval($uid)
);
if($g && intval($g[0]['def_gid'])) {
require_once('include/group.php');
group_add_member($uid,'',$contact_id,$g[0]['def_gid']);
}
Group::addMember(User::getDefaultGroup($uid), $contact_id);
} else {
$contact_id = $r[0]["id"];

View file

@ -49,7 +49,9 @@ use Friendica\App;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\Photo;
use Friendica\Model\User;
class StatusNetOAuth extends TwitterOAuth
{
@ -1054,14 +1056,7 @@ function statusnet_fetch_contact($uid, $contact, $create_user)
$contact_id = $r[0]['id'];
$g = q("SELECT def_gid FROM user WHERE uid = %d LIMIT 1",
intval($uid)
);
if ($g && intval($g[0]['def_gid'])) {
require_once 'include/group.php';
group_add_member($uid, '', $contact_id, $g[0]['def_gid']);
}
Group::addMember(User::getDefaultGroup($uid), $contact_id);
$photos = Photo::importProfilePhoto($contact->profile_image_url, $uid, $contact_id);

View file

@ -65,7 +65,9 @@ use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\Worker;
use Friendica\Model\GContact;
use Friendica\Model\Group;
use Friendica\Model\Photo;
use Friendica\Model\User;
use Friendica\Object\Image;
require_once 'include/enotify.php';
@ -1055,14 +1057,7 @@ function twitter_fetch_contact($uid, $contact, $create_user)
$contact_id = $r[0]['id'];
$g = q("SELECT def_gid FROM user WHERE uid = %d LIMIT 1",
intval($uid)
);
if ($g && intval($g[0]['def_gid'])) {
require_once 'include/group.php';
group_add_member($uid, '', $contact_id, $g[0]['def_gid']);
}
Group::addMember(User::getDefaultGroup($uid), $contact_id);
$photos = Photo::importProfilePhoto($avatar, $uid, $contact_id, true);