Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl,v
diff -u -r1.54 -r1.54.2.1
--- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 9 May 2018 15:33:28 -0000 1.54
+++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 13 Mar 2019 13:37:18 -0000 1.54.2.1
@@ -389,7 +389,15 @@
# Note that this query does not use bind variables, because these cause the query to not
# match any rows in Oracle when the language key is less than 3 characters,
# because the column is a char(3), not a varchar2(3).
- return [db_string default_locale_from_lang {} -default ""]
+ return [db_string default_locale_from_lang {
+ select locale
+ from ad_locales l
+ where language = :language
+ and enabled_p
+ and (default_p or not exists (select 1 from ad_locales
+ where language = :language
+ and locale <> l.locale))
+ } -default ""]
}
ad_proc -public lang::util::default_locale_from_lang {
Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.xql,v
diff -u -r1.8 -r1.8.8.1
--- openacs-4/packages/acs-lang/tcl/lang-util-procs.xql 17 Oct 2010 21:06:08 -0000 1.8
+++ openacs-4/packages/acs-lang/tcl/lang-util-procs.xql 13 Mar 2019 13:37:18 -0000 1.8.8.1
@@ -11,20 +11,6 @@
-
-
- select locale
- from ad_locales
- where language = '[db_quote $language]'
- and enabled_p = 't'
- and (default_p = 't' or
- (select count(*)
- from ad_locales
- where language = '[db_quote $language]') = 1
- )
-
-
-
select label