preferences.pl problems
Hi the list, I have found (and it has not been reported yet AFAIK) that the YesNo sysprefs are now store as 'yes' or 'no', no more as '1' or '0' It means that the user checks "no", 'no' is stored in the syspref, and, as most of the code contains
if C4::Context->preference('syspref') { do something }
it's always evaluated as "true". Is it a problem others have seen or is it me ? -- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
If so, this would be a catastrophically bad behavior. Nothing could be disabled once edited. On Fri, Jul 2, 2010 at 9:26 AM, Paul Poulain <paul.poulain@biblibre.com>wrote:
Hi the list,
I have found (and it has not been reported yet AFAIK) that the YesNo sysprefs are now store as 'yes' or 'no', no more as '1' or '0' It means that the user checks "no", 'no' is stored in the syspref, and, as most of the code contains
if C4::Context->preference('syspref') { do something }
it's always evaluated as "true".
Is it a problem others have seen or is it me ?
-- Paul POULAIN http://www.biblibre.com Expert en Logiciels Libres pour l'info-doc Tel : (33) 4 91 81 35 08
On Fri, Jul 2, 2010 at 9:26 AM, Paul Poulain <paul.poulain@biblibre.com> wrote:
I have found (and it has not been reported yet AFAIK) that the YesNo sysprefs are now store as 'yes' or 'no', no more as '1' or '0'
I my test system running HEAD I don't see any entries in my systempreferences table where the value is "yes" or "no." -- Owen -- Web Developer Athens County Public Libraries http://www.myacpl.org
Hi, On Fri, Jul 2, 2010 at 9:26 AM, Paul Poulain <paul.poulain@biblibre.com> wrote:
I have found (and it has not been reported yet AFAIK) that the YesNo sysprefs are now store as 'yes' or 'no', no more as '1' or '0' It means that the user checks "no", 'no' is stored in the syspref, and, as most of the code contains
if C4::Context->preference('syspref') { do something }
it's always evaluated as "true".
Is it a problem others have seen or is it me ?
I have not seen this in HEAD. More details, please. Regards, Galen -- Galen Charlton gmcharlt@gmail.com
I have some boolean sysprefs with yes/no strings in DB on some Koha installations, like Paul. But those are old instances that started with 3.2alpha and prior versions. All those instances having been upgraded to HEAD, they work properly now whatever is the interface language, French or English. With the French interface, if you switch on, respectively off, a boolean syspref, you get a 1 value, respectively 0, in the DB. I suppose that something were wrong during a while with the syspref translator. -- Frédéric
participants (5)
-
Frederic Demians -
Galen Charlton -
Joe Atzberger -
Owen Leonard -
Paul Poulain