Index: openacs-4/packages/contacts/tcl/address-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/Attic/address-procs-postgresql.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/contacts/tcl/address-procs-postgresql.xql 22 Aug 2004 22:44:50 -0000 1.1.2.1
+++ openacs-4/packages/contacts/tcl/address-procs-postgresql.xql 23 Aug 2004 01:32:32 -0000 1.1.2.2
@@ -12,6 +12,7 @@
select 1 from us_states where abbrev = upper(:region) or state_name = upper(:region)
+
Index: openacs-4/packages/contacts/tcl/address-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/Attic/address-procs.tcl,v
diff -u -r1.1.2.3 -r1.1.2.4
--- openacs-4/packages/contacts/tcl/address-procs.tcl 22 Aug 2004 22:43:44 -0000 1.1.2.3
+++ openacs-4/packages/contacts/tcl/address-procs.tcl 23 Aug 2004 01:32:32 -0000 1.1.2.4
@@ -68,7 +68,9 @@
set country_code [lindex $address_list 4]
if { $country_code == "US" } {
- if { ![db_0or1row validate_state {} ] } {
+ if { ![db_0or1row validate_state {
+ select 1 from us_states where abbrev = upper(:region) or state_name = upper(:region)
+} ] } {
set message "\"$region\" is not a valid US State."
return 0
}
Index: openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 22 Aug 2004 22:43:44 -0000 1.1.2.1
+++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 23 Aug 2004 01:32:32 -0000 1.1.2.2
@@ -43,7 +43,7 @@
-
+
select object_id from contact_object_types where object_type = 'person'
Index: openacs-4/packages/contacts/tcl/view-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/Attic/view-procs-postgresql.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/contacts/tcl/view-procs-postgresql.xql 22 Aug 2004 22:43:44 -0000 1.1.2.1
+++ openacs-4/packages/contacts/tcl/view-procs-postgresql.xql 23 Aug 2004 01:32:32 -0000 1.1.2.2
@@ -70,11 +70,16 @@
-
+
select name from contact_view_names where view_id = :view_id and locale = :locale
+
+
+ select view_id from contact_views where contact_object_type = :object_type order by sort_order limit 1
+
+
Index: openacs-4/packages/contacts/tcl/view-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/Attic/view-procs.tcl,v
diff -u -r1.1.2.5 -r1.1.2.6
--- openacs-4/packages/contacts/tcl/view-procs.tcl 22 Aug 2004 22:43:44 -0000 1.1.2.5
+++ openacs-4/packages/contacts/tcl/view-procs.tcl 23 Aug 2004 01:32:32 -0000 1.1.2.6
@@ -161,5 +161,17 @@
return $name
}
+
+ ad_proc -public first_view_id {
+ object_type
+ } {
+ get the first object type view_id
+ } {
+
+ return [db_string get_first_view_id {}]
+
+ }
+
+
}
Index: openacs-4/packages/contacts/www/admin/attribute-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/Attic/attribute-ae.tcl,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/packages/contacts/www/admin/attribute-ae.tcl 22 Aug 2004 23:57:54 -0000 1.1.2.4
+++ openacs-4/packages/contacts/www/admin/attribute-ae.tcl 23 Aug 2004 01:32:35 -0000 1.1.2.5
@@ -72,7 +72,7 @@
set peeraddr [ad_conn peeraddr]
set context_id [ad_conn package_id]
set attribute [util_text_to_url -text $name]
- set attribute_id [db_string attribute_create {}
+ set attribute_id [db_string attribute_create {}]
db_1row attribute_name_save {}
if { [string is true $options_p] } {
set sort_order "1"
Index: openacs-4/packages/contacts/www/cadmin/attributes-answer-optional.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/cadmin/Attic/attributes-answer-optional.tcl,v
diff -u -r1.1.2.3 -r1.1.2.4
--- openacs-4/packages/contacts/www/cadmin/attributes-answer-optional.tcl 22 Aug 2004 23:39:42 -0000 1.1.2.3
+++ openacs-4/packages/contacts/www/cadmin/attributes-answer-optional.tcl 23 Aug 2004 01:32:36 -0000 1.1.2.4
@@ -12,8 +12,7 @@
foreach attribute_id $attribute_id {
- db_dml map_the_attribute {
- }
+ db_dml answer_optional {}
}
ad_returnredirect "object-map?object_id=$object_id"
Index: openacs-4/packages/contacts/www/cadmin/attributes-answer-required.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/cadmin/Attic/attributes-answer-required.tcl,v
diff -u -r1.1.2.3 -r1.1.2.4
--- openacs-4/packages/contacts/www/cadmin/attributes-answer-required.tcl 22 Aug 2004 23:39:42 -0000 1.1.2.3
+++ openacs-4/packages/contacts/www/cadmin/attributes-answer-required.tcl 23 Aug 2004 01:32:36 -0000 1.1.2.4
@@ -12,7 +12,7 @@
foreach attribute_id $attribute_id {
- db_dml map_the_attribute {}
+ db_dml answer_required {}
}
ad_returnredirect "object-map?object_id=$object_id"
Index: openacs-4/packages/contacts/www/cadmin/attributes-order-update-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/cadmin/Attic/attributes-order-update-postgresql.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/contacts/www/cadmin/attributes-order-update-postgresql.xql 22 Aug 2004 23:39:42 -0000 1.1.2.1
+++ openacs-4/packages/contacts/www/cadmin/attributes-order-update-postgresql.xql 23 Aug 2004 01:32:36 -0000 1.1.2.2
@@ -3,7 +3,7 @@
postgresql7.1
-
+
update contact_attribute_object_map set sort_order = '-1' where object_id = :object_id
Index: openacs-4/packages/contacts/www/view/comments-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/view/Attic/comments-view-postgresql.xql,v
diff -u -r1.1.2.1 -r1.1.2.2
--- openacs-4/packages/contacts/www/view/comments-view-postgresql.xql 22 Aug 2004 23:23:09 -0000 1.1.2.1
+++ openacs-4/packages/contacts/www/view/comments-view-postgresql.xql 23 Aug 2004 01:32:36 -0000 1.1.2.2
@@ -5,7 +5,7 @@
-
+
select g.comment_id,
r.mime_type,
Index: openacs-4/packages/contacts/www/view/index.vuh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/view/Attic/index.vuh,v
diff -u -r1.1.2.4 -r1.1.2.5
--- openacs-4/packages/contacts/www/view/index.vuh 22 Aug 2004 23:23:09 -0000 1.1.2.4
+++ openacs-4/packages/contacts/www/view/index.vuh 23 Aug 2004 01:32:36 -0000 1.1.2.5
@@ -31,7 +31,7 @@
if { [string is false $error_p] } {
# there is no view_id but the party_id was valid, so we get the default view_id
set object_type [contact::get::object_type $party_id]
- set view_id [contact::view::get::first_view_id $object_type]
+ set view_id [contacts::view::get::first_view_id $object_type]
if { ![exists_and_not_null view_id] } {
# there are no pages available for this contact object type
set error_p 1