Enable retrieval of translated values based on table name
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Aug 2008 04:27:53 +0000 (04:27 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 20 Aug 2008 04:27:53 +0000 (04:27 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10376 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.functions.config.sql

index 42935aa..998274b 100644 (file)
@@ -78,7 +78,7 @@ BEGIN
     -- Try the full locale
     SELECT  * INTO result
       FROM  config.i18n_core
-      WHERE fq_field = keyfield
+      WHERE (fq_field = keyfield OR fq_field = keytable)
             AND identity_value = keyvalue
             AND translation = locale;
 
@@ -86,7 +86,7 @@ BEGIN
     IF NOT FOUND THEN
         SELECT  * INTO result
           FROM  config.i18n_core
-          WHERE fq_field = keyfield
+          WHERE (fq_field = keyfield OR fq_field = keytable)
                 AND identity_value = keyvalue
                 AND translation = language;
     END IF;