diaspora: move reshare encapsulation after tag parsing, since it seriously screws up the tag parser and reshares end up with a lot of unlinked tags.
This commit is contained in:
parent
9fcc984406
commit
fc52536ce7
@ -1067,24 +1067,13 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||||||
$orig_author_photo = $person['xchan_photo_m'];
|
$orig_author_photo = $person['xchan_photo_m'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$newbody = "[share author='" . urlencode($orig_author_name)
|
|
||||||
. "' profile='" . $orig_author_link
|
|
||||||
. "' avatar='" . $orig_author_photo
|
|
||||||
. "' link='" . $orig_url
|
|
||||||
. "' posted='" . datetime_convert('UTC','UTC',unxmlify($source_xml->post->status_message->created_at))
|
|
||||||
. "' message_id='" . unxmlify($source_xml->post->status_message->guid)
|
|
||||||
. "']" . $body . "[/share]";
|
|
||||||
|
|
||||||
|
|
||||||
$created = unxmlify($xml->created_at);
|
$created = unxmlify($xml->created_at);
|
||||||
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
|
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
|
||||||
|
|
||||||
$datarray = array();
|
$datarray = array();
|
||||||
|
|
||||||
$str_tags = '';
|
$tags = get_tags($body);
|
||||||
|
|
||||||
$tags = get_tags($newbody);
|
|
||||||
|
|
||||||
|
|
||||||
if(count($tags)) {
|
if(count($tags)) {
|
||||||
|
|
||||||
@ -1116,7 +1105,7 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cnt = preg_match_all('/@\[url=(.*?)\](.*?)\[\/url\]/ism',$newbody,$matches,PREG_SET_ORDER);
|
$cnt = preg_match_all('/@\[url=(.*?)\](.*?)\[\/url\]/ism',$body,$matches,PREG_SET_ORDER);
|
||||||
if($cnt) {
|
if($cnt) {
|
||||||
foreach($matches as $mtch) {
|
foreach($matches as $mtch) {
|
||||||
$datarray['term'][] = array(
|
$datarray['term'][] = array(
|
||||||
@ -1129,6 +1118,16 @@ function diaspora_reshare($importer,$xml,$msg) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$newbody = "[share author='" . urlencode($orig_author_name)
|
||||||
|
. "' profile='" . $orig_author_link
|
||||||
|
. "' avatar='" . $orig_author_photo
|
||||||
|
. "' link='" . $orig_url
|
||||||
|
. "' posted='" . datetime_convert('UTC','UTC',unxmlify($source_xml->post->status_message->created_at))
|
||||||
|
. "' message_id='" . unxmlify($source_xml->post->status_message->guid)
|
||||||
|
. "']" . $body . "[/share]";
|
||||||
|
|
||||||
|
|
||||||
$plink = service_plink($contact,$guid);
|
$plink = service_plink($contact,$guid);
|
||||||
|
|
||||||
$datarray['uid'] = $importer['channel_id'];
|
$datarray['uid'] = $importer['channel_id'];
|
||||||
|
@ -1 +1 @@
|
|||||||
2015-02-18.948
|
2015-02-19.949
|
||||||
|
Reference in New Issue
Block a user