aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-02-19 15:07:41 -0800
committerfriendica <info@friendica.com>2015-02-19 15:07:41 -0800
commitfc52536ce70774b24e6f38114ff1e46f392eb983 (patch)
tree2d81895967629e870ec15303443626a1a69b5b88
parent9fcc9844068c0f6dcf0e550afd8bb4ac236b490d (diff)
downloadvolse-hubzilla-fc52536ce70774b24e6f38114ff1e46f392eb983.tar.gz
volse-hubzilla-fc52536ce70774b24e6f38114ff1e46f392eb983.tar.bz2
volse-hubzilla-fc52536ce70774b24e6f38114ff1e46f392eb983.zip
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.
-rwxr-xr-xinclude/diaspora.php25
-rw-r--r--version.inc2
2 files changed, 13 insertions, 14 deletions
diff --git a/include/diaspora.php b/include/diaspora.php
index d2e27aafe..6523630f6 100755
--- a/include/diaspora.php
+++ b/include/diaspora.php
@@ -1067,24 +1067,13 @@ function diaspora_reshare($importer,$xml,$msg) {
$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);
$private = ((unxmlify($xml->public) == 'false') ? 1 : 0);
$datarray = array();
- $str_tags = '';
-
- $tags = get_tags($newbody);
-
+ $tags = get_tags($body);
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) {
foreach($matches as $mtch) {
$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);
$datarray['uid'] = $importer['channel_id'];
diff --git a/version.inc b/version.inc
index 883a519ce..2660e450b 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-02-18.948
+2015-02-19.949