Simplify plaintext creation
This commit is contained in:
@@ -671,9 +671,7 @@ class System
|
|||||||
|
|
||||||
if (DI::config()->get('system', 'tosdisplay')) {
|
if (DI::config()->get('system', 'tosdisplay')) {
|
||||||
$rulelist = DI::config()->get('system', 'tosrules') ?: DI::config()->get('system', 'tostext');
|
$rulelist = DI::config()->get('system', 'tosrules') ?: DI::config()->get('system', 'tostext');
|
||||||
$html = BBCode::convertForUriId(User::getSystemUriId(), $rulelist, BBCode::EXTERNAL);
|
$msg = BBCode::toPlaintext($rulelist, false);
|
||||||
|
|
||||||
$msg = HTML::toPlaintext($html, 0, true);
|
|
||||||
foreach (explode("\n", trim($msg)) as $line) {
|
foreach (explode("\n", trim($msg)) as $line) {
|
||||||
$line = trim($line);
|
$line = trim($line);
|
||||||
if ($line) {
|
if ($line) {
|
||||||
|
|||||||
Reference in New Issue
Block a user