Bugfix: "default_group" behaviour wasn't implemented correctly

This commit is contained in:
Michael Vogel 2016-04-13 22:21:23 +02:00 committed by Roland Haeder
parent bc720c0918
commit 535f382c4e
No known key found for this signature in database
GPG key ID: B72F8185C6C7BD78
5 changed files with 17 additions and 23 deletions

View file

@ -11,6 +11,7 @@
require_once('include/enotify.php');
require_once('include/Scrape.php');
require_once('include/group.php');
if(! function_exists('dfrn_request_init')) {
function dfrn_request_init(&$a) {
@ -181,10 +182,9 @@ function dfrn_request_post(&$a) {
);
if(count($r)) {
$def_gid = get_default_group(local_user(), $r[0]["network"]);
if(intval($def_gid)) {
require_once('include/group.php');
if(intval($def_gid))
group_add_member(local_user(), '', $r[0]['id'], $def_gid);
}
$forwardurl = $a->get_baseurl()."/contacts/".$r[0]['id'];
} else
$forwardurl = $a->get_baseurl()."/contacts";
@ -394,10 +394,8 @@ function dfrn_request_post(&$a) {
$contact_id = $r[0]['id'];
$def_gid = get_default_group($uid, $r[0]["network"]);
if (intval($def_gid)) {
require_once('include/group.php');
if (intval($def_gid))
group_add_member($uid, '', $contact_id, $def_gid);
}
$photo = avatar_img($addr);