@@ -, +, @@ --- Koha/App/Koha.pm | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) --- a/Koha/App/Koha.pm +++ a/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') }); } --