aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rwxr-xr-xinclude/delivery.php6
-rwxr-xr-xinclude/items.php22
-rwxr-xr-xinclude/notifier.php10
3 files changed, 24 insertions, 14 deletions
diff --git a/include/delivery.php b/include/delivery.php
index 677d89388..cbf602a0b 100755
--- a/include/delivery.php
+++ b/include/delivery.php
@@ -272,10 +272,10 @@ function delivery_run($argv, $argc){
if($normal_mode) {
if($item_id == $item['id'] || $item['id'] == $item['parent'])
- $atom .= atom_entry($item,'text',$item_contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
}
else
- $atom .= atom_entry($item,'text',$item_contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
}
@@ -363,7 +363,7 @@ function delivery_run($argv, $argc){
continue;
if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire))
- $slaps[] = atom_entry($item,'html',$item_contact,$owner,true);
+ $slaps[] = atom_entry($item,'html',null,$owner,true);
}
logger('notifier: slapdelivery: ' . $contact['name']);
diff --git a/include/items.php b/include/items.php
index 347826042..ba4ec036f 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1505,13 +1505,18 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$item_id = $item->get_id();
$datarray = get_atom_elements($feed,$item);
- if(! x($datarray,'author-name'))
+
+ if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-name'] = $contact['name'];
- if(! x($datarray,'author-link'))
+ if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-link'] = $contact['url'];
- if(! x($datarray,'author-avatar'))
+ if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-avatar'] = $contact['thumb'];
+ if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) {
+ logger('consume_feed: no author information! ' . print_r($datarray,true));
+ continue;
+ }
$r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
dbesc($item_id),
@@ -1614,14 +1619,19 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
$datarray = get_atom_elements($feed,$item);
if(is_array($contact)) {
- if(! x($datarray,'author-name'))
+ if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-name'] = $contact['name'];
- if(! x($datarray,'author-link'))
+ if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-link'] = $contact['url'];
- if(! x($datarray,'author-avatar'))
+ if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN))
$datarray['author-avatar'] = $contact['thumb'];
}
+ if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) {
+ logger('consume_feed: no author information! ' . print_r($datarray,true));
+ continue;
+ }
+
// special handling for events
if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) {
diff --git a/include/notifier.php b/include/notifier.php
index 37bc6dae5..8ec625286 100755
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -382,8 +382,8 @@ function notifier_run($argv, $argc){
continue;
if($item['id'] == $item_id) {
logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
- $slap = atom_entry($item,'html',$owner,$owner,false);
- $atom .= atom_entry($item,'text',$owner,$owner,false);
+ $slap = atom_entry($item,'html',null,$owner,false);
+ $atom .= atom_entry($item,'text',null,$owner,false);
}
}
}
@@ -410,13 +410,13 @@ function notifier_run($argv, $argc){
// older sites without a corresponding dfrn_notify change may do the wrong thing.
if($item_id == $item['id'] || $item['id'] == $item['parent'])
- $atom .= atom_entry($item,'text',$contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
}
else
- $atom .= atom_entry($item,'text',$contact,$owner,true);
+ $atom .= atom_entry($item,'text',null,$owner,true);
if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire))
- $slaps[] = atom_entry($item,'html',$contact,$owner,true);
+ $slaps[] = atom_entry($item,'html',null,$owner,true);
}
}
}