diff options
author | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2022-03-29 11:42:53 +0200 |
commit | 0784cd593a39a4fc297e8a82f7e79bc8019a0868 (patch) | |
tree | 22182afb37cf460f8208fff9d276a0672add3185 /include/feedutils.php | |
parent | 0e2e9321025f87fe9587f3d183adaea6185e4e20 (diff) | |
parent | 9c5d2ee5630dd7033904039dcd1e92db8821b644 (diff) | |
download | volse-hubzilla-7.2.tar.gz volse-hubzilla-7.2.tar.bz2 volse-hubzilla-7.2.zip |
Merge branch '7.2RC'7.2
Diffstat (limited to 'include/feedutils.php')
-rw-r--r-- | include/feedutils.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/include/feedutils.php b/include/feedutils.php index 1c653325d..734018922 100644 --- a/include/feedutils.php +++ b/include/feedutils.php @@ -194,14 +194,14 @@ function construct_activity_object($item) { $r = json_decode($item['obj'],false); if(! $r) - return ''; - if($r->type) + return EMPTY_STR; + if(isset($r->type)) $o .= '<as:obj_type>' . xmlify($r->type) . '</as:obj_type>' . "\r\n"; - if($r->id) + if(isset($r->id)) $o .= '<id>' . xmlify($r->id) . '</id>' . "\r\n"; - if($r->title) + if(isset($r->title)) $o .= '<title>' . xmlify($r->title) . '</title>' . "\r\n"; - if($r->links) { + if(isset($r->links)) { /** @FIXME!! */ if(substr($r->link,0,1) === '<') { $r->link = preg_replace('/\<link(.*?)\"\>/','<link$1"/>',$r->link); @@ -210,7 +210,7 @@ function construct_activity_object($item) { else $o .= '<link rel="alternate" type="text/html" href="' . xmlify($r->link) . '" />' . "\r\n"; } - if($r->content) { + if(isset($r->content)) { $o .= '<content type="html" >' . xmlify(bbcode($r->content)) . '</content>' . "\r\n"; } $o .= '</as:object>' . "\r\n"; @@ -218,7 +218,7 @@ function construct_activity_object($item) { return $o; } - return ''; + return EMPTY_STR; } function construct_activity_target($item) { @@ -1060,6 +1060,8 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) { return; } + + $sys_expire = intval(get_config('system', 'default_expire_days')); $chn_expire = intval($importer['channel_expire_days']); @@ -1353,7 +1355,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) { } } - if(! post_is_importable($datarray, $contact)) + if(! post_is_importable($importer['channel_id'], $datarray, [$contact])) continue; $datarray['parent_mid'] = $datarray['mid']; @@ -1509,7 +1511,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) { } } - if(! post_is_importable($datarray, $contact)) + if(! post_is_importable($importer['channel_id'], $datarray, [$contact])) continue; logger('author: ' . print_r($author, true), LOGGER_DEBUG); |