fbsync: error correction for shared posts
This commit is contained in:
parent
34765b3b76
commit
acdd79cdab
|
@ -209,7 +209,6 @@ function fbsync_createpost($a, $uid, $self, $contacts, $applications, $post, $cr
|
||||||
|
|
||||||
$contact_id = 0;
|
$contact_id = 0;
|
||||||
|
|
||||||
//if ($post->parent_post_id != "") {
|
|
||||||
if (($post->parent_post_id != "") AND ($post->actor_id == $post->source_id)) {
|
if (($post->parent_post_id != "") AND ($post->actor_id == $post->source_id)) {
|
||||||
$pos = strpos($post->parent_post_id, "_");
|
$pos = strpos($post->parent_post_id, "_");
|
||||||
|
|
||||||
|
@ -222,6 +221,7 @@ function fbsync_createpost($a, $uid, $self, $contacts, $applications, $post, $cr
|
||||||
|
|
||||||
$postarray['contact-id'] = $contact_id;
|
$postarray['contact-id'] = $contact_id;
|
||||||
|
|
||||||
|
if (array_key_exists("name", $userdata) AND ($userdata["name"] != "") AND !link_compare($userdata["link"], $postarray['author-link'])) {
|
||||||
$postarray['owner-name'] = $userdata["name"];
|
$postarray['owner-name'] = $userdata["name"];
|
||||||
$postarray['owner-link'] = $userdata["link"];
|
$postarray['owner-link'] = $userdata["link"];
|
||||||
$postarray['owner-avatar'] = $userdata["avatar"];
|
$postarray['owner-avatar'] = $userdata["avatar"];
|
||||||
|
@ -230,7 +230,7 @@ function fbsync_createpost($a, $uid, $self, $contacts, $applications, $post, $cr
|
||||||
|
|
||||||
$prebody = "[share author='".$postarray['author-name'].
|
$prebody = "[share author='".$postarray['author-name'].
|
||||||
"' profile='".$postarray['author-link'].
|
"' profile='".$postarray['author-link'].
|
||||||
"' avatar='".$postarray['author-avatar']."']".
|
"' avatar='".$postarray['author-avatar']."']";
|
||||||
|
|
||||||
$postarray['author-name'] = $postarray['owner-name'];
|
$postarray['author-name'] = $postarray['owner-name'];
|
||||||
$postarray['author-link'] = $postarray['owner-link'];
|
$postarray['author-link'] = $postarray['owner-link'];
|
||||||
|
@ -238,6 +238,7 @@ function fbsync_createpost($a, $uid, $self, $contacts, $applications, $post, $cr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($contact_id == 0) {
|
if ($contact_id == 0) {
|
||||||
$contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], $create_user);
|
$contact_id = fbsync_fetch_contact($uid, $contacts[$post->source_id], $create_user);
|
||||||
|
@ -920,6 +921,5 @@ function fbsync_fetchfeed($a, $uid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
set_pconfig($uid,'fbsync','last_updated', $last_updated);
|
set_pconfig($uid,'fbsync','last_updated', $last_updated);
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue