Bugzilla – Attachment 55315 Details for
Bug 11921
Move memcached configuration back to koha-conf.xml
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11921: (QA followup) Remove remaining unused var
Bug-11921-QA-followup-Remove-remaining-unused-var.patch (text/plain), 4.07 KB, created by
Tomás Cohen Arazi (tcohen)
on 2016-09-07 15:53:20 UTC
(
hide
)
Description:
Bug 11921: (QA followup) Remove remaining unused var
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2016-09-07 15:53:20 UTC
Size:
4.07 KB
patch
obsolete
>From b56335254ad14d45afda3e8a06fbd45d44fa94c6 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 7 Sep 2016 11:37:24 -0300 >Subject: [PATCH] Bug 11921: (QA followup) Remove remaining unused var > >This patch removes an occurence of an unused var in Context.pm and >also prevents a warning if memcached_servers is not set: > >Use of uninitialized value in split at /home/vagrant/kohaclone/Koha/Cache.pm line 91. > >t also tidies small things. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Context.pm | 7 ++++--- > Koha/Cache.pm | 3 ++- > Koha/Caches.pm | 19 ++++++++++++++++++- > Koha/Config.pm | 16 ++++++++++++++++ > 4 files changed, 40 insertions(+), 5 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index d6a31bf..4f7aeac 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -1,4 +1,5 @@ > package C4::Context; >+ > # Copyright 2002 Katipo Communications > # > # This file is part of Koha. >@@ -16,9 +17,9 @@ package C4::Context; > # You should have received a copy of the GNU General Public License > # along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >-use vars qw($AUTOLOAD $context @context_stack $servers); >+use Modern::Perl; >+ >+use vars qw($AUTOLOAD $context @context_stack); > BEGIN { > if ($ENV{'HTTP_USER_AGENT'}) { > require CGI::Carp; >diff --git a/Koha/Cache.pm b/Koha/Cache.pm >index be12512..b966373 100644 >--- a/Koha/Cache.pm >+++ b/Koha/Cache.pm >@@ -88,7 +88,8 @@ sub new { > unless ( $self->{namespace} and @servers ) { > my $koha_config = Koha::Config->read_from_file( Koha::Config->guess_koha_conf() ); > $self->{namespace} ||= $koha_config->{config}{memcached_namespace} || 'koha'; >- @servers = split /,/, $koha_config->{config}{memcached_servers} unless @servers; >+ @servers = split /,/, $koha_config->{config}{memcached_servers} // '' >+ unless @servers; > } > $self->{namespace} .= ":$subnamespace:"; > >diff --git a/Koha/Caches.pm b/Koha/Caches.pm >index 808b392..52f1812 100644 >--- a/Koha/Caches.pm >+++ b/Koha/Caches.pm >@@ -1,13 +1,30 @@ > package Koha::Caches; > >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ > use Modern::Perl; >+ > use Koha::Cache; > > our $singleton_caches; > sub get_instance { > my ($class, $subnamespace) = @_; > $subnamespace //= ''; >- $singleton_caches->{$subnamespace} = Koha::Cache->new({}, { subnamespace => $subnamespace } ) unless $singleton_caches->{$subnamespace}; >+ $singleton_caches->{$subnamespace} = Koha::Cache->new({}, { subnamespace => $subnamespace } ) >+ unless $singleton_caches->{$subnamespace}; > return $singleton_caches->{$subnamespace}; > } > >diff --git a/Koha/Config.pm b/Koha/Config.pm >index cef87ec..117c404 100644 >--- a/Koha/Config.pm >+++ b/Koha/Config.pm >@@ -1,6 +1,22 @@ > package Koha::Config; > >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ > use Modern::Perl; >+ > use XML::Simple; > > # Default config file, if none is specified >-- >2.7.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 11921
:
54818
|
54819
|
54820
|
55169
|
55170
|
55171
|
55258
|
55259
|
55268
|
55269
|
55270
|
55271
|
55272
|
55310
|
55311
|
55312
|
55313
|
55314
| 55315 |
55441