Issue 5436: Don't store tags that are too long
This commit is contained in:
parent
c032011143
commit
3f612e0641
1 changed files with 3 additions and 1 deletions
|
@ -1471,8 +1471,10 @@ class PortableContact
|
||||||
$tags = [];
|
$tags = [];
|
||||||
foreach ($data['tags'] as $tag) {
|
foreach ($data['tags'] as $tag) {
|
||||||
$tag = mb_strtolower($tag);
|
$tag = mb_strtolower($tag);
|
||||||
|
if (count($tag) < 100) {
|
||||||
$tags[$tag] = $tag;
|
$tags[$tag] = $tag;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($tags as $tag) {
|
foreach ($tags as $tag) {
|
||||||
DBA::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag], true);
|
DBA::insert('gserver-tag', ['gserver-id' => $gserver['id'], 'tag' => $tag], true);
|
||||||
|
|
Loading…
Reference in a new issue