Fixed mass tag and tag renaming
This commit is contained in:
parent
098f11bd09
commit
8e465720bc
2 changed files with 1 additions and 12 deletions
|
@ -130,7 +130,7 @@ class TagController
|
||||||
$params = [
|
$params = [
|
||||||
'source' => 'mass-tag',
|
'source' => 'mass-tag',
|
||||||
'query' => $suppliedQuery ?: ' ',
|
'query' => $suppliedQuery ?: ' ',
|
||||||
'additionalInfo' => $suppliedTag ? TagModel::validateTag($suppliedTag) : '',
|
'additionalInfo' => $suppliedTag ? $suppliedTag : '',
|
||||||
];
|
];
|
||||||
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
||||||
$params['page'] = $suppliedOldPage;
|
$params['page'] = $suppliedOldPage;
|
||||||
|
|
|
@ -54,7 +54,6 @@ final class TagModel extends AbstractCrudModel
|
||||||
throw new SimpleException('Target tag already exists');
|
throw new SimpleException('Target tag already exists');
|
||||||
|
|
||||||
$sourceTag->setName($targetName);
|
$sourceTag->setName($targetName);
|
||||||
TagModel::validateTag($sourceTag->getName());
|
|
||||||
self::save($sourceTag);
|
self::save($sourceTag);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -174,14 +173,4 @@ final class TagModel extends AbstractCrudModel
|
||||||
}
|
}
|
||||||
return $tags;
|
return $tags;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static function validateTags($tags)
|
|
||||||
{
|
|
||||||
foreach ($tags as $key => $tag)
|
|
||||||
$tags[$key] = self::validateTag($tag);
|
|
||||||
|
|
||||||
return $tags;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue