Fixed mass tag
This commit is contained in:
parent
837c04c400
commit
acbd45d530
3 changed files with 5 additions and 3 deletions
|
@ -142,12 +142,14 @@ class TagController extends AbstractController
|
||||||
$params =
|
$params =
|
||||||
[
|
[
|
||||||
'source' => 'mass-tag',
|
'source' => 'mass-tag',
|
||||||
'query' => $suppliedQuery ?: '',
|
'query' => trim($suppliedQuery ?: ''),
|
||||||
'additionalInfo' => $suppliedTag ? $suppliedTag : '',
|
'additionalInfo' => $suppliedTag ? $suppliedTag : '',
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
if ($suppliedOldPage != 0 and $suppliedOldQuery == $suppliedQuery)
|
||||||
$params['page'] = $suppliedOldPage;
|
$params['page'] = $suppliedOldPage;
|
||||||
|
else
|
||||||
|
$params['page'] = 1;
|
||||||
|
|
||||||
$url = \Chibi\Router::linkTo(['PostController', 'listView'], $params);
|
$url = \Chibi\Router::linkTo(['PostController', 'listView'], $params);
|
||||||
$this->redirect($url);
|
$this->redirect($url);
|
||||||
|
|
|
@ -13,7 +13,7 @@ if (Access::check(new Privilege(Privilege::MergeTags)))
|
||||||
$tabs['merge'] = ['Merge', 'mergeView'];
|
$tabs['merge'] = ['Merge', 'mergeView'];
|
||||||
|
|
||||||
if (Access::check(new Privilege(Privilege::MassTag)))
|
if (Access::check(new Privilege(Privilege::MassTag)))
|
||||||
$tabs['mass-tag'] = ['Mass tag', 'massTagRedirectAction'];
|
$tabs['mass-tag'] = ['Mass tag', 'massTagRedirectView'];
|
||||||
|
|
||||||
$showTabs = count($tabs) > 1;
|
$showTabs = count($tabs) > 1;
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -40,7 +40,7 @@ $postValidation =
|
||||||
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{page}', $postValidation);
|
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{page}', $postValidation);
|
||||||
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{query}/{page}', $postValidation);
|
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{query}/{page}', $postValidation);
|
||||||
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{query}/{additionalInfo}/{page}', $postValidation);
|
\Chibi\Router::register(['PostController', 'listView'], 'GET', '/{source}/{query}/{additionalInfo}/{page}', $postValidation);
|
||||||
\Chibi\Router::register(['PostController', 'listRedirectAction'], 'POST', '/{source}-redirect', $postValidation);
|
\Chibi\Router::register(['PostController', 'listRedirectAction'], 'POST', '/posts-redirect', $postValidation);
|
||||||
|
|
||||||
\Chibi\Router::register(['PostController', 'randomView'], 'GET', '/random', $postValidation);
|
\Chibi\Router::register(['PostController', 'randomView'], 'GET', '/random', $postValidation);
|
||||||
\Chibi\Router::register(['PostController', 'randomView'], 'GET', '/random/{page}', $postValidation);
|
\Chibi\Router::register(['PostController', 'randomView'], 'GET', '/random/{page}', $postValidation);
|
||||||
|
|
Loading…
Reference in a new issue