Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 22 Oct 2001 06:34:04 -0000 1.4
+++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 22 Oct 2001 08:02:10 -0000 1.5
@@ -1519,7 +1519,7 @@
ad_proc ec_country_name_from_country_code {country_code} {Returns "United States" from an argument of $db and "us"} {
return [db_string country_name_from_country_code {
- select name from country_names where iso=:country_code
+ select default_name from countries where iso=:country_code
} -default ""]
}
Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 22 Oct 2001 06:34:04 -0000 1.4
+++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 22 Oct 2001 08:02:10 -0000 1.5
@@ -405,7 +405,7 @@
- select name from country_names where iso=:country_code
+ select default_name from countries where iso=:country_code
Index: openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 18 Jul 2001 23:46:14 -0000 1.3
+++ openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.tcl 22 Oct 2001 08:02:10 -0000 1.4
@@ -391,6 +391,19 @@
return "[join $city_list " or "]"
}
+ad_proc ec_country_name_from_country_code { country_code } {
+ gets country name from country code
+} {
+ if [catch {
+ db_1row country_name {
+ select default_name from country_names where iso=:country_code
+ }
+ } errmsg] {
+ return "Country not found"
+ }
+ return $name
+}
+
ad_proc ec_pretty_mailing_address_from_args { line1 line2 city usps_abbrev zip_code country_code full_state_name attn phone phone_time } { get Pretty Mailing Address } {
set lines [list $attn]
@@ -406,7 +419,7 @@
if { ![empty_string_p $country_code] && $country_code != "us" } {
lappend lines "$city, $full_state_name $zip_code"
- lappend lines [ad_country_name_from_country_code $country_code]
+ lappend lines [ec_country_name_from_country_code $country_code]
} else {
lappend lines "$city, $usps_abbrev $zip_code"
}
Index: openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql 10 Jul 2001 20:38:43 -0000 1.1
+++ openacs-4/packages/ecommerce/tcl/ecommerce-utilities-procs.xql 22 Oct 2001 08:02:10 -0000 1.2
@@ -49,6 +49,13 @@
+
+
+
+ select default_name from country_names where iso=:country_code
+
+
+
Index: openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl 22 Oct 2001 07:38:06 -0000 1.8
+++ openacs-4/packages/ecommerce/tcl/ecommerce-widgets-procs.tcl 22 Oct 2001 08:02:10 -0000 1.9
@@ -490,13 +490,13 @@
if { $default == "" } {
append widget_value "\n"
}
- set sql "select name, iso from country_names order by name"
+ set sql "select default_name, iso from countries order by default_name"
db_foreach get_countries $sql {
if { $default == $iso } {
- append widget_value "\n"
+ append widget_value "\n"
} else {
- append widget_value "\n"
+ append widget_value "\n"
}
}
append widget_value "\n"