]> git.mxchange.org Git - friendica.git/commitdiff
reparenting imported item was only partially reparenting.
authorFriendika <info@friendika.com>
Tue, 9 Aug 2011 02:10:36 +0000 (19:10 -0700)
committerFriendika <info@friendika.com>
Tue, 9 Aug 2011 02:10:36 +0000 (19:10 -0700)
boot.php
include/items.php

index 27adea086666f683585bbb88c4b09905f279f264..b5768c7961a02e2f544a7af3fe06bf088469986f 100644 (file)
--- 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      );
 
index 50d7bd68c7439485af54b3b5dfe628441a5a2268..a378a632c04a87305b6514d28105e7c6f0494a23 100644 (file)
@@ -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'];