Index: openacs-4/packages/organizations/organizations.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/organizations.info,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/organizations/organizations.info 25 Jul 2004 11:26:28 -0000 1.7
+++ openacs-4/packages/organizations/organizations.info 16 Sep 2005 15:46:53 -0000 1.8
@@ -7,7 +7,7 @@
f
f
-
+
Jon Griffin
Jade Rubick
Implementation of HR-XML organizations datamodel.
@@ -20,7 +20,7 @@
what needs to be updated to make things work correctly [Jade Rubick].
-
+
Index: openacs-4/packages/organizations/tcl/organizations-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/tcl/organizations-procs.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/organizations/tcl/organizations-procs.tcl 10 Sep 2005 13:42:13 -0000 1.4
+++ openacs-4/packages/organizations/tcl/organizations-procs.tcl 16 Sep 2005 15:46:20 -0000 1.5
@@ -141,3 +141,27 @@
}
+ad_proc -public organization::organization_p {
+ {-party_id:required}
+} {
+ is this party an organization? Cached
+} {
+ return [util_memoize [list ::organization::organization_p_not_cached -party_id $party_id]]
+}
+
+ad_proc -public organization::organization_p_not_cached {
+ {-party_id:required}
+} {
+ is this party and organization?
+} {
+ if {[person::person_p -party_id $party_id]} {
+ return 0
+ } else {
+ if {[db_0or1row contact_org_exists_p {select '1' from organizations where organization_id = :party_id}]} {
+ return 1
+ } else {
+ return 0
+ }
+ }
+}
+