[Koha-patches] [PATCH] Bug 6132: preference were case sensitive.

Julian Maurice julian.maurice at biblibre.com
Fri Apr 8 10:04:53 CEST 2011


From: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>

---
 C4/Context.pm |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/C4/Context.pm b/C4/Context.pm
index 484d4e1..49beb87 100644
--- a/C4/Context.pm
+++ b/C4/Context.pm
@@ -464,6 +464,7 @@ sub preference {
     my $self = shift;
     my $var  = shift;                          # The system preference to return
 
+    $var = lc($var);
     if (exists $sysprefs{$var}) {
         return $sysprefs{$var};
     }
@@ -474,7 +475,7 @@ sub preference {
     my $sql = <<'END_SQL';
         SELECT    value
         FROM    systempreferences
-        WHERE    variable=?
+        WHERE    LOWER(variable)=?
         LIMIT    1
 END_SQL
     $sysprefs{$var} = $dbh->selectrow_array( $sql, {}, $var );
-- 
1.7.4.1



More information about the Koha-patches mailing list