1
0
Fork 0

Merge remote-tracking branch 'upstream/develop' into 1602-diaspora

This commit is contained in:
Michael Vogel 2016-03-16 19:30:26 +01:00
commit f6c950823f

View file

@ -2022,13 +2022,27 @@ class dfrn {
$categories = $xpath->query("atom:category", $entry);
if ($categories) {
foreach ($categories AS $category) {
foreach($category->attributes AS $attributes)
if ($attributes->name == "term") {
$term = "";
$scheme = "";
foreach($category->attributes AS $attributes) {
if ($attributes->name == "term")
$term = $attributes->textContent;
if ($attributes->name == "scheme")
$scheme = $attributes->textContent;
}
if (($term != "") AND ($scheme != "")) {
$parts = explode(":", $scheme);
if ((count($parts) >= 4) AND (array_shift($parts) == "X-DFRN")) {
$termhash = array_shift($parts);
$termurl = implode(":", $parts);
if(strlen($item["tag"]))
$item["tag"] .= ",";
$item["tag"] .= "#[url=".App::get_baseurl()."/search?tag=".$term."]".$term."[/url]";
$item["tag"] .= $termhash."[url=".$termurl."]".$term."[/url]";
}
}
}
}