Index: openacs-4/contrib/packages/portal/tcl/portal-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/portal-procs.tcl,v diff -u -r1.27 -r1.28 --- openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 24 Mar 2004 00:03:37 -0000 1.27 +++ openacs-4/contrib/packages/portal/tcl/portal-procs.tcl 28 May 2004 12:27:05 -0000 1.28 @@ -48,6 +48,7 @@ {-owner_privileges {read write admin}} {-initialize_elements:boolean} {-theme_name ""} + {-package_id ""} } { Create a new portal for the passed in owner_id. create pages passed in the page_list. @@ -65,6 +66,7 @@ copying. @theme_name The theme to assign to this portal (defaults to the package's default_theme_name) + @package_id The package id of the owning package (defaults to ad_conn package_id) } { @@ -76,6 +78,10 @@ set theme_name [parameter::get -parameter DefaultThemeName] } + if { [string equal $package_id ""] } { + set package_id [ad_conn package_id] + } + db_transaction { set var_list [subst { @@ -84,7 +90,7 @@ {context_id $context_id} {owner_id $owner_id} {theme_id [portal::theme::get_id -name $theme_name]} - {package_id [ad_conn package_id]}}] + {package_id $package_id}}] set portal_id [package_instantiate_object -var_list $var_list portal]