From 8e465720bc6f38dabc29cc93de9122409b9f8f31 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 12 May 2014 17:56:07 +0200 Subject: [PATCH] Fixed mass tag and tag renaming --- src/Controllers/TagController.php | 2 +- src/Models/TagModel.php | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/Controllers/TagController.php b/src/Controllers/TagController.php index 8198cab1..7faca0f2 100644 --- a/src/Controllers/TagController.php +++ b/src/Controllers/TagController.php @@ -130,7 +130,7 @@ class TagController $params = [ 'source' => 'mass-tag', 'query' => $suppliedQuery ?: ' ', - 'additionalInfo' => $suppliedTag ? TagModel::validateTag($suppliedTag) : '', + 'additionalInfo' => $suppliedTag ? $suppliedTag : '', ]; if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery) $params['page'] = $suppliedOldPage; diff --git a/src/Models/TagModel.php b/src/Models/TagModel.php index dd821226..a3a7c798 100644 --- a/src/Models/TagModel.php +++ b/src/Models/TagModel.php @@ -54,7 +54,6 @@ final class TagModel extends AbstractCrudModel throw new SimpleException('Target tag already exists'); $sourceTag->setName($targetName); - TagModel::validateTag($sourceTag->getName()); self::save($sourceTag); }); } @@ -174,14 +173,4 @@ final class TagModel extends AbstractCrudModel } return $tags; } - - - - public static function validateTags($tags) - { - foreach ($tags as $key => $tag) - $tags[$key] = self::validateTag($tag); - - return $tags; - } }