aboutsummaryrefslogtreecommitdiffstats
path: root/include/feedutils.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/feedutils.php')
-rw-r--r--include/feedutils.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/feedutils.php b/include/feedutils.php
index 02decca69..f5cb12cd9 100644
--- a/include/feedutils.php
+++ b/include/feedutils.php
@@ -354,6 +354,7 @@ function get_atom_elements($feed, $item, &$author) {
// No photo/profile-link on the item - look at the feed level
+
if((! (x($author,'author_link'))) || (! (x($author,'author_photo')))) {
$rawauthor = $feed->get_feed_tags(SIMPLEPIE_NAMESPACE_ATOM_10,'author');
if($rawauthor && $rawauthor[0]['child'][SIMPLEPIE_NAMESPACE_ATOM_10]['link']) {
@@ -602,6 +603,10 @@ function get_atom_elements($feed, $item, &$author) {
if(! $type)
$type = 'application/octet-stream';
+ if(($ostatus_protocol) && (strpos($type,'image') === 0) && (strpos($res['body'],$link) === false) && (strpos($link,'http') === 0)) {
+ $res['body'] .= "\n\n" . '[img]' . $link . '[/img]';
+ }
+
$res['attach'][] = array('href' => $link, 'length' => $len, 'type' => $type, 'title' => $title );
}
}
@@ -1021,13 +1026,13 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
}
}
else {
- $x = q("select mid from item where mid = '%s' and uid = %d limit 1",
+ $x = q("select parent_mid from item where mid = '%s' and uid = %d limit 1",
dbesc($parent_mid),
intval($importer['channel_id'])
);
if($x) {
- $pmid = $x[0]['mid'];
+ $pmid = $x[0]['parent_mid'];
$datarray['parent_mid'] = $pmid;
}
}