Index: openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 13 Mar 2001 22:59:26 -0000 1.1
+++ openacs-4/packages/acs-tcl/tcl/apm-xml-procs.tcl 5 Apr 2001 18:23:38 -0000 1.2
@@ -94,10 +94,17 @@
$singleton_p
-
- oracle-8.1.6
-
-"
+ \n"
+
+ db_foreach supported_databases {
+ select unique db_type
+ from apm_package_files
+ where db_type is not null
+ } {
+ append spec " $db_type\n"
+ }
+ append spec " \n"
+
db_foreach owner_info {
select owner_uri, owner_name
from apm_package_owners
@@ -150,11 +157,14 @@
append spec "\n \n"
ns_log Debug "APM: Writing Files."
- db_foreach version_path "select path, file_type from apm_package_files where version_id = :version_id order by path" {
+ db_foreach version_path "select path, file_type, db_type from apm_package_files where version_id = :version_id order by path" {
append spec " \n"
} else {
append spec " \n"
@@ -339,12 +349,18 @@
foreach file_node [dom::element getElementsByTagName $node "file"] {
set file_path [apm_required_attribute_value $file_node path]
set type [dom::element getAttribute $file_node type]
+ set db_type [dom::element getAttribute $file_node db_type]
# Validate the file type: it must be null (unknown type) or
# some value in [apm_file_type_keys].
if { ![empty_string_p $type] && [lsearch -exact [apm_file_type_keys] $type] < 0 } {
error "Invalid file type \"$type\""
}
- lappend properties(files) [list $file_path $type]
+ # Validate the database type: it must be null (unknown type) or
+ # some value in [apm_db_type_keys].
+ if { ![empty_string_p $db_type] && [lsearch -exact [apm_db_type_keys] $db_type] < 0 } {
+ error "Invalid database type \"$db_type\""
+ }
+ lappend properties(files) [list $file_path $type $db_type]
}
}