|
|
@ -125,21 +125,36 @@ class Nex implements MessageComponentInterface |
|
|
|
foreach ($list as $item) |
|
|
|
foreach ($list as $item) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// Build gemini text link |
|
|
|
// Build gemini text link |
|
|
|
$link = ['=>']; |
|
|
|
if ($item['link']) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$link = |
|
|
|
|
|
|
|
[ |
|
|
|
|
|
|
|
'=>', // gemtext format |
|
|
|
|
|
|
|
$item['file'] ? $item['link'] |
|
|
|
|
|
|
|
: $item['link'] . '/' |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
if ($item['name']) |
|
|
|
// Append modification time on enabled |
|
|
|
|
|
|
|
if ($item['time'] && $this->_environment->get('time')) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$link[] = $item['file'] ? $item['name'] |
|
|
|
$link[] = date( |
|
|
|
: $item['name'] . '/'; |
|
|
|
'Y-m-d', // gemfeed format |
|
|
|
|
|
|
|
$item['time'] |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ($item['time'] && $this->_environment->get('time')) |
|
|
|
// Append alt name on link urlencoded |
|
|
|
|
|
|
|
if ($item['name'] != $item['link']) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$link[] = date('Y-m-d', $item['time']); |
|
|
|
$link[] = $item['name']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Append link to the new line |
|
|
|
// Append link to the new line |
|
|
|
$line[] = implode(' ', $link); |
|
|
|
$line[] = implode( |
|
|
|
|
|
|
|
' ', |
|
|
|
|
|
|
|
$link |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Merge lines to response |
|
|
|
// Merge lines to response |
|
|
|