Index: openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl,v diff -u -r1.14.8.4 -r1.14.8.5 --- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 17 Aug 2014 08:11:10 -0000 1.14.8.4 +++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 17 Aug 2014 11:36:55 -0000 1.14.8.5 @@ -29,68 +29,68 @@ # Determine if we are upgrading or installing. if { [apm_package_upgrade_p $package_key $final_version_name] == 1} { - ns_log Debug "Upgrading package [string totitle $version(package-name)] to $final_version_name." - set upgrade_p 1 - set initial_version_name [db_string apm_package_upgrade_from { - select version_name from apm_package_versions - where package_key = :package_key - and version_id = apm_package.highest_version(:package_key) - } -default ""] + ns_log Debug "Upgrading package [string totitle $version(package-name)] to $final_version_name." + set upgrade_p 1 + set initial_version_name [db_string apm_package_upgrade_from { + select version_name from apm_package_versions + where package_key = :package_key + and version_id = apm_package.highest_version(:package_key) + } -default ""] } else { - set upgrade_p 0 - set initial_version_name "" + set upgrade_p 0 + set initial_version_name "" } # Find out which script is appropriate to be run. set data_model_in_package 0 set table_rows "" set data_model_files [apm_data_model_scripts_find \ - -upgrade_from_version_name $initial_version_name \ - -upgrade_to_version_name $final_version_name \ - -package_path $package_path \ - $package_key] + -upgrade_from_version_name $initial_version_name \ + -upgrade_to_version_name $final_version_name \ + -package_path $package_path \ + $package_key] set sql_file_list [concat $sql_file_list $data_model_files] if {$data_model_files ne ""} { - foreach file $data_model_files { - set path [lindex $file 0] - set file_type [lindex $file 1] - append table_rows [subst { - - - $path - [apm_pretty_name_for_file_type $file_type] - - }] - incr file_count - } + foreach file $data_model_files { + set path [lindex $file 0] + set file_type [lindex $file 1] + append table_rows [subst { + + + $path + [apm_pretty_name_for_file_type $file_type] + + }] + incr file_count + } if { $version(auto-mount) eq "" - && $version(package.type) eq "apm_application" - } { + && $version(package.type) eq "apm_application" + } { set mount_html [subst { - - Mount package under the main site at path - - }] + + Mount package under the main site at path + + }] } else { set mount_html "" } - append body [subst { - Select what data files to load for $version(package-name) $final_version_name -
- - + append body [subst { + Select what data files to load for $version(package-name) $final_version_name +
+
+ - - - - $table_rows -
LoadFile NameFile Type
- $mount_html -

- }] + File Name + File Type + + $table_rows + + $mount_html +

+ }] } } @@ -107,3 +107,10 @@ } ad_return_template apm +# +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: + Index: openacs-4/packages/acs-admin/www/apm/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install.tcl,v diff -u -r1.22.4.7 -r1.22.4.8 --- openacs-4/packages/acs-admin/www/apm/packages-install.tcl 17 Aug 2014 08:11:10 -0000 1.22.4.7 +++ openacs-4/packages/acs-admin/www/apm/packages-install.tcl 17 Aug 2014 11:36:55 -0000 1.22.4.8 @@ -55,7 +55,7 @@ } else { ns_log Notice "need upgrade of package $package_key $version_name" lappend already_installed_list \ - "Package $package_name; ($package_key) version $version_name or higher is already installed." + "Package $package_name; ($package_key) version $version_name or higher is already installed." } } else { lappend spec_files $spec_file @@ -72,38 +72,38 @@ if { $spec_files eq "" } { # No spec files to work with. append body [subst { -

No New Packages to Install

+

No New Packages to Install

- There are no new packages to install. Please load some - using the Package Loader.

- Return to the APM.

+ There are no new packages to install. Please load some + using the Package Loader.

+ Return to the APM.

}] } else { append body { -

Select Packages to Install

-

Please select the set of packages you'd like to install.

+

Select Packages to Install

+

Please select the set of packages you'd like to install.

} append body [subst { - -uncheck all boxes | -check all boxes + + uncheck all boxes | + check all boxes }] - append body "
\n" + append body "\n" # Client properties do not deplete the limited URL variable space. # But they are limited to the maximum length of a varchar ... @@ -115,43 +115,43 @@ set pkg_key_list [list] apm_log APMDebug "APM: Specification files available: $spec_files" foreach spec_file $spec_files { - ### Parse the package. - if { [catch { - array set package [apm_read_package_info_file $spec_file] - } errmsg] } { - lappend errors "
  • Unable to parse $spec_file. The following error was generated: -
    [ad_quotehtml $errmsg]

    " - } else { - apm_log APMDebug "APM: Adding $package(package.key) to list for installation." - lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \ - $package(embeds) $package(extends) $package(provides) $package(requires) ""] + ### Parse the package. + if { [catch { + array set package [apm_read_package_info_file $spec_file] + } errmsg] } { + lappend errors "

  • Unable to parse $spec_file. The following error was generated: +
    [ad_quotehtml $errmsg]

    " + } else { + apm_log APMDebug "APM: Adding $package(package.key) to list for installation." + lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \ + $package(embeds) $package(extends) $package(provides) $package(requires) ""] lappend pkg_key_list $package(package.key) - } + } } - + if { $checked_by_default_p } { set widget [apm_package_selection_widget $pkg_info_list $pkg_key_list] } else { set widget [apm_package_selection_widget $pkg_info_list] -} + } if {$widget eq ""} { - append body "There are no new packages available." - ad_script_abort + append body "There are no new packages available." + ad_script_abort } append body $widget append body [subst { - -

  • + + }] if {$errors ne ""} { - append body "The following errors were generated - - " + append body "The following errors were generated + + " } } @@ -163,3 +163,10 @@ ns_log Notice "APM packages-install: Already Installed Packages\n- [join $already_installed_list "\n- "]" } ad_return_template apm + +# +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: