forked from github/server
eliminate multiple warnings about missing default order
fix e3 catalog file syntax
This commit is contained in:
parent
e17a3fc8fa
commit
9940025a96
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE catalog
|
<!DOCTYPE catalog
|
||||||
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
|
PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
|
||||||
|
|
|
@ -3023,14 +3023,17 @@ static order * defaults[MAXLOCALES];
|
||||||
|
|
||||||
order *default_order(const struct locale *lang)
|
order *default_order(const struct locale *lang)
|
||||||
{
|
{
|
||||||
|
static int usedefault = 1;
|
||||||
int i = locale_index(lang);
|
int i = locale_index(lang);
|
||||||
order *result = 0;
|
order *result = 0;
|
||||||
assert(i<MAXLOCALES);
|
assert(i<MAXLOCALES);
|
||||||
result = defaults[i];
|
result = defaults[i];
|
||||||
if (!result) {
|
if (!result && usedefault) {
|
||||||
const char * str = locale_string(lang, "defaultorder");
|
const char * str = locale_string(lang, "defaultorder");
|
||||||
if (str) {
|
if (str) {
|
||||||
result = defaults[i] = parse_order(str, lang);
|
result = defaults[i] = parse_order(str, lang);
|
||||||
|
} else {
|
||||||
|
usedefault = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result ? copy_order(result) : 0;
|
return result ? copy_order(result) : 0;
|
||||||
|
|
Loading…
Reference in New Issue