Index: openacs-4/contrib/packages/portal/tcl/datasource-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/tcl/datasource-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/packages/portal/tcl/datasource-procs.tcl 12 Feb 2004 14:59:05 -0000 1.4 +++ openacs-4/contrib/packages/portal/tcl/datasource-procs.tcl 12 Mar 2004 04:54:04 -0000 1.5 @@ -46,10 +46,11 @@ name The name of the new datasource pretty_name The pretty name (or message key) of the datasource owner The package that owns this portlet - application The package the portlet works with + application The package the portlet works with, if any template The template the displays the portlet content - shadeable_p If true the user can shade (i.e. close) the portlet - hideable_p If true, the user can hide the portlet entirely + admin_p If true, this datasource is only available to admins (default is false) + shadeable_p If true (default) the user can shade (i.e. close) the portlet + hideable_p If true (default), the user can hide the portlet entirely description A human-readable description (defaults to name) params A list of portlet-specific param key/attributes and their values aliases Service contract aliases clause for acs_sc::impl::new_from_spec @@ -63,7 +64,14 @@ } { + # Set some default values + + set datasource(admin_p) f + set datasource(shadeable_p) t + set datasource(hideable_p) t + array set datasource $spec +ns_log Notice "Huh? setting admin_p: $datasource(admin_p)" # Default datasource description to its name if { ![info exists datasource(description)] } { @@ -78,6 +86,7 @@ [list owner $datasource(owner)] \ [list application $datasource(application)] \ [list template $datasource(template)] \ + [list admin_p $datasource(admin_p)] \ [list shadeable_p $datasource(shadeable_p)] \ [list hideable_p $datasource(hideable_p)] \ [list description $datasource(description)]]