"
Index: openacs-4/packages/acs-admin/www/apm/package-delete.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-delete.tcl,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-admin/www/apm/package-delete.tcl 22 Jan 2003 18:39:11 -0000 1.4
+++ openacs-4/packages/acs-admin/www/apm/package-delete.tcl 25 Feb 2003 16:57:20 -0000 1.5
@@ -14,24 +14,17 @@
set db_type [db_type]
-db_foreach apm_package_drop_scripts {
- select file_id, path
- from apm_package_files
- where version_id = :version_id
- and file_type = 'data_model_drop'
- and (db_type is null or db_type = :db_type)
-} {
+set file_list ""
+foreach file [apm_get_package_files -package_key $package_key -file_types data_model_drop] {
append file_list "
-
-
$path
+
+
$file
"
-} if_no_rows {
- set file_list ""
-}
+}
if {![empty_string_p $file_list]} {
set file_list "
- Please check the drop scripts you want to run. Be aware that this will
+ We recommend sourcing all of the drop scripts for the package. Be aware that this will
erase all data associated with this package from the database.
$file_list
Index: openacs-4/packages/acs-admin/www/apm/package-watch.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-watch.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/apm/package-watch.tcl 25 Feb 2003 16:57:20 -0000 1.1
@@ -0,0 +1,13 @@
+ad_page_contract {
+ Schedules all -procs.tcl and xql files of a package to be watched.
+
+
+ @author Peter Marklund
+ @cvs-id $Id: package-watch.tcl,v 1.1 2003/02/25 16:57:20 peterm Exp $
+} {
+ package_key
+}
+
+apm_watch_all_files $package_key
+
+ad_returnredirect "index"
\ No newline at end of file
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.5 -r1.6
--- openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 19 Dec 2002 16:06:59 -0000 1.5
+++ openacs-4/packages/acs-admin/www/apm/packages-install-3.tcl 25 Feb 2003 16:57:20 -0000 1.6
@@ -21,7 +21,6 @@
"
set sql_file_list [list]
-set catalog_file_list [list]
set file_count 0
foreach pkg_info $pkg_install_list {
@@ -47,8 +46,10 @@
# 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_key $version(files)]
+ set data_model_files [apm_data_model_scripts_find \
+ -upgrade_from_version_name $initial_version_name \
+ -upgrade_to_version_name $final_version_name \
+ $package_key]
set sql_file_list [concat $sql_file_list $data_model_files]
if {![empty_string_p $data_model_files]} {
foreach file $data_model_files {
@@ -62,6 +63,12 @@
"
incr file_count
}
+
+ if { [empty_string_p $version(auto-mount)] && [string equal $version(package.type) apm_application] } {
+ set mount_html " Mount package under the main site at path "
+ } else {
+ set mount_html ""
+ }
append body "
Select what data files to load for $version(package-name) $final_version_name
@@ -72,17 +79,14 @@
File Name
$table_rows
-
"
+
+ $mount_html
+
"
}
-
- # I18N: Get the list of message catalog files to source
- set catalog_file_list [concat $catalog_file_list [apm_message_catalog_files_find $package_key $version(files)]]
}
ad_set_client_property -clob t apm sql_file_paths $sql_file_list
-ad_set_client_property -clob t apm catalog_file_paths $catalog_file_list
-
if {[empty_string_p $sql_file_list]} {
ad_returnredirect packages-install-4
ad_script_abort
Index: openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 16 Feb 2003 00:03:58 -0000 1.6
+++ openacs-4/packages/acs-admin/www/apm/packages-install-4.tcl 25 Feb 2003 16:57:20 -0000 1.7
@@ -7,12 +7,13 @@
@cvs-id $Id$
} {
{sql_file:multiple ""}
+ {mount_p:multiple ""}
+ {mount_path:array ""}
}
set pkg_install_list [ad_get_client_property apm pkg_install_list]
set pkg_enable_list [ad_get_client_property apm pkg_enable_list]
set sql_file_paths [ad_get_client_property apm sql_file_paths]
-set catalog_file_paths [ad_get_client_property apm catalog_file_paths]
set install_path [ad_get_client_property apm install_path]
set copy_files_p [ad_get_client_property apm copy_files_p]
@@ -58,21 +59,20 @@
}
}
- set message_catalog_files [list]
- # Find the message catalog files for the package
- foreach file $catalog_file_paths {
- if { [string equal [lindex $file 1] $package_key] } {
- # We only need a list of file paths relative to package root
- lappend message_catalog_files [lindex $file 0]
- }
+ # Mount path of package
+ if { [lsearch $mount_p $package_key] != -1 && [info exists mount_path($package_key)] && ![empty_string_p $mount_path($package_key)] } {
+ set selected_mount_path $mount_path($package_key)
+ } else {
+ set selected_mount_path ""
}
# Install the packages.
ns_log Debug "APM: Installing packages from $install_path."
if {$copy_files_p} {
set version_id [apm_package_install -install_path $install_path \
-callback apm_ns_write_callback -copy_files -load_data_model \
- -data_model_files $data_model_files -message_catalog_files $message_catalog_files \
+ -data_model_files $data_model_files \
+ -mount_path $selected_mount_path \
$spec_file]
if {$version_id != 0} {
file delete -force $install_path/$package_key
@@ -86,7 +86,7 @@
-callback apm_ns_write_callback \
-load_data_model \
-data_model_files $data_model_files \
- -message_catalog_files $message_catalog_files \
+ -mount_path $selected_mount_path \
$spec_file]
}
Index: openacs-4/packages/acs-admin/www/apm/version-files.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-files.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-admin/www/apm/version-files.tcl 18 Sep 2002 14:54:45 -0000 1.7
+++ openacs-4/packages/acs-admin/www/apm/version-files.tcl 25 Feb 2003 16:57:20 -0000 1.8
@@ -1,14 +1,11 @@
ad_page_contract {
List all the files in a particular version of a package.
- @param version_id The package to be processed.
- @param remove_files_p Set to 1 if you want to remove all the files.
@author Jon Salz [jsalz@arsdigita.com]
@creation-date 9 May 2000
@cvs-id $Id$
} {
{version_id:integer}
- {remove_files_p 0}
}
db_1row apm_package_by_version_id {
@@ -17,17 +14,10 @@
from apm_package_version_info where version_id = :version_id
}
-if { $remove_files_p == 1 } {
- # This is really a "remove multiple files" page.
- set form "action=\"file-remove\" method=post"
- set apm_header_args [list [list "version-files?version_id=$version_id" "Files"] "Remove Files"]
-} else {
- set form ""
- set apm_header_args [list "Files"]
-}
+set form ""
+set apm_header_args [list "Files"]
-doc_body_append "[eval [concat [list apm_header -form $form [list "version-view?version_id=$version_id" "$pretty_name $version_name"]] $apm_header_args]]
-"
+doc_body_append "[eval [concat [list apm_header -form $form [list "version-view?version_id=$version_id" "$pretty_name $version_name"]] $apm_header_args]]"
doc_body_append "
@@ -40,17 +30,18 @@
set counter 0
doc_body_append "
Path
File type
-
Database support
Actions
\n"
+
Database support
\n"
-db_foreach apm_all_files {
- select f.file_id, f.path, f.file_type, nvl(t.pretty_name, 'Unknown type') file_pretty_name,
- f.db_type, nvl(d.pretty_db_name, 'All') as db_pretty_name
- from apm_package_files f, apm_package_file_types t, apm_package_db_types d
- where f.version_id = :version_id
- and f.file_type = t.file_type_key(+)
- and f.db_type = d.db_type_key(+)
- order by path
-} {
+foreach path [apm_get_package_files -package_key $package_key] {
+ set file_id ""
+ set db_type [apm_guess_db_type $package_key $path]
+ set db_pretty_name $db_type
+ set file_type [apm_guess_file_type $package_key $path]
+ if { [empty_string_p $file_type] } {
+ set file_type "?"
+ }
+ set file_pretty_name $file_type
+
incr counter
# Set i to the index of the last component which hasn't changed since the last component
@@ -86,10 +77,7 @@
doc_body_append ""
doc_body_append "
$file_pretty_name
 
$db_pretty_name
"
- if { $remove_files_p == 1 } {
- # Display a checkbox which the user can check to delete the file.
- doc_body_append "
"
- } else {
+
if { $installed_p == "t" } {
if { $file_type == "tcl_procs" || ($file_type == "query_file" && [db_compatible_rdbms_p $db_type]) } {
if { [nsv_exists apm_reload_watch "packages/$package_key/$path"] } {
@@ -99,77 +87,56 @@
if {![ad_parameter -package_id [ad_acs_kernel_id] \
PerformanceModeP request-processor 1]} {
# Provide a link to watch the procs file.
- doc_body_append "
+ "
}
}
doc_body_append [ad_footer]
-
Index: openacs-4/packages/acs-admin/www/apm/version-i18n.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n.adp,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-admin/www/apm/version-i18n.adp 10 Jan 2003 17:12:12 -0000 1.11
+++ openacs-4/packages/acs-admin/www/apm/version-i18n.adp 25 Feb 2003 16:57:20 -0000 1.12
@@ -101,10 +101,10 @@
variables (i.e. \@var_name\@), will be listed on the result
page. Make sure to take note of these texts and translate them
manually. Suppose for example that our script tells you that it left
- the text "Forum \@forum_name\@" untouched. What you should do then
+ the text "Manage forum \@forum_name\@" untouched. What you should do then
is to edit the corresponding adp file and manually replace that text
- with something like "<#Forum Forum#> \@forum_name\@" (to save you
- from too much typing you may use the shorthand <#_ Forum#>, an
+ with something like "<#manage_forum Manage forum \@forum_name\@#>" (to save you
+ from too much typing you may use the shorthand <#_ Manage forum \@forum_name\@#>, an
underscore key will result in the script auto-generating a key for
you based on the text). After you have made all such manual edits
you can simply run the second action labeled "Replace tags with keys