group fixes to import
This commit is contained in:
parent
89fbfd2bf8
commit
9b15dbde1c
@ -201,9 +201,19 @@ function import_post(&$a) {
|
|||||||
ref_session_write(session_id(), serialize($_SESSION));
|
ref_session_write(session_id(), serialize($_SESSION));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
$channel = $a->get_channel();
|
$r = q("select * from channel where channel_account_id = %d and channel_guid = '%s' limit 1",
|
||||||
|
intval(get_account_id()),
|
||||||
|
dbesc($channel['channel_guid'])
|
||||||
|
);
|
||||||
|
if($r)
|
||||||
|
$channel = $r[0];
|
||||||
|
else {
|
||||||
|
logger('mod_import: channel not found. ', print_r($channel,true));
|
||||||
|
notice( t('Cloned channel not found. Import failed.') . EOL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($completed < 2) {
|
if($completed < 2) {
|
||||||
|
|
||||||
@ -511,7 +521,7 @@ function import_post(&$a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$group_members = $data['group_member'];
|
$group_members = $data['group_member'];
|
||||||
if($groups_members) {
|
if($group_members) {
|
||||||
foreach($group_members as $group_member) {
|
foreach($group_members as $group_member) {
|
||||||
unset($group_member['id']);
|
unset($group_member['id']);
|
||||||
$group_member['uid'] = $channel['channel_id'];
|
$group_member['uid'] = $channel['channel_id'];
|
||||||
|
Reference in New Issue
Block a user