From 6c203041b195e18a4dcbe541d46b5ad2584445fd Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 11 Jun 2003 18:57:18 +0000 Subject: [PATCH] Using "boolean_preference()" call to get current status of YesNo type system preferences. --- admin/systempreferences.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/systempreferences.pl b/admin/systempreferences.pl index ccccdeab6f..32b5c13c62 100755 --- a/admin/systempreferences.pl +++ b/admin/systempreferences.pl @@ -174,7 +174,8 @@ if ($op eq 'add_form') { $template->param('type-choice' => 1); } elsif ($data->{'type'} eq 'YesNo') { $template->param('type-yesno' => 1); - ($data->{'value'} eq 'yes') ? ($template->param('value-yes'=>1)) : ($template->param('value-no'=>1)); + $data->{'value'}=C4::Context->boolean_preference($data->{'variable'}); + ($data->{'value'} eq '1') ? ($template->param('value-yes'=>1)) : ($template->param('value-no'=>1)); } elsif ($data->{'type'} eq 'free') { $template->param('type-free' => 1); $template->param('fieldlength' => $data->{'options'}); -- 2.39.5