mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
fix: Trim tags on adding or editing
Signed-off-by: Kostiantyn Miakshyn <molodchick@gmail.com>
This commit is contained in:
parent
5bcce6b01f
commit
bc7ce1c84a
1 changed files with 2 additions and 0 deletions
|
|
@ -157,6 +157,7 @@ class SystemTagManager implements ISystemTagManager {
|
|||
* {@inheritdoc}
|
||||
*/
|
||||
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();
|
||||
|
|
@ -212,6 +213,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