ad_page_contract { List all the files in a particular version of a package. @author Jon Salz [jsalz@arsdigita.com] @creation-date 9 May 2000 @cvs-id $Id: version-files.tcl,v 1.19 2017/08/07 23:47:45 gustafn Exp $ } { {version_id:naturalnum,notnull} } apm_version_info $version_id set return_url "[ad_conn url]?[ad_conn query]" set title "Files" set context [list \ [list "../developer" "Developer's Administration"] \ [list "/acs-admin/apm/" "Package Manager"] \ [list [export_vars -base version-view { version_id }] "$pretty_name $version_name"] \ $title] set body {
} if { $installed_p == "t" } { append body [subst {
} set last_components [list] set counter 0 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 { $file_type eq "" } { 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 # we wrote out. set components [split $path "/"] for { set i 0 } { $i < [llength $components] - 1 && $i < [llength $last_components] - 1 } { incr i } { if {[lindex $components $i] ne [lindex $last_components $i] } { break } } # For every changed component (at least the file name), write a row in the table. while { $i < [llength $components] } { append body " Path File type Database support \n" incr i } set last_components $components } if {$counter == 0} { append body " " for { set j 0 } { $j < $i } { incr j } { append body " " } if { $installed_p == "f" || [file exists "[acs_package_root_dir $package_key]/$path"] || $i < [llength $components] - 1} { # Either we're not looking at an installed package, or the file still exists, # so don't use " } else { append body [subst {when writing the name. append body [lindex $components $i] } else { # This is an installed package, and a file has been removed from the filesystem. # Useto indicate that the file has been deleted. append body "[lindex $components $i]" if { $i == [llength $components] - 1 } { lappend stricken_files $file_id } } if { $i < [llength $components] - 1 } { append body "/$file_pretty_name   $db_pretty_name }] if { $installed_p == "t" } { set server_rel_path "packages/$package_key/$path" if { [apm_file_watchable_p $server_rel_path] } { if { [nsv_exists apm_reload_watch $server_rel_path] } { # This procs file is already being watched. append body " being watched " } else { if {![parameter::get -package_id [ad_acs_kernel_id] \ -parameter PerformanceModeP -default 1]} { # Provide a link to watch the procs file. set href [export_vars -base file-watch {version_id {paths $path} return_url}] append body [subst {watch }] } else { append body "" } } } else { append body " " } } } append body " \n" } append body { This package does not contain any registered files.