[Patches] [PATCH] Bug 6132: Update sysprefs cache in set_preference
koha-patchbot at kohaaloha.com
koha-patchbot at kohaaloha.com
Tue Jan 3 19:20:03 NZDT 2012
From: Julian Maurice <julian.maurice at biblibre.com>
Date: Mon, 2 Jan 2012 10:45:55 +0100
Subject: [PATCH] Bug 6132: Update sysprefs cache in set_preference
Signed-off-by: Chris Cormack <chris at bigballofwax.co.nz>
---
C4/Context.pm | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/C4/Context.pm b/C4/Context.pm
index c2ed85c..770973f 100644
--- a/C4/Context.pm
+++ b/C4/Context.pm
@@ -549,7 +549,7 @@ the sysprefs cache.
sub set_preference {
my $self = shift;
- my $var = shift;
+ my $var = lc(shift);
my $value = shift;
my $dbh = C4::Context->dbh or return 0;
@@ -565,7 +565,9 @@ sub set_preference {
ON DUPLICATE KEY UPDATE value = VALUES(value)
" );
- $sth->execute( $var, $value );
+ if($sth->execute( $var, $value )) {
+ $sysprefs{$var} = $value;
+ }
$sth->finish;
}
--
1.7.5.4
More information about the Patches
mailing list