fix: Fixed TorrentPier build-in emojis showing in ACP (#1870)

This commit is contained in:
Roman Kelesidis 2025-03-31 21:50:07 +07:00 committed by GitHub
commit 12792e74f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -341,6 +341,12 @@ class BBCode
$this->smilies = $datastore->get('smile_replacements');
}
if (defined('IN_ADMIN')) {
foreach ($this->smilies['repl'] as &$smile) {
$smile = preg_replace('/src="([^"]+)"/', 'src="./../$1"', $smile);
}
}
if ($this->smilies) {
/** @noinspection NestedPositiveIfStatementsInspection */
if ($parsed_text = preg_replace($this->smilies['orig'], $this->smilies['repl'], $text)) {