From be54f0d9e649f634f2b027e75aef07d197901512 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 24 Sep 2014 01:58:24 -0700 Subject: more testing --- include/items.php | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/items.php b/include/items.php index c5fc14a09..e4339e5f6 100755 --- a/include/items.php +++ b/include/items.php @@ -1583,10 +1583,24 @@ function get_atom_elements($feed,$item,&$author) { if(get_config('system','feedlinks')) { if($res['plink'] && $res['title']) { - $res['body'] = '[url=' . $res['plink'] . ']' . $res['title'] . '[/url]' . "\n\n" . $res['body']; + $res['body'] = '#^[url=' . $res['plink'] . ']' . $res['title'] . '[/url]' . "\n\n" . $res['body']; + $terms = array(); + $terms[] = array( + 'otype' => TERM_OBJ_POST, + 'type' => TERM_BOOKMARK, + 'url' => $res['plink'], + 'term' => $res['title'], + ); } elseif($res['plink']) { - $res['body'] = '[url]' . $res['plink'] . '[/url]' . "\n\n" . $res['body']; + $res['body'] = '#^[url]' . $res['plink'] . '[/url]' . "\n\n" . $res['body']; + $terms = array(); + $terms[] = array( + 'otype' => TERM_OBJ_POST, + 'type' => TERM_BOOKMARK, + 'url' => $res['plink'], + 'term' => $res['plink'], + ); } } @@ -1678,7 +1692,8 @@ function get_atom_elements($feed,$item,&$author) { $cats = $item->get_categories(); if($cats) { - $terms = array(); + if(is_null($terms)) + $terms = array(); foreach($cats as $cat) { $term = $cat->get_term(); if(! $term) -- cgit v1.2.3