mirror of
https://github.com/friendica/friendica
synced 2025-05-12 03:04:10 +02:00
Use centralized functions for tag string handling
This commit is contained in:
parent
9e738253e7
commit
d2702dfe9c
6 changed files with 46 additions and 44 deletions
|
@ -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)) . "'";
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue