mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
make channel links relative
This commit is contained in:
parent
7c47b94760
commit
536e15847e
1 changed files with 2 additions and 17 deletions
|
|
@ -79,7 +79,7 @@ class Nex implements MessageComponentInterface
|
||||||
switch (true)
|
switch (true)
|
||||||
{
|
{
|
||||||
// Item
|
// Item
|
||||||
case (bool) preg_match('/^\/(?<id>\d+)($|\.gmi)$/i', $request, $attribute):
|
case (bool) preg_match('/\/(?<id>\d+)($|\.gmi)$/i', $request, $attribute):
|
||||||
|
|
||||||
$lines = [];
|
$lines = [];
|
||||||
|
|
||||||
|
|
@ -172,28 +172,13 @@ class Nex implements MessageComponentInterface
|
||||||
foreach ((array) $this->_database->getChannelItems($channel->id, 0, 20) as $channelItem)
|
foreach ((array) $this->_database->getChannelItems($channel->id, 0, 20) as $channelItem)
|
||||||
{
|
{
|
||||||
$lines[] = sprintf(
|
$lines[] = sprintf(
|
||||||
'=> /%d.gmi %s',
|
'=> %d.gmi %s',
|
||||||
$channelItem->id,
|
$channelItem->id,
|
||||||
\Yggverse\Pulsar\Model\Filter::string(
|
\Yggverse\Pulsar\Model\Filter::string(
|
||||||
$channelItem->title
|
$channelItem->title
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/* @TODO make gemfeed date optional
|
|
||||||
$lines[] = sprintf(
|
|
||||||
'=> /%d.gmi %s %s',
|
|
||||||
$channelItem->id,
|
|
||||||
$channelItem->pubTime ?
|
|
||||||
date(
|
|
||||||
'Y-m-d',
|
|
||||||
$channelItem->pubTime
|
|
||||||
) : '',
|
|
||||||
\Yggverse\Pulsar\Model\Filter::string(
|
|
||||||
$channelItem->title
|
|
||||||
)
|
|
||||||
);
|
|
||||||
*/
|
|
||||||
|
|
||||||
if ($channelItem->description)
|
if ($channelItem->description)
|
||||||
{
|
{
|
||||||
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
$lines[] = \Yggverse\Pulsar\Model\Filter::text(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue