Index: openacs-4/packages/xotcl-core/xotcl-core.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/xotcl-core.info,v diff -u -r1.78 -r1.79 --- openacs-4/packages/xotcl-core/xotcl-core.info 18 Jun 2010 10:26:59 -0000 1.78 +++ openacs-4/packages/xotcl-core/xotcl-core.info 25 Jun 2010 08:46:26 -0000 1.79 @@ -10,10 +10,10 @@ t xotcl - + Gustaf Neumann XOTcl library functionality (e.g. thread handling, online documentation, Generic Form and List Classes) - 2010-06-18 + 2010-06-25 Gustaf Neumann, WU Wien This component contains some core functionality for OpenACS applications using XOTcl. It includes @@ -43,7 +43,7 @@ BSD-Style 0 - + Index: openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 24 Jun 2010 09:57:57 -0000 1.27 +++ openacs-4/packages/xotcl-core/tcl/06-package-procs.tcl 25 Jun 2010 08:46:27 -0000 1.28 @@ -37,18 +37,28 @@ } } - PackageMgr ad_instproc instances {{-include_unmounted false}} { + PackageMgr ad_instproc instances {{-include_unmounted false} {-closure false}} { + @param include_unmounted include unmounted package instances + @param closure include instances of subclasses of the package @return list of package_ids of xowiki instances } { my instvar package_key if {$include_unmounted} { - return [db_list [my qn get_xowiki_packages] {select package_id \ + set result [db_list [my qn get_xowiki_packages] {select package_id \ from apm_packages where package_key = :package_key}] } else { - return [db_list [my qn get_mounted_packages] {select package_id \ + set result [db_list [my qn get_mounted_packages] {select package_id \ from apm_packages p, site_nodes s \ where package_key = :package_key and s.object_id = p.package_id}] } + if {$closure} { + foreach subclass [my info subclass] { + foreach id [$subclass instances -include_unmounted $include_unmounted -closure true] { + lappend result $id + } + } + } + return [lsort -integer $result] } PackageMgr ad_instproc initialize {