}
}
- $header = [];
- $header['uid'] = $importer['uid'];
- $header['network'] = Protocol::OSTATUS;
- $header['wall'] = 0;
- $header['origin'] = 0;
- $header['gravity'] = Item::GRAVITY_COMMENT;
+ // Initial header elements
+ $header = [
+ 'uid' => $importer['uid'],
+ 'network' => Protocol::OSTATUS,
+ 'wall' => 0,
+ 'origin' => 0,
+ 'gravity' => Item::GRAVITY_COMMENT,
+ ];
if (!is_object($doc->firstChild) || empty($doc->firstChild->tagName)) {
return false;
$previous_created = $last_update;
- // Don't cache when the last item was posted less then 15 minutes ago (Cache duration)
+ // Don't cache when the last item was posted less than 15 minutes ago (Cache duration)
if ((time() - strtotime($owner['last-item'])) < 15*60) {
$result = DI::cache()->get($cachekey);
if (!$nocache && !is_null($result)) {