ad_page_contract { Loads a package from a URL into the package manager. @param url The url of the package to load. @author Bryan Quinn (bquinn@arsdigita.com) @creation-date 10 October 2000 @cvs-id $Id: package-load-2.tcl,v 1.1.1.2 2002/10/08 15:46:40 rmello Exp $ } { {url ""} {file_path ""} {delete 0} } -validate { url_xor_file_path { if {([empty_string_p $url] && [empty_string_p $file_path]) || (![empty_string_p $url] && ![empty_string_p $file_path]) } { ad_complain } } } -errors { url_xor_file_path {You must specify either a URL to download or a file path, but not both.} } if {$delete} { file delete -force [apm_workspace_install_dir] } ad_return_top_of_page "[apm_header -form "package-load" [list "package-load" "Load a New Package"] "View Package Contents"] " if {[empty_string_p $file_path]} { if {[string range $url 0 6] == "http://"} { set url [string range $url 7 end] } ns_write "
[ad_footer]" return } } else { ns_write " Accessing $file_path...[ad_quotehtml $errmsg]
$file_path
, does not contain any APM files. Please try again.[ad_footer]"
return
} else {
foreach apm_file $apm_file_list {
ns_write "Loading $apm_file... " } } } else { # Not sure what to do... stop. ns_write "The specified file path is not an APM file or a directory. Please try entering a new file path.[ad_footer]" return } } ns_write "