Bugzilla – Attachment 111323 Details for
Bug 26625
Add ability to configure mojolicious applications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26625: Add a mojolicious section in $KOHA_CONF
Bug-26625-Add-a-mojolicious-section-in-KOHACONF.patch (text/plain), 2.59 KB, created by
Julian Maurice
on 2020-10-07 08:28:59 UTC
(
hide
)
Description:
Bug 26625: Add a mojolicious section in $KOHA_CONF
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2020-10-07 08:28:59 UTC
Size:
2.59 KB
patch
obsolete
>From 8d2ad9b385fe9850571af1a8c2f2e97b4da366e6 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 7 Oct 2020 10:14:59 +0200 >Subject: [PATCH] Bug 26625: Add a mojolicious section in $KOHA_CONF > >This allows to configure hypnotoad (listen address, number of workers, >...) > >https://metacpan.org/pod/Mojo::Server::Hypnotoad#SETTINGS >--- > Koha/App/Intranet.pm | 7 +++++++ > Koha/App/Opac.pm | 7 +++++++ > etc/koha-conf.xml | 19 +++++++++++++++++++ > 3 files changed, 33 insertions(+) > >diff --git a/Koha/App/Intranet.pm b/Koha/App/Intranet.pm >index bf66e9e62b..6278319247 100644 >--- a/Koha/App/Intranet.pm >+++ b/Koha/App/Intranet.pm >@@ -24,9 +24,16 @@ use Mojo::Base 'Mojolicious'; > use Koha::Caches; > use Koha::Cache::Memory::Lite; > >+use C4::Context; >+ > sub startup { > my ($self) = @_; > >+ my $config = C4::Context->config('mojolicious'); >+ if ($config && $config->{intranet} && $config->{intranet}->{config}) { >+ $self->config($config->{intranet}->{config}); >+ } >+ > push @{$self->plugins->namespaces}, 'Koha::App::Plugin'; > push @{$self->static->paths}, $self->home->rel_file('koha-tmpl'); > >diff --git a/Koha/App/Opac.pm b/Koha/App/Opac.pm >index 7af85e1515..5e4de12ceb 100644 >--- a/Koha/App/Opac.pm >+++ b/Koha/App/Opac.pm >@@ -24,9 +24,16 @@ use Mojo::Base 'Mojolicious'; > use Koha::Caches; > use Koha::Cache::Memory::Lite; > >+use C4::Context; >+ > sub startup { > my ($self) = @_; > >+ my $config = C4::Context->config('mojolicious'); >+ if ($config && $config->{opac} && $config->{opac}->{config}) { >+ $self->config($config->{opac}->{config}); >+ } >+ > push @{$self->plugins->namespaces}, 'Koha::App::Plugin'; > push @{$self->static->paths}, $self->home->rel_file('koha-tmpl'); > >diff --git a/etc/koha-conf.xml b/etc/koha-conf.xml >index eff50d2bcd..b2da6b3689 100644 >--- a/etc/koha-conf.xml >+++ b/etc/koha-conf.xml >@@ -270,5 +270,24 @@ __PAZPAR2_TOGGLE_XML_POST__ > <debug>__SMTP_DEBUG__</debug> > </smtp_server> > >+ <mojolicious> >+ <intranet> >+ <config> >+ <!-- https://docs.mojolicious.org/Mojo/Server/Hypnotoad#SETTINGS --> >+ <hypnotoad> >+ <listen>http://127.0.0.1:8080</listen> >+ </hypnotoad> >+ </config> >+ </intranet> >+ <opac> >+ <config> >+ <!-- https://docs.mojolicious.org/Mojo/Server/Hypnotoad#SETTINGS --> >+ <hypnotoad> >+ <listen>http://127.0.0.1:8081</listen> >+ </hypnotoad> >+ </config> >+ </opac> >+ </mojolicious> >+ > </config> > </yazgfs> >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26625
: 111323 |
111365