more testing

This commit is contained in:
friendica 2014-09-24 01:58:24 -07:00
parent 87b8e2725c
commit be54f0d9e6

View File

@ -1583,10 +1583,24 @@ function get_atom_elements($feed,$item,&$author) {
if(get_config('system','feedlinks')) { if(get_config('system','feedlinks')) {
if($res['plink'] && $res['title']) { 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']) { 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,6 +1692,7 @@ function get_atom_elements($feed,$item,&$author) {
$cats = $item->get_categories(); $cats = $item->get_categories();
if($cats) { if($cats) {
if(is_null($terms))
$terms = array(); $terms = array();
foreach($cats as $cat) { foreach($cats as $cat) {
$term = $cat->get_term(); $term = $cat->get_term();