Index: openacs-4/packages/acs-admin/lib/service-parameters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/lib/service-parameters.tcl,v diff -u -r1.7.12.4 -r1.7.12.5 --- openacs-4/packages/acs-admin/lib/service-parameters.tcl 10 Nov 2016 14:45:09 -0000 1.7.12.4 +++ openacs-4/packages/acs-admin/lib/service-parameters.tcl 17 Nov 2016 00:02:58 -0000 1.7.12.5 @@ -11,14 +11,17 @@ set user_id [ad_conn user_id] set swadmin_p 0 -db_multirow -extend { url admin_url param_url } packages services_select {} { +db_multirow -extend { url admin_url param_url sitewide_admin_url} packages services_select {} { set root_dir [acs_package_root_dir $package_key] + set sitewide_admin_url "" if { [file exists $root_dir/www/] } { set url [apm_package_url_from_key $package_key] if { $url ne "" && [file exists $root_dir/www/admin/] } { set admin_url "${url}admin/" } - if { [file exists $root_dir/www/sitewide-admin/] } { + if { [file exists $root_dir/www/sitewide-admin/] + && [glob -nocomplain $root_dir/www/sitewide-admin/index.*] ne "" + } { set sitewide_admin_url "/acs-admin/package/$package_key/" set swadmin_p 1 } @@ -31,11 +34,13 @@ } set instance_name [lang::util::localize $instance_name] - if { $url eq "" && $admin_url eq "" && $param_url eq "" } { + if { $url eq "" && $admin_url eq "" && $param_url eq "" && $sitewide_admin_url eq ""} { continue } } +ns_log notice swadmin_p=$swadmin_p + template::list::create \ -name packages \ -multirow packages \ Index: openacs-4/packages/acs-admin/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/index.tcl,v diff -u -r1.16.2.2 -r1.16.2.3 --- openacs-4/packages/acs-admin/www/index.tcl 10 Sep 2015 07:54:15 -0000 1.16.2.2 +++ openacs-4/packages/acs-admin/www/index.tcl 17 Nov 2016 00:02:58 -0000 1.16.2.3 @@ -12,15 +12,20 @@ }]] db_multirow -extend { admin_url global_param_url } packages installed_packages {} { + set package_type [db_string get_package_type { + select package_type from apm_package_types + where package_key = :package_key + }] if { [apm_package_installed_p $package_key] + && $package_type ne "apm_service" && [file exists "[acs_package_root_dir $package_key]/www/sitewide-admin/"] } { set admin_url "package/$package_key/" } else { set admin_url "" } - if { [catch {db_1row global_params_exist {}} errmsg] + if { ![db_0or1row global_params_exist {}] || $global_params == 0 } { set global_param_url ""