Commit 77f8174b authored by cvs2svn's avatar cvs2svn

This commit was manufactured by cvs2svn to create branch 'b3-4'.

Sprout from cognovis 2007-04-20 12:52:02 UTC Malte Sussdorff  <malte.sussdorff@cognovis.de> 'Initial import for 3.3'
Cherrypick from master 2007-08-08 16:13:03 UTC Frank Bergmann  <frank.bergmann@project-open.com> '- fixes during upgrade from 3.2.9 to 3.3':
    acs-admin.info
    tcl/apm-admin-procs.tcl
    www/apm/build-repository.tcl
    www/apm/bulk-intall.tcl
    www/apm/cvs-status.tcl
    www/apm/file-watch-cancel.tcl
    www/apm/file-watch.tcl
    www/apm/index.tcl
    www/apm/package-add-2.tcl
    www/apm/package-add.tcl
    www/apm/package-deinstall.tcl
    www/apm/package-delete-2.tcl
    www/apm/package-delete.tcl
    www/apm/package-load-2.tcl
    www/apm/package-load.tcl
    www/apm/package-scan.tcl
    www/apm/package-watch-cancel.tcl
    www/apm/package-watch.tcl
    www/apm/packages-install-2.tcl
    www/apm/packages-install-3.tcl
    www/apm/packages-install-4.tcl
    www/apm/packages-install.tcl
    www/apm/parameter-add-2.tcl
    www/apm/parameter-add.tcl
    www/apm/parameter-delete.tcl
    www/apm/parameter-edit-2.tcl
    www/apm/parameter-edit.tcl
    www/apm/repository-channel-index.adp
    www/apm/version-callback-add-edit.tcl
    www/apm/version-callback-delete.tcl
    www/apm/version-callback-invoke.tcl
    www/apm/version-callbacks.tcl
    www/apm/version-dependencies.tcl
    www/apm/version-dependency-add-2.tcl
    www/apm/version-dependency-add.tcl
    www/apm/version-dependency-remove.tcl
    www/apm/version-disable.tcl
    www/apm/version-edit-2.tcl
    www/apm/version-edit.tcl
    www/apm/version-enable.tcl
    www/apm/version-files.tcl
    www/apm/version-generate-diffs.tcl
    www/apm/version-generate-diffs.xql
    www/apm/version-generate-info.tcl
    www/apm/version-generate-tarball.tcl
    www/apm/version-i18n-export.tcl
    www/apm/version-i18n-import.tcl
    www/apm/version-i18n-index.tcl
    www/apm/version-i18n-process-2.tcl
    www/apm/version-i18n-process.tcl
    www/apm/version-i18n.tcl
    www/apm/version-parameter-values.tcl
    www/apm/version-parameters.tcl
    www/apm/version-reload.tcl
    www/apm/version-tag.tcl
    www/apm/version-upgrade.tcl
    www/apm/version-view.tcl
    www/apm/write-all-specs.tcl
    www/auth/authority-set-sort-order.tcl
    www/auth/authority.tcl
    www/auth/batch-job.tcl
    www/auth/index.tcl
    www/cache/show-util-memoize.adp
    www/cache/show-util-memoize.tcl
    www/developer.tcl
    www/index.tcl
    www/install/index.adp
    www/install/install-4.tcl
    www/install/install.tcl
    www/send-email.tcl
    www/server-restart.tcl
    www/test/signed-cookies-test-2.tcl
    www/test/signed-cookies-test.tcl
    www/users/complex-search.tcl
    www/users/index.adp
    www/users/index.tcl
    www/users/member-state-change.tcl
    www/users/modify-admin-privileges.tcl
    www/users/one.adp
    www/users/one.tcl
    www/users/password-update.tcl
    www/users/registration-history.tcl
    www/users/search.tcl
    www/users/session-history.tcl
    www/users/sessions-one-month.tcl
    www/users/sessions-registered-summary.tcl
    www/users/user-add-2.tcl
    www/users/user-add-3.tcl
    www/users/user-add.tcl
    www/users/user-batch-add-2.tcl
Delete:
    tcl/merge-procs.tcl
    tcl/merge-procs.xql
parent 0b42b0d1
......@@ -2,25 +2,24 @@
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-admin" url="http://openacs.org/repository/apm/packages/acs-admin/" type="apm_service">
<license>GPL V2.0 or any later version</license>
<package-name>Site-Wide Administration</package-name>
<pretty-plural>Site-Wide Administration Services</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<version name="5.3.1b1" url="http://openacs.org/repository/download/apm/acs-admin-5.3.1b1.apm">
<version name="5.1.5" url="http://openacs.org/repository/download/apm/acs-admin-5.1.5.apm">
<owner url="mailto:dhogaza@pacifier.com">Don Baccus</owner>
<summary>An interface for Site-wide administration of an OpenACS Installation.</summary>
<maturity>3</maturity>
<release-date>2007-04-15</release-date>
<release-date>2004-02-28</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<license url="http://www.gnu.org/copyleft/gpl.html">GPL</license>
<maturity>3</maturity>
<description format="text/html">Provides a UI for administering site-wide services
(including package installation, cache, authentication, and user accounts) for an OpenACS system.
</description>
<provides url="acs-admin" version="5.3.1b1"/>
<requires url="acs-kernel" version="5.3.1b1"/>
<provides url="acs-admin" version="5.1.4"/>
<requires url="acs-kernel" version="5.0.0"/>
<callbacks>
</callbacks>
......
......@@ -56,10 +56,6 @@ ad_proc apm_header { { -form "" } args } {
lappend cmd $elem
}
set context_bar [eval $cmd]
# this is rather a hack, but just needed for streaming output
# a more general solution can be provided at some later time...
regsub "#acs-kernel.Main_Site#" $context_bar \
[_ acs-kernel.Main_Site] context_bar
}
set header [ad_header $title ""]
append body "$header\n"
......@@ -92,6 +88,7 @@ proc_doc apm_shell_wrap { cmd } { Returns a command string, wrapped it shell-sty
ad_proc -private apm_package_selection_widget {
-install_enable:boolean
{ -update_only_p 0 }
pkg_info_list
{to_install ""}
{to_enable ""}
......@@ -108,7 +105,7 @@ ad_proc -private apm_package_selection_widget {
}
set checkbox_count 0
set counter 0
set counter 1
set band_colors { white "#ececec" }
set widget "<blockquote><table cellpadding=5 cellspacing=5>
<tr bgcolor=\"\#f8f8f8\"><th>Install</th>[ad_decode $install_enable_p 1 "<th>Enable</th>" ""]<th>Package</th><th>Directory</th><th>Comment</th></tr>
......@@ -116,7 +113,6 @@ ad_proc -private apm_package_selection_widget {
foreach pkg_info $pkg_info_list {
incr counter
set package_key [pkg_info_key $pkg_info]
set package_path [pkg_info_path $pkg_info]
set package_rel_path [string range $package_path [string length [acs_root_dir]] end]
......@@ -124,13 +120,12 @@ ad_proc -private apm_package_selection_widget {
array set package [apm_read_package_info_file $spec_file]
set version_name $package(name)
ns_log Debug "Selection widget: $package_key, Dependency: [pkg_info_dependency_p $pkg_info]"
append widget " <tr valign=baseline bgcolor=[lindex $band_colors \
[expr { $counter % [llength $band_colors] }]]>"
if { ![string compare [pkg_info_dependency_p $pkg_info] "t"]} {
# Dependency passed.
# Dependency passed.
append widget " <tr valign=baseline bgcolor=[lindex $band_colors [expr { $counter % [llength $band_colors] }]]>"
if { $install_enable_p } {
if { ([lsearch -exact $to_install $package_key] != -1) } {
append widget " <td align=center><input type=checkbox checked
......@@ -156,29 +151,33 @@ ad_proc -private apm_package_selection_widget {
append widget "
onclick=\"if (checked) document.forms\[0\].elements\[$checkbox_count\].checked=true\""
}
append widget "></td>
<td>$package(package-name) $package(name)</td>
<td>$package_rel_path</td>
<td><font color=green>Dependencies satisfied.</font></td>
</tr> "
} elseif { ![string compare [pkg_info_dependency_p $pkg_info] "f"] } {
#Dependency failed.
# Dependency failed.
append widget " <tr valign=baseline bgcolor=[lindex $band_colors [expr { $counter % [llength $band_colors] }]]>"
if { $install_enable_p } {
append widget " <td align=center><input type=checkbox name=install value=\"$package_key\"
onclick=\"if (!checked) document.forms\[0\].elements\[$checkbox_count+1\].checked=false\"></td>"
}
append widget "
<td align=center><input type=checkbox name=enable value=\"$package_key\" "
if { $install_enable_p } {
append widget "onclick=\"if (checked) document.forms\[0\].elements\[$checkbox_count\].checked=true\""
}
append widget "></td>
<td>$package(package-name) $package(name)</td>
<td>$package_rel_path</td>
<td><font color=red>
<td>$package_rel_path</td><td><font color=red>
"
foreach comment [pkg_info_comment $pkg_info] {
append widget "$comment<br>"
......@@ -188,24 +187,29 @@ ad_proc -private apm_package_selection_widget {
</tr>
"
} else {
# No dependency information.
# See if the install is already installed with a higher version number.
if {[apm_package_registered_p $package_key]} {
set higher_version_p [apm_higher_version_installed_p $package_key $version_name]
} else {
set higher_version_p 2
}
if {$higher_version_p == 2 } {
set comment "New install."
} elseif {$higher_version_p == 1 } {
set comment "Upgrade."
} elseif {$higher_version_p == 0} {
set comment "Package version already installed."
} else {
set comment "Installing older version of package."
}
} else {
set higher_version_p 2
}
if {$higher_version_p == 2 } {
set comment "New install."
# Skip this if it's update only
if {$update_only_p} { continue }
} elseif {$higher_version_p == 1 } {
set comment "Upgrade."
} elseif {$higher_version_p == 0} {
set comment "Package version already installed."
} else {
set comment "Installing older version of package."
}
append widget " <tr valign=baseline bgcolor=[lindex $band_colors [expr { $counter % [llength $band_colors] }]]>"
append widget " <tr valign=baseline bgcolor=[lindex $band_colors [expr { $counter % [llength $band_colors] }]]>"
if { ([lsearch -exact $to_install $package_key] != -1) } {
set install_checked "checked"
......@@ -235,6 +239,9 @@ ad_proc -private apm_package_selection_widget {
</tr>"
}
incr checkbox_count 2
incr counter
}
append widget "</table></blockquote>"
return $widget
......@@ -484,14 +491,10 @@ ad_proc -private apm_build_repository {
# The path to the 'packages' directory in the checkout
set packages_root_path [eval file join [lrange [file split $spec_file] 0 end-2]]
set tmp_filename [ns_tmpnam]
lappend cmd --files-from $tmp_filename -C $packages_root_path
set fp [open $tmp_filename w]
lappend cmd -C $packages_root_path
foreach file $files {
puts $fp $package_key/$file
lappend cmd $package_key/$file
}
close $fp
lappend cmd "|" [apm_gzip_cmd] -c ">" $apm_file
ns_log Notice "Executing: [ad_quotehtml $cmd]"
eval $cmd
......
ad_library {
Definitions of procs for the merge process
@creation-date 15 APR 2005
@author Enrique Catalan (quio@galileo.edu)
@cvs-id $Id$
}
namespace eval merge {}
ad_proc -public merge::MergeUserInfo {
-from_user_id:required
-to_user_id:required
} {
Merge user info. Revokes permissions for from_user_id and grants
them to to_user_id.
@param from_user_id From user ID.
@param to_user_id To user ID.
} {
ns_log Notice "Running merge::MergeUserInfo"
db_transaction {
if { ![db_0or1row to_user_portrait {*SQL*}] && [db_0or1row from_user_portrait {*SQL*}] } {
db_dml upd_portrait {*SQL*}
}
# get the permissions of the from_user_id
# and grant them to the to_user_id
db_foreach getfromobjs {*SQL*} {
# revoke the permissions of from_user_id
permission::revoke -object_id $from_oid -party_id $from_user_id -privilege $from_priv
if { ![db_string touserhas {*SQL*} ] } {
# grant the permissions to to_user_id
permission::grant -object_id $from_oid -party_id $to_user_id -privilege $from_priv
}
}
ns_log notice " Merging acs_objects"
db_dml acs_objs_upd {*SQL*}
}
ns_log Notice "Finishing merge::MergeUserInfo"
}
ad_proc -callback merge::MergePackageUser {
-from_user_id:required
-to_user_id:required
} {
Merge two accounts
} -
ad_proc -callback merge::MergeShowUserInfo {
-user_id:required
} {
Show information of accounts to merge
} -
<?xml version="1.0"?>
<queryset>
<fullquery name="merge::MergeUserInfo.to_user_portrait">
<querytext>
select c.item_id
from acs_rels a, cr_items c
where a.object_id_two = c.item_id
and a.object_id_one = :to_user_id
and a.rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery name="merge::MergeUserInfo.from_user_portrait">
<querytext>
select c.item_id
from acs_rels a, cr_items c
where a.object_id_two = c.item_id
and a.object_id_one = :from_user_id
and a.rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery name="merge::MergeUserInfo.upd_portrait">
<querytext>
update acs_rels
set object_id_one = :to_user_id
where object_id_one = :from_user_id
and rel_type = 'user_portrait_rel'
</querytext>
</fullquery>
<fullquery name="merge::MergeUserInfo.getfromobjs">
<querytext>
select object_id as from_oid, privilege as from_priv from acs_permissions where grantee_id = :from_user_id
</querytext>
</fullquery>
<fullquery name="merge::MergeUserInfo.touserhas">
<querytext>
select count(*) from acs_permissions where object_id = :from_oid and grantee_id = :to_user_id
</querytext>
</fullquery>
<fullquery name="merge::MergeUserInfo.acs_objs_upd">
<querytext>
update acs_objects
set creation_user = :to_user_id
where creation_user = :from_user_id
</querytext>
</fullquery>
</queryset>
\ No newline at end of file
......@@ -12,7 +12,8 @@ ad_page_contract {
#----------------------------------------------------------------------
set cvs_command "cvs"
set cvs_root ":pserver:anonymous@cvs.openacs.org:/cvsroot"
set cvs_root ":pserver:anonymous@openacs.org:/cvsroot"
set dotlrn_cvs_root ":pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot"
set work_dir "[acs_root_dir]/repository-builder/"
......@@ -26,10 +27,10 @@ set index_template "/packages/acs-admin/www/apm/repository-index"
# from these packages
#set exclude_package_list { cms cms-news-demo glossary site-wide-search spam library }
set exclude_package_list {}
set head_channel "5-3"
set head_channel "5-1"
# Set this to 1 to only checkout sample packages -- useful for debugging and testing
set debug_p 0
set debug_p 1
#----------------------------------------------------------------------
# Prepare output
......@@ -48,8 +49,8 @@ ns_write <ul>
file mkdir $work_dir
cd $work_dir
catch { exec $cvs_command -d $cvs_root -z3 co openacs-4/readme.txt }
catch { exec $cvs_command -d $cvs_root -z3 log -h openacs-4/readme.txt } output
set lines [split $output \n]
......@@ -107,6 +108,8 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
# Wipe and re-create the checkout directory
file delete -force "${work_dir}openacs-4"
file delete -force "${work_dir}dotlrn"
file mkdir -force "${work_dir}dotlrn/packages"
# Prepare channel directory
set channel_dir "${work_dir}repository/${channel}/"
......@@ -126,7 +129,8 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
# Full list for real use
set checkout_list [list \
$work_dir $cvs_root openacs-4/packages \
$work_dir $cvs_root openacs-4/contrib/packages]
$work_dir $cvs_root openacs-4/contrib/packages \
${work_dir}dotlrn/packages/ $dotlrn_cvs_root dotlrn-core]
}
foreach { cur_work_dir cur_cvs_root cur_module } $checkout_list {
......@@ -149,18 +153,17 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
template::multirow create packages \
package_path package_key version pretty_name \
package_type summary description \
release_date vendor_url vendor \
license_url license maturity maturity_text
release_date vendor_url vendor
foreach packages_dir \
[list "${work_dir}openacs-4/packages" \
"${work_dir}openacs-4/contrib/packages"] {
"${work_dir}openacs-4/contrib/packages" \
"${work_dir}dotlrn/packages"] {
foreach spec_file [lsort [apm_scan_packages $packages_dir]] {
set package_path [eval file join [lrange [file split $spec_file] 0 end-1]]
set package_key [lindex [file split $spec_file] end-1]
set version_id [apm_version_id_from_package_key $package_key]
if { [lsearch -exact $exclude_package_list $package_key] != -1 } {
ns_write "Package $package_key is on list of packages to exclude - skipping"
......@@ -192,21 +195,13 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
append manifest { } {<description format="} [ad_quotehtml $version(description.format)] {">}
append manifest [ad_quotehtml $version(description)] {</description>} \n
append manifest { } {<release-date>} [ad_quotehtml $version(release-date)] {</release-date>} \n
append manifest { } {<maturity>} [ad_quotehtml $version(maturity)] {</maturity>} \n
append manifest { } {<license url="} [ad_quotehtml $version(license_url)] {">}
append manifest [ad_quotehtml $version(license)] {</license>} \n
append manifest { } {<vendor url="} [ad_quotehtml $version(vendor.url)] {">}
append manifest [ad_quotehtml $version(vendor)] {</vendor>} \n
append manifest [apm::package_version::attributes::generate_xml \
-version_id $version_id \
-indentation { }]
template::multirow append packages \
$package_path $package_key $version(name) $version(package-name) \
$version(package.type) $version(summary) $version(description) \
$version(release-date) $version(vendor.url) $version(vendor) \
$version(license_url) $version(license) $version(maturity) [apm::package_version::attributes::maturity_int_to_text $version(maturity)]
$version(release-date) $version(vendor.url) $version(vendor)
set apm_file "${channel_dir}${version(package.key)}-${version(name)}.apm"
......@@ -224,17 +219,13 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
# The path to the 'packages' directory in the checkout
set packages_root_path [eval file join [lrange [file split $spec_file] 0 end-2]]
set tmp_filename [ns_tmpnam]
lappend cmd --files-from $tmp_filename -C $packages_root_path
set fp [open $tmp_filename w]
lappend cmd -C $packages_root_path
foreach file $files {
puts $fp $package_key/$file
lappend cmd $package_key/$file
}
close $fp
lappend cmd "|" [apm_gzip_cmd] -c ">" $apm_file
#ns_log Notice "Executing: [ad_quotehtml $cmd]"
ns_log Notice "Executing: [ad_quotehtml $cmd]"
eval $cmd
}
......@@ -306,3 +297,5 @@ if { [file exists $repository_dirname] } {
file rename $work_repository_dirname $repository_dirname
ns_write "</ul> <h2>DONE</h2>\n"
......@@ -33,7 +33,7 @@ foreach version_id $install {
set ul_p 0
foreach file [apm_get_package_files -package_key $package_key -file_type data_model_create] {
foreach file [apm_version_file_list -type data_model_create $version_id] {
if { [string match *-drop.sql [file tail $file]] } {
continue
}
......@@ -50,7 +50,7 @@ foreach version_id $install {
ns_write "</pre></blockquote>\n"
}
foreach file [apm_get_package_files -package_key $package_key -file_type java_code] {
foreach file [apm_version_file_list -type java_code $version_id] {
if { !$ul_p } {
ns_write "<ul>\n"
set ul_p 1
......
......@@ -95,20 +95,14 @@ is already registerd to another package."
version_id {You must provide an integer key for your package version.}
}
# XXXJCD: this should be in the UI, along with license etc.
set attributes(maturity) 0
db_transaction {
# Register the package.
apm_package_register $package_key $pretty_name $pretty_plural $package_uri \
$package_type $initial_install_p $singleton_p
# Insert the version
set version_id [apm_package_install_version \
-callback apm_dummy_callback \
-version_id $version_id \
-array attributes \
$package_key $version_name $version_uri $summary $description \
$description_format $vendor $vendor_uri $auto_mount]
set version_id [apm_package_install_version -callback apm_dummy_callback -version_id \
$version_id $package_key $version_name $version_uri $summary $description \
$description_format $vendor $vendor_uri $auto_mount]
apm_version_enable -callback apm_dummy_callback $version_id
apm_package_install_owners -callback apm_dummy_callback \
[apm_package_install_owners_prepare $owner_name $owner_uri] $version_id
......
......@@ -6,7 +6,7 @@ ad_page_contract {
} {
}
set user_id [ad_conn user_id]
set user_id [ad_verify_and_get_user_id]
db_1row apm_get_name {
select first_names || ' ' || last_name user_name, email from cc_users where user_id = :user_id
......
......@@ -25,9 +25,13 @@ apm_version_info $version_id
doc_body_append [apm_header "Delete"]
if { [catch {apm_package_delete -sql_drop_scripts $sql_drop_scripts -remove_files=0 -callback apm_doc_body_callback $package_key} errmsg] } {
doc_body_append "We encountered the following error when deleting package \"$package_key\":
<pre><blockquote>[ad_quotehtml $errmsg]</blockquote></pre>"
db_transaction {
apm_package_delete -sql_drop_scripts $sql_drop_scripts -remove_files=0 -callback apm_doc_body_callback $package_key
} on_error {
if {[apm_package_registered_p $package_key] } {
doc_body_append "The database returned the following error
message <pre><blockquote>[ad_quotehtml $errmsg]</blockquote></pre>"
}
}
doc_body_append "
......
......@@ -57,7 +57,7 @@ if { [lindex $dependency_results 0] == 1 && [llength [lindex $dependency_results
set extra_package_keys [lindex $dependency_results 2]
# Check was good after adding a couple more packages
# Check was good after adding a couple more pacakges
doc_body_append "[apm_header "Package Installation"]
<h2>Additional Packages Automatically Added</h2><p>
......
......@@ -68,7 +68,7 @@ foreach pkg_info $pkg_install_list {
}
if { [empty_string_p $version(auto-mount)] && [string equal $version(package.type) apm_application] } {
set mount_html "<input type=\"checkbox\" name=\"mount_p\" value=\"$version(package.key)\" checked /> Mount package under the main site at path <input type=\"text\" name=\"mount_path.$version(package.key)\" value=\"$version(package.key)\" />"
set mount_html "<input type=\"checkbox\" name=\"mount_p\" value=\"$version(package.key)\" /> Mount package under the main site at path <input type=\"text\" name=\"mount_path.$version(package.key)\" value=\"$version(package.key)\" />"
} else {
set mount_html ""
}
......
......@@ -7,6 +7,7 @@ ad_page_contract {
} {
{checked_by_default_p:boolean 0}
{update_only_p 0}
}
ad_return_top_of_page "[apm_header "Package Installation"]
......@@ -126,9 +127,9 @@ function checkAll() {
}
if { $checked_by_default_p } {
set widget [apm_package_selection_widget $pkg_info_list $pkg_key_list $pkg_key_list]
set widget [apm_package_selection_widget -update_only_p $update_only_p $pkg_info_list $pkg_key_list $pkg_key_list]
} else {
set widget [apm_package_selection_widget $pkg_info_list]
set widget [apm_package_selection_widget -update_only_p $update_only_p $pkg_info_list]
}
if {[empty_string_p $widget]} {
......
......@@ -10,6 +10,8 @@ ad_page_contract {
version_id:naturalnum,notnull
}
apm_parameter_unregister $parameter_id
db_1row apm_package_by_version_id {
select pretty_name, version_name, package_key
from apm_package_version_info
......@@ -25,31 +27,4 @@ foreach section $sections {
}
}
set return_url [export_vars -base "version-parameters" { version_id section_name }]
ad_form -name del -form {
parameter_id:key
{confirm_p:text(hidden)}
{version_id:text(hidden)}
{section_name:text(hidden)}
{pretty_name:text(inform) {label "Package"}}
{parameter_name:text(inform) {label "Parameter"}}
} -edit_request {
set confirm_p 1
set parameter_name [db_string get_parameter_name {
select parameter_name
from apm_parameters
where parameter_id = :parameter_id
}]
} -edit_data {
#here's where we actually do the delete.
apm_parameter_unregister $parameter_id
} -after_submit {
ad_returnredirect $return_url
ad_script_abort
} -cancel_url $return_url
set page_title "Confirm Deletion"
set context [list [list "." "Package Manager"] [list [export_vars -base version-view { version_id }] "$pretty_name $version_name"] [list [export_vars -base version-parameters { version_id section_name }] "Parameters"] $page_title]
ad_return_template
ad_returnredirect [export_vars -base "version-parameters" { version_id section_name }]
......@@ -9,7 +9,7 @@ ad_page_contract {
}
set user_id [ad_conn user_id]
set user_id [ad_verify_and_get_user_id]
db_1row param_info {
select parameter_name, datatype, description, default_value, min_n_values, max_n_values, parameter_id,
......
......@@ -5,24 +5,15 @@ designated compatible with your OpenACS kernel will be shown.</p>
<table border="1" cellpadding="4" cellspacing="0">
<tr>
<th>Package</th>
<th>Status</th>
<th>Description</th>
<th>Release</th>
</tr>
<multiple name="packages">
<tr>
<td style="border-color:gray; text-align:center" valign="center" >
<b>@packages.pretty_name@</b>
</td>
<td>
@packages.maturity@: @packages.maturity_text@<br>
<a href="@packages.license_url@">@packages.license@</a>
</td>
<td style="border-color:gray">
<b>@packages.summary@</b>
<br>@packages.description;noquote@
<br><small>@packages.package_key@ @packages.version@ released @packages.release_date@ by @packages.vendor@</small>
</td>
<td style="border-color:gray; text-align:center" valign="center" ><b>@packages.pretty_name@</b></td>
<td style="border-color:gray"><b>@packages.summary@</b><br>@packages.description;noquote@</td>
<td style="border-color:gray">@packages.package_key@ @packages.version@
<br> released @packages.release_date@ by @packages.vendor@</small></td>
</tr>
</multiple>
</table>
......@@ -9,13 +9,13 @@ ad_page_contract {
db_1row package_version_info "select pretty_name, version_name from apm_package_version_info where version_id = :version_id"
set page_title "\#acs-admin.Tcl_Callbacks\#"
set context [list [list "." "\#acs-admin.Package_Manager\#"] [list [export_vars -base version-view { version_id }] "$pretty_name $version_name"] $page_title]
set page_title "Tcl Callbacks"
set context [list [list "." "Package Manager"] [list [export_vars -base version-view { version_id }] "$pretty_name $version_name"] $page_title]
set unused_callback_types [apm_unused_callback_types -version_id $version_id]
if { [llength $unused_callback_types] > 0 } {
set actions [list "\#acs-admin.Add_callback\#" [export_vars -base "version-callback-add-edit" { version_id }]]
set actions [list "Add callback" [export_vars -base "version-callback-add-edit" { version_id }]]
} else {
set actions [list]
}
......@@ -33,19 +33,19 @@ template::list::create \
<img src="/resources/acs-subsite/Edit16.gif" width="16" height="16" border="0">
}
link_url_eval {[export_vars -base "version-callback-add-edit" { version_id type }]}
link_html { title "\#acs-admin.Edit_callback\#" }
link_html { title "Edit callback" }
}
type {
label "\#acs-admin.Type\#"
label "Type"
}
proc {
label "\#acs-admin.Tcl_Proc\#"
label "Tcl Proc"
}
invoke {
label "\#acs-admin.Invoke\#"
display_template {<if @callbacks.type@ in "before-install" "after-install" "before-uninstall" "after-uninstall">\#acs-admin.Invoke\#</if><else><i style="color: gray;">N/A</i></else>}
label "Invoke"
display_template {<if @callbacks.type@ in "before-install" "after-install" "before-uninstall" "after-uninstall">Invoke</if><else><i style="color: gray;">N/A</i></else>}
link_url_eval {[ad_decode [lsearch { before-install after-install before-uninstall after-uninstall } $type] -1 {} [export_vars -base "version-callback-invoke" { version_id type }]]}
link_html { title "\#acs-admin.Invoke_this_callback_proc_now_Be_careful\#" }
link_html { title "Invoke this callback proc now. Be careful!" }
html { align center }
}
delete {
......@@ -55,7 +55,7 @@ template::list::create \
<img src="/resources/acs-subsite/Delete16.gif" width="16" height="16" border="0">
}
link_url_eval {[export_vars -base "version-callback-delete" { version_id type }]}
link_html { title "\#acs-admin.Delete_callback\#" }
link_html { title "Delete callback" }
}
}
......
......@@ -20,25 +20,6 @@ ad_page_contract {
{ upgrade_p 0 }
}
# Validate dynamic package version attributes
# Also put all dynamic attributes in an array
array set all_attributes [apm::package_version::attributes::get_spec]
foreach attribute_name [array names all_attributes] {
array set attribute $all_attributes($attribute_name)
set attribute_value [ns_set iget [rp_getform] $attribute_name]
if { [info exists attribute(validation_proc)] } {
set attribute_error [eval $attribute(validation_proc) $attribute_value]
if { ![empty_string_p $attribute_error] } {
ad_return_complaint 1 $attribute_error
}
}
set dynamic_attributes($attribute_name) $attribute_value
}
if {![regexp {^[0-9]+((\.[0-9]+)+((d|a|b|)[0-9]*)?)$} $version_name match]} {
ad_return_complaint 1 "The version name has invalid characters"
ad_script_abort
......@@ -67,7 +48,7 @@ if { $upgrade_p && [db_string apm_version_uri_unique_ck {
}
db_transaction {
set version_id [apm_version_update -array dynamic_attributes $version_id $version_name $version_uri \
set version_id [apm_version_update $version_id $version_name $version_uri \
$summary $description $description_format $vendor $vendor_uri $auto_mount $release_date]
apm_package_install_owners [apm_package_install_owners_prepare $owner_name $owner_uri] $version_id
apm_package_install_spec $version_id
......
......@@ -115,31 +115,6 @@ This description is <select name=description_format>
</tr>
"
# Dynamic package version attributes
array set all_attributes [apm::package_version::attributes::get_spec]
array set attributes [apm::package_version::attributes::get \
-version_id $version_id \
-array attributes]
foreach attribute_name [array names all_attributes] {
array set attribute $all_attributes($attribute_name)
if { [info exists attributes($attribute_name)] } {
# Attribute is already in db
set attribute_value $attributes($attribute_name)
} else {
# The attribute is not in the db yet
set attribute_value [apm::package_version::attributes::default_value $attribute_name]
}
doc_body_append "
<tr>
<th align=right nowrap>${attribute(pretty_name)}:</th>
<td><input name=\"$attribute_name\" size=\"30\" value=\"$attribute_value\">
</td>
</tr>
"
}
# Build a list of owners. Ensure that there are at least two.
set owners [db_list_of_lists apm_all_owners {
select owner_name, owner_uri from apm_package_owners where version_id = :version_id
......
......@@ -12,11 +12,13 @@ ad_page_contract {
{context_p 1}
}
db_1row apm_package_by_version_id {}
db_1row apm_package_by_version_id {
select package_name, version_name, package_id from apm_package_version_info where version_id = :version_id
}
set analyze_dir [ns_mktemp "[acs_root_dir]/apm-workspace/diffs-XXXXXX"]
doc_body_append "[apm_header "Create Diffs for $pretty_name $version_name"]
doc_body_append "[apm_header "Create Diffs for $package_name $version_name"]
<ul><li>Extracting the archive into $analyze_dir...<li>
"
......@@ -31,7 +33,7 @@ set no_changes [list]
global errorCode
foreach file [apm_get_package_files -package_key $package_key] {
foreach file [apm_version_file_list $version_id] {
if { ![file isfile "[acs_root_dir]/$file"] } {
doc_body_append "<h3>$file</h3>\n<blockquote>This file has been locally added.</blockquote>\n"
continue
......
......@@ -4,7 +4,7 @@
<fullquery name="apm_package_by_version_id">
<querytext>
select package_key, pretty_name, version_name from apm_package_version_info where version_id = :version_id
select package_name, version_name, package_id from apm_package_version_info where version_id = :version_id
</querytext>
</fullquery>
......
......@@ -102,6 +102,7 @@ if { [string equal $file_type adp] } {
-label $action_label \
-options {{{Find human language text and replace with <# ... #> tags} replace_text} {{Replace <# ... #> tags with #...# keys and insert message into catalog} replace_tags}} \
-values {replace_text} \
-section action_section
} else {
# TCL files or SQL files
element create file_list_form tcl_action_inform \
......
......@@ -152,20 +152,7 @@ append body "
<tr valign=baseline><th align=left>Package Key:</th><td>$package_key</td></th></tr>
<tr valign=baseline><th align=left>Summary:</th><td>$summary</td></tr>
<tr valign=baseline><th align=left>Description:</th><td>$description</td></tr>
<tr valign=baseline><th align=left>Release Date:</th><td>$release_date</td></tr>"
# Dynamic package version attributes
array set all_attributes [apm::package_version::attributes::get_spec]
array set attributes [apm::package_version::attributes::get \
-version_id $version_id \
-array attributes]
foreach attribute_name [array names attributes] {
array set attribute $all_attributes($attribute_name)
append body "<tr valign=baseline><th align=left>$attribute(pretty_name)</th><td>$attributes($attribute_name)</td></tr>"
}
append body "
<tr valign=baseline><th align=left>Release Date:</th><td>$release_date</td></tr>
<tr valign=baseline><th align=left>Vendor:</th><td>[ad_decode $vendor_uri "" $vendor "<a href=\"$vendor_uri\">$vendor</a>"]</td></tr>
<tr valign=baseline><th align=left>Package URL:</th><td><a href=\"$package_uri\">$package_uri</a></td></th></tr>
<tr valign=baseline><th align=left>Version URL:</th><td><a href=\"$version_uri\">$version_uri</a></td></th></tr>
......
......@@ -27,90 +27,84 @@ set form_widgets_full {
authority_id:key(acs_object_id_seq)
{-section "gen" {legendtext \#acs-admin.General\#}}
{pretty_name:text
{html {size 50}}
{label "\#acs-admin.Name\#"}
{label "Name"}
{section "General"}
}
{short_name:text,optional
{html {size 50}}
{label "\#acs-admin.Short_Name\#"}
{label "Short Name"}
{mode {[ad_decode $local_authority_p 1 "display" ""]}}
{help_text "[_ acs-admin.Authority_short_name_help_text]"}
{help_text "This is used when referring to the authority in parameters etc. Even if you need to change the display name above, this should stay unchanged."}
}
{enabled_p:text(radio)
{label "\#acs-admin.Enabled\#"}
{options {{[_ acs-admin.Yes] t} {[_ acs-admin.No] f}}}
{label "Enabled"}
{options {{Yes t} {No f}}}
}
{help_contact_text:richtext,optional
{html {cols 60 rows 13}}
{label "\#acs-admin.Help_contact_text\#"}
{help_text "[_ acs-admin.Help_contact_help_text]"}
{label "Help contact text"}
{help_text "Contact information (phone, email, etc.) to be displayed as a last resort when people are having problems with an authority."}
}
{-section "auth" {legendtext \#acs-admin.Authentication\#}}
{auth_impl_id:integer(select),optional
{label "\#acs-admin.Authentication\#"}
{label "Authentication"}
{section "Authentication"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_authentication]}}
}
{-section "pwmngt" {legendtext \#acs-admin.Password_Management\#}}
{pwd_impl_id:integer(select),optional
{label "\#acs-admin.Password_Management\#"}
{label "Password management"}
{section "Password Management"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_password]}}
}
{forgotten_pwd_url:text,optional
{html {size 50}}
{label "\#acs-admin.Recover_password_URL\#"}
{help_text "[_ acs-admin.Recover_password_URL_help_text]"}
{label "Recover password URL"}
{help_text "Instead of a password management driver, you may provide a URL to which users are sent when they need help recovering their password. Any username in this url must be on the syntax foo={username} and {username} will be replaced with the real username."}
}
{change_pwd_url:text,optional
{html {size 50}}
{label "\#acs-admin.Change_password_URL\#"}
{help_text "[_ acs-admin.Change_password_URL_help_text]"}
{label "Change password URL"}
{help_text "Instead of a password management driver, you may provide a URL to which users are sent when they want to change their password. Any username in this url must be on the syntax foo={username} and {username} will be replaced with the real username."}
}
{-section "accreg" {legendtext \#acs-admin.Account_Registration\#}}
{register_impl_id:integer(select),optional
{label "\#acs-admin.Account_Registration\#"}
{label "Account registration"}
{section "Account Registration"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_registration]}}
}
{register_url:text,optional
{html {size 50}}
{label "\#acs-admin.Account_registration_URL\#"}
{help_text "[_ acs-admin.Account_reg_URL_help_text]"}
{label "Account registration URL"}
{help_text "URL where users register for a new account."}
}
{-section "ondemsyn" {legendtext \#acs-admin.On-Demand_Sync\#}}
{user_info_impl_id:integer(select),optional
{label "\#acs-admin.User_Info\#"}
{label "User Info"}
{section "On-Demand Sync"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_user_info]}}
{help_text "[_ acs-admin.User_Info_help_text]"}
{help_text "The implementation for getting user information from the authority in real-time"}
}
{-section "batchsyn" {legendtext \#acs-admin.Batch_Synchronization\#}}
{batch_sync_enabled_p:text(radio)
{label "\#acs-admin.Batch_sync_enabled\#"}
{options {{[_ acs-admin.Yes] t} {[_ acs-admin.No] f}}}
{label "Batch sync enabled"}
{options {{Yes t} {No f}}}
{section {Batch Synchronization}}
}
{get_doc_impl_id:integer(select),optional
{label "\#acs-admin.GetDocument_implementation\#"}
{label "GetDocument implementation"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_sync_retrieve]}}
}
{process_doc_impl_id:integer(select),optional
{label "\#acs-admin.ProcessDocument_implementation\#"}
{label "ProcessDocument implementation"}
{options {[acs_sc::impl::get_options -empty_label "--Disabled--" -contract_name auth_sync_process]}}
}
}
......@@ -224,33 +218,33 @@ list::create \
-key job_id \
-elements {
start_time_pretty {
label "\#acs-admin.Start_time\#"
label "Start time"
link_url_eval {$job_url}
}
end_time_pretty {
label "\#acs-admin.End_time\#"
label "End time"
}
run_time {
label "\#acs-admin.Run_time\#"
label "Run time"
html { align right }
}
num_actions {
label "\#acs-admin.Actions\#"
label "Actions"
html { align right }
}
num_problems {
label "\#acs-admin.Problems\#"
label "Problems"
html { align right }
}
actions_per_minute {
label "\#acs-admin.Actions_Minute\#"
label "Actions/Minute"
html { align right }
}
short_message {
label "\#acs-admin.Message\#"
label "Message"
}
interactive_pretty {
label "\#acs-admin.Interactive\#"
label "Interactive"
html { align center }
}
}
......
......@@ -11,9 +11,9 @@ ad_page_contract {
auth::sync::job::get -job_id $job_id -array batch_job
set page_title "\#acs-admin.One_batch_job\#"
set page_title "One batch job"
set context [list \
[list "." "[_ acs-admin.Authentication]"] \
[list "." "Authentication"] \
[list [export_vars -base authority { {authority_id $batch_job(authority_id)} }] "$batch_job(authority_pretty_name)"] $page_title]
ad_form \
......@@ -22,50 +22,50 @@ ad_form \
-display_buttons {} \
-form {
{authority_pretty_name:text(inform)
{label "\#acs-admin.Authority_name\#"}
{label "Authority name"}
}
{job_start_time:text(inform)
{label "\#acs-admin.Start_time\#"}
{label "Start time"}
}
{job_end_time:text(inform)
{label "\#acs-admin.End_time\#"}
{label "End time"}
}
{run_time_seconds:text(inform)
{label "\#acs-admin.Running_time\#"}
{after_html " [_ acs-admin.seconds]"}
{label "Running time"}
{after_html " seconds"}
}
{interactive_p:text(inform)
{label "\#acs-admin.Interactive\#"}
{label "Interactive"}
}
{snapshot_p:text(inform)
{label "\#acs-admin.Snapshot\#"}
{label "Snapshot"}
}
{message:text(inform)
{label "\#acs-admin.Message"}
{label "Message"}
}
{creation_user:text(inform)
{label "\#acs-admin.Creation_user\#"}
{label "Creation user"}
}
{doc_start_time:text(inform)
{label "\#acs-admin.Document_start_time\#"}
{label "Document start time"}
}
{doc_end_time:text(inform)
{label "\#acs-admin.Document_end_time\#"}
{label "Document end time"}
}
{doc_status:text(inform)
{label "\#acs-admin.Document_status\#"}
{label "Document status"}
}
{doc_message:text(inform)
{label "\#acs-admin.Document_message\#"}
{label "Document message"}
}
{document_download:text(inform)
{label "\#acs-admin.Document\#"}
{label "Document"}
}
{num_actions:text(inform)
{label "\#acs-admin.Number_of_actions\#"}
{label "Number of actions"}
}
{num_problems:text(inform)
{label "\#acs-admin.Number_of_problems\#"}
{label "Number of problems"}
}
} -on_request {
foreach element_name [array names batch_job] {
......@@ -82,7 +82,7 @@ ad_form \
set job_start_time [lc_time_fmt $batch_job(job_start_time) "%x %X"]
set job_end_time [lc_time_fmt $batch_job(job_end_time) "%x %X"]
set document_download "<a href=\"[export_vars -base batch-document-download { job_id }]\">[_ acs-admin.download]</a>"
set document_download "<a href=\"[export_vars -base batch-document-download { job_id }]\">download</a>"
}
list::create \
......@@ -93,37 +93,37 @@ list::create \
-page_query_name pagination \
-elements {
entry_time_pretty {
label "\#acs-admin.Timestamp\#"
label "Timestamp"
link_url_eval {$entry_url}
link_html { title "\#acs-admin.View_log_entry\#" }
link_html { title "View log entry" }
}
operation {
label "\#acs-admin.Operation\#"
label "Operation"
}
username {
label "\#acs-admin.Username\#"
label "Username"
link_url_col user_url
}
success_p {
label "\#acs-admin.Success\#"
label "Success"
display_template {
<if @batch_actions.success_p@ eq "t">
<font color="green">\#acs-admin.Yes\#</font>
<font color="green">Yes</font>
</if>
<else>
<font color="red">\#acs-admin.No\#</font>
<font color="red">No</font>
</else>
}
}
short_message {
label "\#acs-admin.Message\#"
label "Message"
}
} -filters {
job_id {
hide_p 1
}
success_p {
label "\#acs-admin.Success\#"
label "Success"
values {
{ Success t }
{ Failure f }
......
......@@ -24,37 +24,37 @@ list::create \
sub_class narrow
}
pretty_name {
label "\#acs-admin.Name\#"
label "Name"
link_url_eval {[export_vars -base authority { authority_id }]}
}
enabled {
label "\#acs-admin.Enabled\#"
label "Enabled"
html { align center }
display_template {
<if @authorities.enabled_p@ true>
<a href="@authorities.enabled_p_url@" title="\#acs-admin.Disable_this_authority\#"><img src="/shared/images/checkboxchecked" height="13" width="13" border="0" style="background-color: white;"></a>
<a href="@authorities.enabled_p_url@" title="Disable this authority"><img src="/shared/images/checkboxchecked" height="13" width="13" border="0" style="background-color: white;"></a>
</if>
<else>
<a href="@authorities.enabled_p_url@" title="\#acs-admin.Enable_this_authority\#"><img src="/shared/images/checkbox" height="13" width="13" border="0" style="background-color: white;"></a>
<a href="@authorities.enabled_p_url@" title="Enable this authority"><img src="/shared/images/checkbox" height="13" width="13" border="0" style="background-color: white;"></a>
</else>
}
}
move {
label "\#acs-admin.Order\#"
label "Order*"
html { align center }
display_template {
<if @authorities.sort_order@ ne @authorities.highest_sort_order@>
<a href="@authorities.sort_order_url_up@" title="\#acs-admin.Move_this_authority_up\#"><img src="/resources/acs-subsite/arrow-up.gif" border="0" width="15" height="15"></a>
<a href="@authorities.sort_order_url_up@" title="Move this authority up"><img src="/resources/acs-subsite/arrow-up.gif" border="0" width="15" height="15"></a>
</if>
<else><img src="/resources/acs-subsite/spacer.gif" width="15" height="15"></else>
<if @authorities.sort_order@ ne @authorities.lowest_sort_order@>
<a href="@authorities.sort_order_url_down@" title="\#acs-admin.Move_this_authority_down\#"><img src="/resources/acs-subsite/arrow-down.gif" border="0" width="15" height="15"></a>
<a href="@authorities.sort_order_url_down@" title="Move this authority down"><img src="/resources/acs-subsite/arrow-down.gif" border="0" width="15" height="15"></a>
</if>
<else><img src="/resources/acs-subsite/spacer.gif" width="15" height="15"></else>
}
}
registration {
label "\#acs-admin.Registration\#"
label "Registration"
html { align center }
display_template {
<switch @authorities.registration_status@>
......@@ -63,8 +63,8 @@ list::create \
</case>
<case value="can_select">
<a href="@authorities.registration_url@"
title="\#acs-admin.Make_this_the_authority_for_registering_new_users\#"
onclick="return confirm('\#acs-admin.You_are_changing_all_user_registrations_to_be_in_authority_authorities_pretty_name\#');">
title="Make this the authority for registering new users"
onclick="return confirm('You are changing all user registrations to be in authority @authorities.pretty_name@');">
<img src="/resources/acs-subsite/radio.gif" height="13" width="13" border="0" style="background-color: white;">
</a>
</case>
......@@ -75,13 +75,13 @@ list::create \
}
}
auth_impl {
label "\#acs-admin.Authentication\#"
label "Authentication"
}
pwd_impl {
label "\#acs-admin.Password\#"
label "Password"
}
reg_impl {
label "\#acs-admin.Registration\#"
label "Registration"
}
delete {
label ""
......@@ -89,8 +89,8 @@ list::create \
<if @authorities.short_name@ ne local>
<a href="@authorities.delete_url@"
title="Delete this authority"
onclick="return confirm('\#acs-admin.Are_you_sure_you_want_to_delete_authority_authorities_pretty_name\#');">
<img src="/shared/images/Delete16.gif" height="16" width="16" alt="\#acs-admin.Delete\#" border="0">
onclick="return confirm('Are you sure you want to delete authority @authorities.pretty_name@?');">
<img src="/shared/images/Delete16.gif" height="16" width="16" alt="Delete" border="0">
</a>
</if>
}
......
......@@ -35,7 +35,7 @@
</else>
<tr bgcolor="@bg@">
<td valign=top>@matches.key@</td>
<td valign=top>@matches.value;noquote@</td>
<td valign=top>@matches.value@</td>
<td valign=middle rowspan=2>
<form action=one method=post>
<input type=hidden name=key value="@matches.full_key@">
......
......@@ -32,7 +32,7 @@ foreach name $cached_names {
template::multirow append matches [string range $key 0 200] \
[string range $value 0 200] $value_size $safe_key \
$date $raw_date
}
}
}
}
......@@ -8,7 +8,7 @@
<th>Local Files</th>
</tr>
<tr>
<td>Download and install/upgrade automatically from <a href="http://openacs.org/repository/">OpenACS.org repository</a>
<td>Download and install/upgrade automatically from <a href="http://openacs.org/repository">OpenACS.org repository</a>
</td>
<td>
Install/upgrade from local files. Use this if your site has custom code or is in a local CVS repository. <a href="/doc/upgrade.html">Help</a>
......
......@@ -7,10 +7,8 @@ ad_page_contract {
if { ![empty_string_p $repository_url] } {
set parent_page_title "Install From OpenACS Repository"
set parent_page_url [export_vars -base install {repository_url}]
} else {
set parent_page_title "Install From Local File System"
set parent_page_url [export_vars -base install]
}
if { $success_p } {
......@@ -19,5 +17,5 @@ if { $success_p } {
set page_title "Installation Failed"
}
set context [list [list "." "Install Software"] [list $parent_page_url $parent_page_title] $page_title]
set context [list [list "." "Install Software"] [list "install" $parent_page_title] $page_title]
......@@ -8,9 +8,9 @@ ad_page_contract {
if { ![empty_string_p $repository_url] } {
set page_title "Install or Upgrade From OpenACS Repository"
set page_title "Install From OpenACS Repository"
} else {
set page_title "Install or Upgrade From Local File System"
set page_title "Install From Local File System"
}
set context [list [list "." "Install Software"] $page_title]
......@@ -37,9 +37,6 @@ foreach package_key [array names repository] {
# If in upgrade mode, only add to list if it's an upgrade
if { !$upgrade_p || [string equal $version(install_type) upgrade] } {
if {![exists_and_not_null version(maturity)]} {
set version(maturity) ""
}
set package([string toupper $version(package-name)]) \
[list \
$version(package.key) \
......@@ -47,8 +44,7 @@ foreach package_key [array names repository] {
$version(name) \
$version(package.type) \
$version(install_type) \
$version(summary) \
$version(maturity)]
$version(summary)]
}
}
}
......@@ -61,28 +57,16 @@ foreach package_key [array names repository] {
#####
# Sort the list alphabetically (in case package_name and package_key doesn't sort the same)
multirow create packages package_key package_name version_name package_type install_type summary maturity
if {[catch {set maturity_label [apm::package_version::attributes::get_pretty_name maturity]} errmsg]} {
set maturity_label "Maturity"
}
multirow create packages package_key package_name version_name package_type install_type summary
foreach name [lsort -ascii [array names package]] {
set row $package($name)
if {[info procs apm::package_version::attributes::maturity_int_to_text] != 0} {
set maturity_text "[apm::package_version::attributes::maturity_int_to_text [lindex $row 6]]"
} else {
set maturity_text ""
}
multirow append packages \
[lindex $row 0] \
[lindex $row 1] \
[lindex $row 2] \
[lindex $row 3] \
[lindex $row 4] \
[lindex $row 5] \
$maturity_text
[lindex $row 5]
}
multirow extend packages install_url
......@@ -97,7 +81,7 @@ template::list::create \
-multirow packages \
-key package_key \
-bulk_actions {
"Install or upgrade checked applications" "install-2" "Install or upgrade checked applications"
"Install checked applications" "install-2" "Install checked applications"
} \
-bulk_action_export_vars {
repository_url
......@@ -106,14 +90,11 @@ template::list::create \
package_name {
label "Package"
link_url_col install_url
link_html { title "Install or upgrade this package" }
link_html { title "Install this package" }
}
summary {
label "Summary"
}
maturity {
label "$maturity_label"
}
version_name {
label "Version"
}
......
......@@ -17,7 +17,6 @@
<li><a href="complex-search?target=one&only_authorized_p=0&only_needs_approval_p=1">Find all users needing approval</a></li>
<li><a href="user-add">Add a user</a></li>
<li><a href="/members/user-batch-add">Add a batch of users</a></li>
<li><a href="/admin/manage-email-privacy">#acs-subsite.manage_users_email#</a></li>
<form method='get' action='complex-search'>
<input type='hidden' name='target' value="one">
......
......@@ -92,7 +92,7 @@ if {[catch {
<pre>$errmsg</pre>"
}
set admin_user_id [ad_conn user_id]
set admin_user_id [ad_verify_and_get_user_id]
set email_from [db_string admin_email "select email from parties where party_id = :admin_user_id"]
set subject "$action"
set message $email_message
......
......@@ -77,17 +77,6 @@ above.
<li><a href="modify-admin-privileges?user_id=@user_id@&action=grant">Grant site-wide administration privileges</a></li>
</else>
<li>Merge this user with:
<form method=get action=search>
<input type="hidden" name="target" value="merge" />
<input type="hidden" name="limit_to_user_id" value="@user_id@" />
<input type="hidden" name="from_user_id" value="@user_id@" />
<input type="hidden" name="only_authorized_p" value="0" />
<input type="text" size="15" name="keyword" />
<input type="submit" value="Find User" />
</form>
</li>
<if @password_reset_url@ not nil>
<li><a href="@password_reset_url@">Reset this user's password</a></li>
</if>
......
......@@ -13,8 +13,6 @@ ad_page_contract {
@param target URL to return to
@param passthrough Form variables to pass along from caller
@param limit_to_users_in_group_id Limits search to users in the specified group id. This can be a comma separated list to allow searches within multiple groups. (optional)
@param limit_to_user_id. This is useful is you don't want to show a list of user_ids. This could be a comma separated list. (optional)
@param from_user_id is used if you want to merge the user_id with user_id_from_search (optional)
@author Jin Choi (jsc@arsdigita.com)
} {
......@@ -25,8 +23,6 @@ ad_page_contract {
{passthrough ""}
{limit_users_in_group_id ""}
{only_authorized_p:integer 1}
{limit_to_user_id ""}
{from_user_id ""}
} -properties {
group_name:onevalue
search_type:onevalue
......@@ -106,11 +102,6 @@ if { ![info exists passthrough] } {
set passthrough_parameters "[export_entire_form_as_url_vars $passthrough]"
}
if { [exists_and_not_null limit_to_user_id ] } {
set limit_to_user_id [join $limit_to_user_id ","]
lappend where_clause "cc_users.user_id not in ($limit_to_user_id)"
}
if { [exists_and_not_null limit_to_users_in_group_id] } {
set query "select distinct first_names, last_name, email, member_state, email_verified_p, cu.user_id
from cc_users cu, group_member_map gm, membership_rels mr
......@@ -141,12 +132,7 @@ db_foreach user_search_admin $query {
set last_name_from_search $last_name
set email_from_search $email
if { [empty_string_p $from_user_id] } {
set user_search:[set rowcount](user_id) $user_id
} else {
set user_search:[set rowcount](user_id) $from_user_id
}
set user_search:[set rowcount](user_id) $user_id
set user_search:[set rowcount](first_names) $first_names
set user_search:[set rowcount](last_name) $last_name
set user_search:[set rowcount](email) $email
......
......@@ -17,7 +17,7 @@ ad_page_contract {
administration_name:onevalue
}
set admin_user_id [ad_conn user_id]
set admin_user_id [ad_verify_and_get_user_id]
# Get user info
acs_user::get -user_id $user_id -array user
......
......@@ -16,7 +16,7 @@ ad_page_contract {
export_vars:onevalue
}
set admin_user_id [ad_conn user_id]
set admin_user_id [ad_verify_and_get_user_id]
set context [list [list "./" "Users"] "New user notified"]
set export_vars [export_url_vars user_id]
......
......@@ -79,14 +79,15 @@ from parties where email = lower(:email)"]
foreach key $key_list value $value_list {
regsub -all "<$key>" $sub_message $value sub_message
}
if {[catch {ns_sendmail "$email" "$from" "$subject" "$sub_message"} errmsg]} {
ad_return_error "Mail Failed" "The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:
<blockquote><pre>
[ad_quotehtml $errmsg]
</pre></blockquote>"
return
}
# if {[catch {ns_sendmail "$email" "$from" "$subject" "$sub_message"} errmsg]} {
# ad_return_error "Mail Failed" "The system was unable to send email. Please notify the user personally. This problem is probably caused by a misconfiguration of your email system. Here is the error:
#<blockquote><pre>
#[ad_quotehtml $errmsg]
#</pre></blockquote>"
# return
# }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment