reparenting imported item was only partially reparenting.
This commit is contained in:
parent
7eb7f77413
commit
6be5da67b1
2 changed files with 8 additions and 1 deletions
2
boot.php
2
boot.php
|
@ -7,7 +7,7 @@ require_once('include/text.php');
|
|||
require_once("include/pgettext.php");
|
||||
|
||||
|
||||
define ( 'FRIENDIKA_VERSION', '2.2.1065' );
|
||||
define ( 'FRIENDIKA_VERSION', '2.2.1066' );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
|
||||
define ( 'DB_UPDATE_VERSION', 1079 );
|
||||
|
||||
|
|
|
@ -718,6 +718,13 @@ function item_store($arr,$force_parent = false) {
|
|||
if($r[0]['uri'] != $r[0]['parent-uri']) {
|
||||
$arr['thr-parent'] = $arr['parent-uri'];
|
||||
$arr['parent-uri'] = $r[0]['parent-uri'];
|
||||
$z = q("SELECT `id` FROM `item` WHERE `uri` = '%s' AND `parent-uri` = '%s' AND `uid` = %d LIMIT 1",
|
||||
dbesc($r[0]['parent-uri']),
|
||||
dbesc($r[0]['parent-uri']),
|
||||
intval($arr['uid'])
|
||||
);
|
||||
if($z && count($z))
|
||||
$r = $z;
|
||||
}
|
||||
|
||||
$parent_id = $r[0]['id'];
|
||||
|
|
Loading…
Reference in a new issue