Bug 6132: Update sysprefs cache in set_preference
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
(cherry picked from commit b867d7d12a)
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
parent
dbad13ba5d
commit
11652d9854
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue