From 50dd52eb2604cf4ee35f74b9a05a0f0dedffd2bc Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Wed, 26 Jun 2019 08:04:15 +0200 Subject: [PATCH] Bug 20582: Remove usage of Mojo plugin TemplateToolkit It is not used anywhere yet (it will be useful if we start rewriting CGI scripts as Mojo controllers) --- Koha/App/Koha.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Koha/App/Koha.pm b/Koha/App/Koha.pm index 529da44247..e1aebfa896 100644 --- a/Koha/App/Koha.pm +++ b/Koha/App/Koha.pm @@ -24,18 +24,10 @@ sub startup { $self->hook(before_dispatch => \&_before_dispatch); $self->hook(around_action => \&_around_action); - # Everything after this comment is only needed to use Mojolicious - # controllers. - # We can't use them for anything serious right now because of the - # authentication code that needs a full rewrite - - $self->plugin('TemplateToolkit', template => {PLUGIN_BASE => 'Koha::Template::Plugin'}); - $self->renderer->default_handler('tt2'); - - $self->routes->namespaces(['Koha::Controller']); - my $r = $self->routes; + $r->namespaces(['Koha::Controller']); + $r->any('/')->to(cb => sub { shift->redirect_to('/cgi-bin/koha/opac-main.pl') }); $r->any('/intranet')->to(cb => sub { shift->redirect_to('/cgi-bin/koha/mainpage.pl') }); } -- 2.20.1