Bugzilla – Attachment 56310 Details for
Bug 16520
Per-virtualhost SetEnvs don't work with Plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16520: Initialize the sysprefs Koha::Caches on demand
Bug-16520-Initialize-the-sysprefs-KohaCaches-on-de.patch (text/plain), 1.23 KB, created by
Nick Clemens (kidclamp)
on 2016-10-13 08:39:03 UTC
(
hide
)
Description:
Bug 16520: Initialize the sysprefs Koha::Caches on demand
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2016-10-13 08:39:03 UTC
Size:
1.23 KB
patch
obsolete
>From dce90967e6e2caab8d5bfaa8fd673970eaa4d194 Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Fri, 13 May 2016 16:39:08 -0600 >Subject: [PATCH] Bug 16520: Initialize the sysprefs Koha::Caches on demand > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Context.pm | 13 +++++++------ > 1 file changed, 7 insertions(+), 6 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 5f49bbe..1866b1d 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -407,15 +407,16 @@ sub preference { > my $self = shift; > my $var = shift; # The system preference to return > >- $var = lc $var; >- > return $ENV{"OVERRIDE_SYSPREF_$var"} > if defined $ENV{"OVERRIDE_SYSPREF_$var"}; > >- my $cached_var = $use_syspref_cache >- ? $syspref_cache->get_from_cache("syspref_$var") >- : undef; >- return $cached_var if defined $cached_var; >+ $var = lc $var; >+ >+ if ($use_syspref_cache) { >+ $syspref_cache = Koha::Cache->get_instance() unless $syspref_cache; >+ my $cached_var = $syspref_cache->get_from_cache("syspref_$var"); >+ return $cached_var if defined $cached_var; >+ } > > my $syspref; > eval { $syspref = Koha::Config::SysPrefs->find( lc $var ) }; >-- >2.1.4
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 16520
:
51493
|
51494
|
51495
|
51496
|
51576
|
51577
|
51578
|
51579
|
51580
|
56309
|
56310
|
56311
|
56312
|
56397
|
56410
|
56411
|
56412
|
56413
|
57372
|
57383