Index: openacs-4/packages/acs-subsite/www/admin/site-map/application-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/admin/site-map/application-new.tcl,v diff -u -r1.1.2.1 -r1.1.2.2 --- openacs-4/packages/acs-subsite/www/admin/site-map/application-new.tcl 5 Jun 2003 16:42:53 -0000 1.1.2.1 +++ openacs-4/packages/acs-subsite/www/admin/site-map/application-new.tcl 4 Jul 2003 12:53:24 -0000 1.1.2.2 @@ -17,9 +17,9 @@ {options $packages} {help_text "The type of application you want to add."} } - {instance_name:text + {instance_name:text,optional {label "Application name"} - {help_text "The human-readable name of your application."} + {help_text "The human-readable name of your application. If you leave this out, we'll use the name of the application (e.g. 'Forums')."} {html {size 50}} } {folder:text,optional @@ -36,6 +36,21 @@ # Get the node ID of this subsite set node_id [ad_conn node_id] + if { [empty_string_p $instance_name] } { + # Find the package pretty name from the list of packages + + foreach elm $packages { + if { [string equal [lindex $elm 1] $package_key] } { + set instance_name [lindex $elm 0] + break + } + } + if { [empty_string_p $instance_name] } { + error "Couldn't find package_key '$package_key' in list of system applications" + } + + } + # Autogenerate folder name if { [empty_string_p $folder] } { set existing_urls [db_list existing_urls {}]