Mass tag redirection from /tags accepts empty tag

User was already able to enter masstag mode without specifying what they want
to tag with, through "mass tag" tab.
This commit is contained in:
Marcin Kurczewski 2013-11-21 20:52:47 +01:00
parent cab63895c2
commit 1f2ce725ff

View file

@ -126,7 +126,8 @@ class TagController
if (!$suppliedQuery) if (!$suppliedQuery)
$suppliedQuery = ' '; $suppliedQuery = ' ';
$suppliedTag = InputHelper::get('tag'); $suppliedTag = InputHelper::get('tag');
$suppliedTag = Model_Tag::validateTag($suppliedTag); if (!empty($suppliedTag))
$suppliedTag = Model_Tag::validateTag($suppliedTag);
\Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => $suppliedQuery, 'additionalInfo' => $suppliedTag])); \Chibi\UrlHelper::forward(\Chibi\UrlHelper::route('post', 'list', ['source' => 'mass-tag', 'query' => $suppliedQuery, 'additionalInfo' => $suppliedTag]));
} }
} }