Bug 16520 (Follow up) Rebase fixes
authorNick Clemens <nick@bywatersolutions.com>
Thu, 13 Oct 2016 08:35:24 +0000 (08:35 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Tue, 11 Oct 2016 12:37:17 +0000 (12:37 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
C4/Context.pm
Koha/Middleware/SetEnv.pm

index 1866b1d..c9d9617 100644 (file)
@@ -401,7 +401,7 @@ with this method.
 
 =cut
 
-my $syspref_cache = Koha::Caches->get_instance('syspref');
+my $syspref_cache;
 my $use_syspref_cache = 1;
 sub preference {
     my $self = shift;
@@ -413,7 +413,7 @@ sub preference {
     $var = lc $var;
 
     if ($use_syspref_cache) {
-        $syspref_cache = Koha::Cache->get_instance() unless $syspref_cache;
+        $syspref_cache = Koha::Caches->get_instance('syspref') unless $syspref_cache;
         my $cached_var = $syspref_cache->get_from_cache("syspref_$var");
         return $cached_var if defined $cached_var;
     }
index 6cf334d..541040d 100644 (file)
@@ -36,8 +36,6 @@ Koha::Middleware::SetEnv - Plack middleware to allow SetEnv through proxied head
   }
 
 
-  SetEnv MEMCACHED_NAMESPACE "localhost:11211"
-  RequestHeader add X-Koha-SetEnv "MEMCACHED_NAMESPACE localhost:11211"
 
 =head1 DESCRIPTION
 
@@ -66,8 +64,6 @@ name.
 =cut
 
 my $allowed_setenvs = qr/^(
-    MEMCACHED_SERVERS |
-    MEMCACHED_NAMESPACE |
     OVERRIDE_SYSPREF_(\w+) |
     OVERRIDE_SYSPREF_NAMES |
     OPAC_CSS_OVERRIDE |
@@ -104,12 +100,6 @@ sub call {
         %setenvs
     };
 
-    # We also add the MEMCACHED_ settings to the actual environment, to make sure any early
-    # initialization of Koha::Cache correctly sets up a memcached connection.
-    foreach my $special_var ( qw( MEMCACHED_SERVERS MEMCACHED_NAMESPACE ) ) {
-        $ENV{$special_var} = $setenvs{$special_var} if defined $setenvs{$special_var};
-    }
-
     return $self->app->($env);
 }