mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #50083 from nextcloud/bugfix/trim-tags
fix: Trim tags on adding or editing
This commit is contained in:
commit
cddcbd1476
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