Index: openacs-4/packages/acs-admin/www/apm/package-load-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-load-2.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-admin/www/apm/package-load-2.tcl 10 Sep 2002 22:21:59 -0000 1.3
+++ openacs-4/packages/acs-admin/www/apm/package-load-2.tcl 10 Jan 2007 21:21:59 -0000 1.4
@@ -13,8 +13,8 @@
} -validate {
url_xor_file_path {
- if {([empty_string_p $url] && [empty_string_p $file_path]) ||
- (![empty_string_p $url] && ![empty_string_p $file_path]) } {
+ if {($url eq "" && $file_path eq "") ||
+ ($url ne "" && $file_path ne "") } {
ad_complain
}
}
@@ -30,9 +30,9 @@
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 {$file_path eq ""} {
- if {[string range $url 0 6] == "http://"} {
+ if {[string range $url 0 6] eq "http://"} {
set url [string range $url 7 end]
}
@@ -68,14 +68,14 @@
}
ns_log Debug "APM: Loading $file_path"
# If file_path ends in .apm, then load the single package.
-if { ![string compare [string range $file_path [expr [string length $file_path] -3] end] "apm"] } {
+if { ![string compare [string range $file_path [expr {[string length $file_path] -3}] end] "apm"] } {
apm_load_apm_file -callback apm_ns_write_callback $file_path
} else {
# See if this is a directory.
if { [file isdirectory $file_path] } {
#Find all the .APM and load them.
set apm_file_list [glob -nocomplain "$file_path/*.apm"]
- if {[empty_string_p $apm_file_list]} {
+ if {$apm_file_list eq ""} {
ns_write "The directory specified, $file_path
, does not contain any APM files. Please try again.[ad_footer]"
return
} else {