aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-08 19:10:36 -0700
committerFriendika <info@friendika.com>2011-08-08 19:10:36 -0700
commit6be5da67b1a0290da3938b87bebc71fd429f4414 (patch)
tree52a8dd117ddee6a63a7a4f9772f805fea8e23497
parent7eb7f774131a47212ff9c505d7d497c8c7b76a53 (diff)
downloadvolse-hubzilla-6be5da67b1a0290da3938b87bebc71fd429f4414.tar.gz
volse-hubzilla-6be5da67b1a0290da3938b87bebc71fd429f4414.tar.bz2
volse-hubzilla-6be5da67b1a0290da3938b87bebc71fd429f4414.zip
reparenting imported item was only partially reparenting.
-rw-r--r--boot.php2
-rw-r--r--include/items.php7
2 files changed, 8 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 27adea086..b5768c796 100644
--- a/boot.php
+++ b/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 );
diff --git a/include/items.php b/include/items.php
index 50d7bd68c..a378a632c 100644
--- a/include/items.php
+++ b/include/items.php
@@ -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'];