Use centralized functions for tag string handling

This commit is contained in:
Michael 2024-01-28 06:32:55 +00:00
parent 9e738253e7
commit d2702dfe9c
6 changed files with 46 additions and 44 deletions

View file

@ -667,12 +667,11 @@ class Tag
*/
private static function getBlockedSQL(): string
{
$blocked_txt = DI::config()->get('system', 'blocked_tags');
if (empty($blocked_txt)) {
$blocked = Strings::getTagArrayByString(DI::config()->get('system', 'blocked_tags'));
if (empty($blocked)) {
return '';
}
$blocked = explode(',', $blocked_txt);
array_walk($blocked, function (&$value) {
$value = "'" . DBA::escape(trim($value)) . "'";
});