mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 01:28:08 -04:00
fix: Trim tags on adding or editing
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
This commit is contained in:
parent
69ee366bd2
commit
faa7cb74b1
1 changed files with 2 additions and 0 deletions
|
|
@ -145,6 +145,7 @@ class SystemTagManager implements ISystemTagManager {
|
|||
}
|
||||
|
||||
public function createTag(string $tagName, bool $userVisible, bool $userAssignable): ISystemTag {
|
||||
$tagName = trim($tagName);
|
||||
// Length of name column is 64
|
||||
$truncatedTagName = substr($tagName, 0, 64);
|
||||
$query = $this->connection->getQueryBuilder();
|
||||
|
|
@ -199,6 +200,7 @@ class SystemTagManager implements ISystemTagManager {
|
|||
|
||||
$beforeUpdate = array_shift($tags);
|
||||
// Length of name column is 64
|
||||
$newName = trim($newName);
|
||||
$truncatedNewName = substr($newName, 0, 64);
|
||||
$afterUpdate = new SystemTag(
|
||||
$tagId,
|
||||
|
|
|
|||
Loading…
Reference in a new issue