mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Support: Links and New lines are present now (fixes #38)
This commit is contained in:
parent
2ce3a1ae9d
commit
820c9c22fe
2 changed files with 14 additions and 3 deletions
|
@ -43,7 +43,11 @@ class Ticket extends RowModel
|
||||||
|
|
||||||
function getContext(): string
|
function getContext(): string
|
||||||
{
|
{
|
||||||
return $this->getRecord()->text;
|
$text = $this->getRecord()->text;
|
||||||
|
$text = $this->formatLinks($text);
|
||||||
|
$text = $this->removeZalgo($text);
|
||||||
|
$text = nl2br($text);
|
||||||
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTime(): DateTime
|
function getTime(): DateTime
|
||||||
|
@ -70,4 +74,6 @@ class Ticket extends RowModel
|
||||||
{
|
{
|
||||||
return (new Users)->get($this->getRecord()->user_id);
|
return (new Users)->get($this->getRecord()->user_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use Traits\TRichText;
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,11 @@ class TicketComment extends RowModel
|
||||||
|
|
||||||
function getContext(): string
|
function getContext(): string
|
||||||
{
|
{
|
||||||
return $this->getRecord()->text;
|
$text = $this->getRecord()->text;
|
||||||
|
$text = $this->formatLinks($text);
|
||||||
|
$text = $this->removeZalgo($text);
|
||||||
|
$text = nl2br($text);
|
||||||
|
return $text;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getTime(): DateTime
|
function getTime(): DateTime
|
||||||
|
@ -67,4 +71,5 @@ class TicketComment extends RowModel
|
||||||
return new DateTime($this->getRecord()->created);
|
return new DateTime($this->getRecord()->created);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
use Traits\TRichText;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue