Commit 8d9c3a99 authored by Frank Bergmann's avatar Frank Bergmann

- OpenACS 5.9

parent 23c5ee4d
......@@ -2,17 +2,17 @@
<!-- Generated by the OpenACS Package Manager -->
<package key="acs-admin" url="http://openacs.org/repository/apm/packages/acs-admin/" type="apm_service">
<package-name>Site-Wide Administration</package-name>
<pretty-plural>Site-Wide Administration Services</pretty-plural>
<package-name>ACS Site-Wide Administration</package-name>
<pretty-plural>ACS Site-Wide Administration Services</pretty-plural>
<initial-install-p>t</initial-install-p>
<singleton-p>t</singleton-p>
<implements-subsite-p>f</implements-subsite-p>
<inherit-templates-p>t</inherit-templates-p>
<version name="5.10.0d1" url="http://openacs.org/repository/download/apm/acs-admin-5.10.0d1.apm">
<version name="5.9.0" url="http://openacs.org/repository/download/apm/acs-admin-5.9.0.apm">
<owner url="mailto:dhogaza@pacifier.com">Don Baccus</owner>
<summary>An interface for Site-wide administration of an OpenACS Installation.</summary>
<release-date>2013-09-08</release-date>
<release-date>2015-10-04</release-date>
<vendor url="http://openacs.org">OpenACS</vendor>
<description format="text/html">Provides a UI for administering site-wide services
(including package installation, cache, authentication, and user accounts) for an OpenACS system.
......@@ -20,9 +20,9 @@
<license>GPL</license>
<maturity>3</maturity>
<provides url="acs-admin" version="5.10.0d1"/>
<requires url="acs-kernel" version="5.10.0d1"/>
<requires url="acs-mail-lite" version="5.10.0d1"/>
<provides url="acs-admin" version="5.9.0"/>
<requires url="acs-kernel" version="5.9.0"/>
<requires url="acs-mail-lite" version="5.9.0"/>
<callbacks>
</callbacks>
......
......@@ -30,3 +30,9 @@ set expire_state "s"
ad_user_login $user_id
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -10,3 +10,9 @@ set acs_core_docs_url [site_node::get_package_url -package_key "acs-core-docs"]
set acs_developer_support_url [site_node::get_package_url -package_key "acs-developer-support"]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -100,3 +100,9 @@ ad_form -extend -name update -form {
ad_returnredirect $return_url
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -7,13 +7,14 @@
<querytext>
select package_id,
ap.package_key,
acs_object.name(package_id) as instance_name,
--acs_object.name(package_id) as instance_name,
pretty_name as instance_name,
apm_package_type.num_parameters(ap.package_key) as parameter_count
from apm_packages ap,
apm_package_types
where ap.package_key = apm_package_types.package_key
and package_type = 'apm_service'
and (ap.package_key != 'acs-subsite' or (select parent_id from site_nodes where object_id = package_id) is null)
and (ap.package_key != 'acs-subsite')
order by instance_name
</querytext>
</fullquery>
......
......@@ -7,13 +7,14 @@
<querytext>
select package_id,
ap.package_key,
acs_object__name(package_id) as instance_name,
-- acs_object__name(package_id) as instance_name,
pretty_name as instance_name,
apm_package_type__num_parameters(ap.package_key) as parameter_count
from apm_packages ap,
apm_package_types
where ap.package_key = apm_package_types.package_key
and package_type = 'apm_service'
and (ap.package_key != 'acs-subsite' or (select parent_id from site_nodes where object_id = package_id) is null)
and (ap.package_key != 'acs-subsite')
order by instance_name
</querytext>
</fullquery>
......
<listtemplate name="packages"></listtemplate>
<listtemplate name="packages" style="table-2third"></listtemplate>
......@@ -2,7 +2,6 @@
# Service parameters list
#
if { ![acs_user::site_wide_admin_p] } {
ad_return_forbidden \
"Permission Denied" \
......@@ -40,19 +39,22 @@ template::list::create \
-multirow packages \
-elements {
instance_name {
label {#acs-admin.Service#}
label {\#acs-admin.Service#}
html {align left}
}
www {
label "\#acs-admin.Pages\#"
link_url_col url
link_html { title "\#acs-admin.Visit_service_pages\#" }
display_template {<if @packages.url@ not nil>\#acs-admin.Pages\#</if>}
html {align left}
}
admin {
label "\#acs-admin.Administration\#"
link_url_col admin_url
link_html { title "\#acs-admin.Service_administration\#" }
display_template {<if @packages.admin_url@ not nil>\#acs-admin.Administration\#</if>}
html {align left}
}
sitewide_admin {
label "\#acs-admin.Site-Wide_Admin\#"
......@@ -60,12 +62,20 @@ template::list::create \
link_html { title "\#acs-admin.Service_administration\#" }
display_template {<if @packages.sitewide_admin_url@ not nil>\#acs-admin.Administration\#</if>}
hide_p {[ad_decode $swadmin_p 1 0 1]}
html {align left}
}
parameters {
label "\#acs-admin.Parameters\#"
link_url_col param_url
link_html { title "\#acs-admin.Service_parameters\#" }
display_template {<if @packages.param_url@ not nil>\#acs-admin.Parameters\#</if>}
html {align left}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
<ul>
<li><a href="@acs_admin_url@users">Users</a>
<li><a href="@acs_admin_url@install">Install software</a>
<if @acs_lang_admin_url@ not nil>
<li><a href="@acs_admin_url@users">Users</a>
<li><a href="subsites">Subsites</a> (@nr_subsites@)</li>
<li>OpenACS Packages
<ul>
<li><a href="@acs_admin_url@apm">Package Manager</a>
<li><a href="@acs_admin_url@install">Install Packages</a>
<li><a href="@acs_lang_admin_url@">Internationalization/Localization</a>
</ul>
<li><a href="developer">Developer Tools</a>
<if @acs_lang_admin_url@ not nil>
</if>
<li><a href="@acs_admin_url@auth">Authentication</a>
<li><a href="/admin/host-node-map/">#acs-subsite.Host_Node_Map#</a></li>
<li><a href="@acs_admin_url@monitor">Active connections</a><if @request_monitor_url@ defined>, <a href="@request_monitor_url@">XOTcl Request Monitor</a></if>
<li><a href="@acs_core_docs_url@">Documentation</a>
<li><a href="@acs_admin_url@monitor">Active connections</a>
</ul>
set acs_admin_url [apm_package_url_from_key "acs-admin"]
ad_include_contract {
Include for listing site wide services
} {
{nr_subsites:integer 0}
}
set acs_lang_admin_url "[apm_package_url_from_key "acs-lang"]admin/"
set acs_admin_url [apm_package_url_from_key "acs-admin"]
set acs_lang_admin_url [apm_package_url_from_key "acs-lang"]admin/
set acs_core_docs_url [apm_package_url_from_key "acs-core-docs"]
set acs_core_docs_url [apm_package_url_from_key "acs-core-docs"]
set request_moonitor_package_id [apm_package_id_from_key "xotcl-request-monitor"]
if {$request_moonitor_package_id > 0} {
set request_monitor_url [apm_package_url_from_id $request_moonitor_package_id]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -21,3 +21,9 @@ ad_proc -public -callback acs_admin::member_state_change {
@param member_state New state of the user
} -
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -60,3 +60,9 @@ if {[ns_server connections] == 0} {
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -95,13 +95,15 @@ ad_proc apm_shell_wrap { cmd } {
ad_proc -private apm_package_selection_widget {
pkg_info_list
{to_install ""}
{to_install ""}
{operation "all"}
} {
Provides a widget for selecting packages. Displays dependency information if available.
@param pkg_info_list list of package infos for all packages to be listed
@param to_install list of package_keys to install
@param operation filter for added operations (all, upgrade, install)
} {
if {$pkg_info_list eq ""} {
return ""
......@@ -162,8 +164,10 @@ ad_proc -private apm_package_selection_widget {
set higher_version_p 2
}
if {$higher_version_p == 2 } {
if {$operation eq "upgrade"} continue
set comment "New install."
} elseif {$higher_version_p == 1 } {
if {$operation eq "install"} continue
set comment "Upgrade."
} elseif {$higher_version_p == 0} {
set comment "Package version already installed."
......@@ -218,7 +222,7 @@ ad_proc -private apm_higher_version_installed_p {
ad_proc -private apm_build_repository {
{-debug:boolean 0}
{-channels *}
{-head_channel 5-9}
{-head_channel 5-10}
} {
Rebuild the repository on the local machine.
......@@ -246,11 +250,11 @@ ad_proc -private apm_build_repository {
set repository_dir $::acs::rootdir/www/repository/
set repository_url http://openacs.org/repository/
set channel_index_template /packages/acs-admin/www/apm/repository-channel-index
set index_template /packages/acs-admin/www/apm/repository-index
set exclude_package_list {}
set channel_index_template [template::themed_template /packages/acs-admin/www/apm/repository-channel-index]
set index_template [template::themed_template /packages/acs-admin/www/apm/repository-index]
#----------------------------------------------------------------------
# Prepare output
#----------------------------------------------------------------------
......@@ -392,18 +396,18 @@ ad_proc -private apm_build_repository {
append manifest \
" <package>" \n \
" <package-key>[ad_quotehtml $pkg_info(package.key)]</package-key>\n" \
" <version>[ad_quotehtml $pkg_info(name)]</version>\n" \
" <pretty-name>[ad_quotehtml $pkg_info(package-name)]</pretty-name>\n" \
" <package-type>[ad_quotehtml $pkg_info(package.type)]</package-type>\n" \
" <summary>[ad_quotehtml $pkg_info(summary)]</summary>\n" \
" <description format=\"[ad_quotehtml $pkg_info(description.format)]\">" \
[ad_quotehtml $pkg_info(description)] "</description>\n" \
" <release-date>[ad_quotehtml $pkg_info(release-date)]</release-date>\n" \
" <vendor url=\"[ad_quotehtml $pkg_info(vendor.url)]\">" \
[ad_quotehtml $pkg_info(vendor)] "</vendor>\n" \
" <license url=\"[ad_quotehtml $pkg_info(license.url)]\">" \
[ad_quotehtml $pkg_info(license)] "</license>\n" \
" <package-key>[ns_quotehtml $pkg_info(package.key)]</package-key>\n" \
" <version>[ns_quotehtml $pkg_info(name)]</version>\n" \
" <pretty-name>[ns_quotehtml $pkg_info(package-name)]</pretty-name>\n" \
" <package-type>[ns_quotehtml $pkg_info(package.type)]</package-type>\n" \
" <summary>[ns_quotehtml $pkg_info(summary)]</summary>\n" \
" <description format=\"[ns_quotehtml $pkg_info(description.format)]\">" \
[ns_quotehtml $pkg_info(description)] "</description>\n" \
" <release-date>[ns_quotehtml $pkg_info(release-date)]</release-date>\n" \
" <vendor url=\"[ns_quotehtml $pkg_info(vendor.url)]\">" \
[ns_quotehtml $pkg_info(vendor)] "</vendor>\n" \
" <license url=\"[ns_quotehtml $pkg_info(license.url)]\">" \
[ns_quotehtml $pkg_info(license)] "</license>\n" \
" <maturity>$pkg_info(maturity)</maturity>\n"
foreach e $pkg_info(install) {
......@@ -460,14 +464,14 @@ ad_proc -private apm_build_repository {
append manifest " <download-url>$apm_url</download-url>\n"
foreach elm $pkg_info(provides) {
append manifest " <provides " \
"url=\"[ad_quotehtml [lindex $elm 0]]\" " \
"version=\"[ad_quotehtml [lindex $elm 1]]\" />\n"
"url=\"[ns_quotehtml [lindex $elm 0]]\" " \
"version=\"[ns_quotehtml [lindex $elm 1]]\" />\n"
}
foreach elm $pkg_info(requires) {
append manifest " <requires " \
"url=\"[ad_quotehtml [lindex $elm 0]]\" " \
"version=\"[ad_quotehtml [lindex $elm 1]]\" />\n"
"url=\"[ns_quotehtml [lindex $elm 0]]\" " \
"version=\"[ns_quotehtml [lindex $elm 1]]\" />\n"
}
append manifest " </package>\n"
}
......@@ -487,7 +491,7 @@ ad_proc -private apm_build_repository {
set fw [open "${channel_dir}index.adp" w]
set packages [lsort $packages]
puts $fw "<master>\n<property name=\"doc(title)\">OpenACS $channel Compatible Packages</property>\n\n"
puts $fw "<h2>OpenACS $channel Core and compatibile packages</h2>
puts $fw "<h1>OpenACS $channel Core and compatibile packages</h1>
<p>Packages can be installed with the OpenACS Automated Installer on
your OpenACS site at <code>/acs-admin/install</code>. Only packages
designated compatible with your OpenACS kernel will be shown.</p>
......@@ -571,11 +575,19 @@ ad_proc -private apm_build_repository {
ns_log Notice "Repository: Finishing Repository"
foreach channel [array names channel_tag] {
regexp {^([1-9][0-9]*)-([0-9]+)$} $channel . major minor
set tag_order([format %.3d $major]-[format %.3d $minor]) $channel
set tag_label($channel) "OpenACS $major.$minor"
}
# Write the index page
ns_log Notice "Repository: Writing repository index page to ${work_dir}repository/index.adp"
template::multirow create channels name tag
foreach channel [lsort -decreasing [array names channel_tag]] {
template::multirow append channels $channel $channel_tag($channel)
template::multirow create channels name tag label
foreach key [lsort -decreasing [array names tag_order]] {
set channel $tag_order($key)
template::multirow append channels $channel $channel_tag($channel) $tag_label($channel)
}
set fw [open "${work_dir}repository/index.adp" w]
puts $fw "<master>\n<property name=\"doc(title)\">OpenACS Package Repository</property>\n\n"
......
......@@ -57,3 +57,9 @@ ad_proc -callback merge::MergeShowUserInfo {
Show information of accounts to merge
} -
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -22,3 +22,9 @@ aa_register_case -cats {api smoke} apm_higher_version_installed_p {
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -184,19 +184,19 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
append manifest { } {<package>} \n
append manifest { } {<package-key>} [ad_quotehtml $version(package.key)] {</package-key>} \n
append manifest { } {<version>} [ad_quotehtml $version(name)] {</version>} \n
append manifest { } {<pretty-name>} [ad_quotehtml $version(package-name)] {</pretty-name>} \n
append manifest { } {<package-type>} [ad_quotehtml $version(package.type)] {</package-type>} \n
append manifest { } {<summary>} [ad_quotehtml $version(summary)] {</summary>} \n
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 { } {<package-key>} [ns_quotehtml $version(package.key)] {</package-key>} \n
append manifest { } {<version>} [ns_quotehtml $version(name)] {</version>} \n
append manifest { } {<pretty-name>} [ns_quotehtml $version(package-name)] {</pretty-name>} \n
append manifest { } {<package-type>} [ns_quotehtml $version(package.type)] {</package-type>} \n
append manifest { } {<summary>} [ns_quotehtml $version(summary)] {</summary>} \n
append manifest { } {<description format="} [ns_quotehtml $version(description.format)] {">}
append manifest [ns_quotehtml $version(description)] {</description>} \n
append manifest { } {<release-date>} [ns_quotehtml $version(release-date)] {</release-date>} \n
append manifest { } {<maturity>} [ns_quotehtml $version(maturity)] {</maturity>} \n
append manifest { } {<license url="} [ns_quotehtml $version(license_url)] {">}
append manifest [ns_quotehtml $version(license)] {</license>} \n
append manifest { } {<vendor url="} [ns_quotehtml $version(vendor.url)] {">}
append manifest [ns_quotehtml $version(vendor)] {</vendor>} \n
append manifest [apm::package_version::attributes::generate_xml \
-version_id $version_id \
......@@ -234,7 +234,7 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
close $fp
lappend cmd "|" [apm_gzip_cmd] -c ">" $apm_file
#ns_log Notice "Executing: [ad_quotehtml $cmd]"
#ns_log Notice "Executing: [ns_quotehtml $cmd]"
eval $cmd
}
......@@ -243,18 +243,17 @@ foreach channel [lsort -decreasing [array names channel_tag]] {
append manifest { } {<download-url>} $apm_url {</download-url>} \n
foreach elm $version(provides) {
append manifest { } "<provides url=\"[ad_quotehtml [lindex $elm 0]]\" version=\"[ad_quotehtml [lindex $elm 1]]\" />" \n
append manifest { } "<provides url=\"[ns_quotehtml [lindex $elm 0]]\" version=\"[ns_quotehtml [lindex $elm 1]]\" />" \n
}
foreach elm $version(requires) {
append manifest { } "<requires url=\"[ad_quotehtml [lindex $elm 0]]\" version=\"[ad_quotehtml [lindex $elm 1]]\" />" \n
append manifest { } "<requires url=\"[ns_quotehtml [lindex $elm 0]]\" version=\"[ns_quotehtml [lindex $elm 1]]\" />" \n
}
append manifest { } {</package>} \n
}
} {
global errorInfo
ns_write "<li> Error on spec_file $spec_file: [ad_quotehtml $errmsg]<br>[ad_quotehtml $errorInfo]\n"
ns_write "<li> Error on spec_file $spec_file: [ns_quotehtml $errmsg]<br>[ns_quotehtml $::errorInfo]\n"
}
}
}
......@@ -306,3 +305,9 @@ if { [file exists $repository_dirname] } {
file rename $work_repository_dirname $repository_dirname
ns_write "</ul> <h2>DONE</h2>\n"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -92,4 +92,9 @@ ns_write "</pre></blockquote>\n"
ns_write "</ul>
Done installing packages.
"
\ No newline at end of file
"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -95,4 +95,9 @@ doc_body_append "<a href=\"./\">Return to the Package Manager</a>
[ad_footer]"
\ No newline at end of file
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,9 @@ ad_page_contract {
apm_file_watch_cancel $watch_file
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -19,3 +19,9 @@ foreach path $paths {
}
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -16,8 +16,7 @@
<ul>
<li><a href="package-add">Create a new package.</a>
<li><a href="write-all-specs">Write new specification files for all installed, locally generated packages.</a>
<li><a href="package-load">Load a new package from a URL or local directory.</a>
<li><a href="packages-install">Install packages.</a>
<li><a href="/acs-admin/install">Install packages.</a>
</ul>
@watches_html;noquote@
......
......@@ -148,3 +148,9 @@ if { $use_watches_p } {
Watching of files is not enabled in performance mode (see the PerformanceModeP parameter on the <a href=\"/shared/parameters?package_id=$kernel_id&return_url=$page_url\">ACS Kernel parameter page</a>)"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -146,3 +146,9 @@ db_transaction {
}
ad_returnredirect "version-view?version_id=$version_id"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -261,3 +261,9 @@ ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -25,7 +25,7 @@ db_transaction {
} on_error {
if {![apm_version_installed_p $version_id] } {
ad_return_complaint 1 "Database Error: The database returned the following error
message <pre><blockquote>[ad_quotehtml $errmsg]</blockquote></pre>"
message <pre><blockquote>[ns_quotehtml $errmsg]</blockquote></pre>"
}
}
......@@ -37,3 +37,9 @@ ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -31,7 +31,7 @@ if {![apm_version_installed_p $version_id]} {
-callback apm_body_callback $package_key} errmsg] } {
append body [subst {
We encountered the following error when deleting package "$package_key":
<pre><blockquote>[ad_quotehtml $errmsg]</blockquote></pre>
<pre><blockquote>[ns_quotehtml $errmsg]</blockquote></pre>
}]
append body $::__apm_body
......@@ -49,3 +49,9 @@ ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -116,3 +116,9 @@ set body [subst {
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -9,3 +9,9 @@ ad_page_contract {
}
apm_package_instance_new -package_key $package_key
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -29,8 +29,10 @@ if {$delete} {
set title "Contents of Loaded Package"
set context [list [list "." "Package Manager"] [list "package-load" "Load a New Package"] $title]
set template [parameter::get -package_id [ad_conn subsite_id] -parameter StreamingHead]
ad_return_top_of_page [ad_parse_template -params [list context title] $template]
ad_return_top_of_page [ad_parse_template \
-params [list context title] \
[template::streaming_template]]
if {$file_path eq ""} {
#
......@@ -86,3 +88,9 @@ ns_write [subst {
The package(s) are now extracted into your filesystem. You can <a href="package-load">load
another new package</a> from a URL or proceed to <a href="packages-install">install</a> the package(s).
}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -11,3 +11,9 @@ set context [list [list "/acs-admin/apm/" "Package Manager"] $title]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -25,4 +25,9 @@ Done.
<a href=\"./\">Return to the Package Manager</a>
[ad_footer]
"
\ No newline at end of file
"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -11,3 +11,9 @@ ad_page_contract {
apm_cancel_all_watches $package_key
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -12,3 +12,9 @@ ad_page_contract {
apm_watch_all_files $package_key
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,11 +17,10 @@ set sql_file_paths [ad_get_client_property apm sql_file_paths]
set title "Package Installation"
set context [list [list "/acs-admin/apm/" "Package Manager"] $title]
set template [parameter::get -package_id [ad_conn subsite_id] \
-parameter StreamingHead \
-default /packages/openacs-default-theme/lib/plain-streaming-head]
ad_return_top_of_page [ad_parse_template -params [list context title] $template]
ad_return_top_of_page [ad_parse_template \
-params [list context title] \
[template::streaming_template]]
ns_write {
<h2>Installing packages...</h2>
......@@ -48,12 +47,12 @@ foreach pkg_info $pkg_install_list {
array set version [apm_read_package_info_file $spec_file]
} errmsg] } {
ns_write "<li> Unable to install the [pkg_info_key $pkg_info] package because its specification
file is invalid: <blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>"
file is invalid: <blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
continue
}
if {[apm_package_version_installed_p $version(package.key) $version(name)] } {
ns_log notice "===== ALREADY-installed $version(package.key)"
#ns_log notice "===== ALREADY-installed $version(package.key)"
# Already installed.
continue
}
......@@ -96,11 +95,6 @@ foreach pkg_info $pkg_install_list {
-data_model_files $data_model_files \
-mount_path $selected_mount_path \
$spec_file]
if {[file exists $::acs::rootdir/packages/$version(package.key)/install.xml]} {
ns_log notice "===== RUN /packages/$version(package.key)/install.xml"
apm::process_install_xml /packages/$version(package.key)/install.xml ""
}
ns_log notice "===== INSTALL $version(package.key) DONE"
} errorMsg]} {
......@@ -139,3 +133,9 @@ if {$installed_count < 1} {
ns_write {
<script>window.scrollTo(0,document.body.scrollHeight);clearInterval(myInterval);</script>
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -7,11 +7,24 @@ ad_page_contract {
} {
{checked_by_default_p:boolean 0}
{operation:word all}
}
set title "Package Installation"
set context [list [list "/acs-admin/apm/" "Package Manager"] $title]
set dimensional_list {
{
operation "Operation:" all {
{ upgrade "Upgrade" {} }
{ install "Install" {} }
{ all "All" {} }
}
}
}
set dimensional_list [ad_dimensional $dimensional_list]
### Get all the spec files
#
......@@ -83,29 +96,35 @@ if { $spec_files eq "" } {
append body {
<h2>Select Packages to Install</h2><p>
<p>Please select the set of packages you'd like to install.</p>
}
} [subst {
<div style="margin: 0 auto;">
$dimensional_list
</div>
}]
set formName "pkgsForm"
append body [subst {
<script type="text/javascript">
function uncheckAll() {
var install_form = document.getElementsByName('$formName')\[0\];
for (var i = 0; i < [llength $spec_files]; ++i)
install_form.elements\[i\].checked = false;
this.href='';
for (var i = 0; i < install_form.length; ++i) {
install_form.elements\[i\].checked = false;
}
}
function checkAll() {
var install_form = document.getElementsByName('$formName')\[0\];
for (var i = 0; i < [llength $spec_files]; ++i)
install_form.elements\[i\].checked = true;
this.href='';
for (var i = 0; i < install_form.length; ++i) {
install_form.elements\[i\].checked = true;
//install_form.elements\[i\].href = '';
}
}
</script>
<a href="packages-install?checked_by_default_p=0" onclick="javascript:uncheckAll();return false"><b>uncheck all boxes</b></a> |
<a href="packages-install?checked_by_default_p=1" onclick="javascript:checkAll(); return false"><b>check all boxes</b></a>
<a href="#" onclick="javascript:uncheckAll();return false;"><b>uncheck all boxes</b></a> |
<a href="#" onclick="javascript:checkAll();return false;"><b>check all boxes</b></a>
}]
#packages-install?checked_by_default_p=1
append body "<form name='$formName' action='packages-install-2' method='post'>\n"
# Client properties do not deplete the limited URL variable space.
......@@ -123,7 +142,7 @@ if { $spec_files eq "" } {
array set package [apm_read_package_info_file $spec_file]
} errmsg] } {
lappend errors "<li>Unable to parse $spec_file. The following error was generated:
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote><p>"
<blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote><p>"
} else {
apm_log APMDebug "APM: Adding $package(package.key) to list for installation."
lappend pkg_info_list [pkg_info_new $package(package.key) $spec_file \
......@@ -133,9 +152,9 @@ if { $spec_files eq "" } {
}
if { $checked_by_default_p } {
set widget [apm_package_selection_widget $pkg_info_list $pkg_key_list]
set widget [apm_package_selection_widget $pkg_info_list $pkg_key_list $operation]
} else {
set widget [apm_package_selection_widget $pkg_info_list]
set widget [apm_package_selection_widget $pkg_info_list "" $operation]
}
if {$widget eq ""} {
......
......@@ -45,7 +45,7 @@ db_transaction {
select 1 from apm_parameters where parameter_id = :parameter_id
} -default 0]} {
ad_return_error "Database Error" "The database is complaining about the parameter you entered:<p>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>"
<blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
ad_script_abort
}
}
......@@ -60,3 +60,9 @@ foreach section $sections {
}
ad_returnredirect [export_vars -base "version-parameters" { version_id section_name }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -64,7 +64,7 @@ plain text string that identifies the parameter.
<tr valign="top">
<th align="right"><br>Section Name:</th>
<td><input name="section_name" size="50" value="[ad_quotehtml $section_name]"><br>
<td><input name="section_name" size="50" value="[ns_quotehtml $section_name]"><br>
</td>
</tr>
......@@ -117,3 +117,9 @@ plain text string that identifies the parameter.
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -55,3 +55,9 @@ set context [list [list "." "Package Manager"] \
[list [export_vars -base version-parameters { version_id section_name }] "Parameters"] \
$page_title]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -35,7 +35,7 @@ db_transaction {
} on_error {
ad_return_error "Database Error" "The parameter could not be updated.
The database returned the following error:<p>
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>"
<blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
}
# LARS hack
......@@ -49,3 +49,9 @@ foreach section $sections {
ad_returnredirect [export_vars -base "version-parameters" { version_id section_name }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -44,7 +44,7 @@ plain text string that identifies the parameter.
<tr>
<th aligh="right" nowrap>Parameter Name:</th>
<td><input name="parameter_name" size="50" value="[ad_quotehtml $parameter_name]"></td>
<td><input name="parameter_name" size="50" value="[ns_quotehtml $parameter_name]"></td>
</tr>
<tr>
......@@ -54,7 +54,7 @@ plain text string that identifies the parameter.
<tr valign=top>
<th aligh="right"><br>Description:</th>
<td><textarea name="description" cols="60" rows="8">[ad_quotehtml $description]</textarea>
<td><textarea name="description" cols="60" rows="8">[ns_quotehtml $description]</textarea>
</td>
</tr>
......@@ -66,7 +66,7 @@ to indicate which parameters pertain to security.
<tr valign=top>
<th aligh="right"><br>Section Name:</th>
<td><input name="section_name" value="[ad_quotehtml $section_name]" size=50><br>
<td><input name="section_name" value="[ns_quotehtml $section_name]" size=50><br>
</td>
</tr>
......@@ -93,7 +93,7 @@ to indicate which parameters pertain to security.
<tr>
<th aligh="right" nowrap>Default:</th>
<td><textarea name="default_value" cols="60" rows="[expr {$datatype eq "text" ? 8 : 1}]">[ad_quotehtml $default_value]</textarea>
<td><textarea name="default_value" cols="60" rows="[expr {$datatype eq "text" ? 8 : 1}]">[ns_quotehtml $default_value]</textarea>
</tr>
<tr><th colspan=2><input type="submit" value="Edit Parameter"></th>
......@@ -104,3 +104,9 @@ to indicate which parameters pertain to security.
}]
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -87,3 +87,9 @@ if { $edit_mode_p } {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -11,4 +11,9 @@ ad_page_contract {
set package_key [apm_package_key_from_version_id $version_id]
apm_remove_callback_proc -type $type -package_key $package_key
ad_returnredirect "version-callbacks?version_id=$version_id"
\ No newline at end of file
ad_returnredirect "version-callbacks?version_id=$version_id"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,8 +24,13 @@ set context [list \
[list $return_url "Tcl Callbacks"] $page_title]
if { [catch $proc_value result] } {
global errorInfo
ns_log Error "Error invoking callback $proc_value: $result\n$errorInfo"
ns_log Error "Error invoking callback $proc_value: $result\n$::errorInfo"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -69,3 +69,9 @@ db_multirow callbacks get_all_callbacks {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -80,3 +80,9 @@ foreach dependency_type { provide require extend embed } {
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -46,8 +46,14 @@ db_transaction {
where dependency_id = :dependency_id
} -default 0] } {
ad_return_complaint 1 "The database returned the following error:
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>"
<blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
}
}
ad_returnredirect [export_vars -base version-dependencies {version_id}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -42,3 +42,9 @@ append body [subst {
}]
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -29,8 +29,14 @@ db_transaction {
apm_package_install_spec $version_id
} on_error {
ad_return_complaint 1 "Database Error: The database returned the following error:
<blockquote><pre>[ad_quotehtml $errmsg]</pre></blockquote>"
<blockquote><pre>[ns_quotehtml $errmsg]</pre></blockquote>"
}
ad_returnredirect [export_vars -base version-dependencies {version_id}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -10,3 +10,9 @@ ad_page_contract {
apm_version_disable -callback apm_dummy_callback $version_id
ad_returnredirect "version-view?version_id=$version_id"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -92,3 +92,9 @@ I was unable to update your version for the following reason:
}
ad_returnredirect "version-generate-info?version_id=$version_id&write_p=1"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -234,3 +234,9 @@ append body [subst {
}]
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,9 @@ ad_page_contract {
apm_version_enable -callback apm_dummy_callback $version_id
ad_returnredirect "version-view?version_id=$version_id"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -146,3 +146,9 @@ if { $installed_p == "t" } {
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -29,8 +29,6 @@ doc_body_flush
set no_changes [list]
global errorCode
foreach file [apm_get_package_files -package_key $package_key] {
if { ![file isfile "[acs_root_dir]/$file"] } {
doc_body_append "<h3>$file</h3>\n<blockquote>This file has been locally added.</blockquote>\n"
......@@ -50,7 +48,7 @@ foreach file [apm_get_package_files -package_key $package_key] {
if { $errno == 0 } {
lappend no_changes $file
} else {
set status [lindex $errorCode 2]
set status [lindex $::errorCode 2]
if { $status == 1 } {
regsub {child process exited abnormally$} $diffs "" diffs
doc_body_append "<h3>$file</h3>\n<blockquote><pre>[ns_quotehtml $diffs]</pre></blockquote>\n"
......@@ -67,3 +65,9 @@ if { [llength $no_changes] > 0 } {
doc_body_append [ad_footer]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -26,3 +26,9 @@ if { $write_p } {
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -14,10 +14,16 @@ db_transaction {
ad_return_complaint 1 "APM Generation Error: The database returned the following error message:
<pre>
<blockquote>
[ad_quotehtml $errmsg]
[ns_quotehtml $errmsg]
</blockquote>
</pre>
"
}
ad_returnredirect "version-view?version_id=$version_id"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,3 +24,9 @@ set context [list \
set catalog_dir [lang::catalog::package_catalog_dir $package_key]
lang::catalog::export -package_key [apm_package_key_from_version_id $version_id]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,3 +24,9 @@ set context [list \
set catalog_dir [lang::catalog::package_catalog_dir $package_key]
lang::catalog::import -package_key $package_key
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -28,3 +28,9 @@ set localize_url [export_vars -base "[apm_package_url_from_key "acs-lang"]admin/
set import_url [export_vars -base "/acs-lang/admin/import-messages" { package_key {return_url {[ad_return_url]}} }]
set export_url [export_vars -base "/acs-lang/admin/export-messages" { package_key {return_url {[ad_return_url]}} }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -135,3 +135,9 @@ if { [llength $files] > 0 } {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -53,3 +53,9 @@ foreach key_pair $adp_replace_list {
set hidden_form_vars [export_vars -form {version_id files:multiple file_action:multiple}]
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -173,3 +173,9 @@ switch -- $file_type {
}
ad_return_template
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -61,3 +61,9 @@ doc_body_append "
[ad_footer]"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -97,3 +97,9 @@ foreach section $sections {
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -59,7 +59,7 @@ if { [llength $files] == 0 } {
if {[info exists package_errors($file)]} {
append body "<dl class='error'><dt title='Errors while loading $file'>ERROR!</dt>" \
"<dd><code><pre>[ad_quotehtml $package_errors($file)]</pre></code></dd></dl>"
"<dd><code><pre>[ns_quotehtml $package_errors($file)]</pre></code></dd></dl>"
}
append body "</li>\n"
}
......
......@@ -127,3 +127,9 @@ doc_body_append "
[ad_footer]
"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -29,3 +29,9 @@ set body [subst {
}]
ad_return_template apm
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -8,9 +8,10 @@ ad_page_contract {
set title "Generate Package Specifications"
set context [list [list "." "Package Manager"] $title]
set template [parameter::get -package_id [ad_conn subsite_id] -parameter StreamingHead]
ad_return_top_of_page [ad_parse_template -params [list context title] $template]
ad_return_top_of_page [ad_parse_template \
-params [list context title] \
[template::streaming_template]]
ns_write {
Regenerating all package specifications for locally maintained packages.
<ul>
......@@ -41,3 +42,9 @@ db_foreach apm_get_all_packages {
ns_write [subst {</ul>
<a href="./">Return to the Package Manager</a>
}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,3 +20,9 @@ if { [auth::can_admin_system_without_authority_p -authority_id $authority_id] }
} else {
ad_return_error "Cannot delete authority" "Deleting this authority would mean that all site-wide administrator users are shut out from the system, meaning the system could no longer be adminstered."
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -84,3 +84,9 @@ if { $has_parameters_p } {
ad_script_abort
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -15,4 +15,9 @@ if { $authority(register_impl_id) eq "" } {
parameter::set_value -package_id [apm_package_id_from_key acs-authentication] -parameter RegisterAuthority -value $authority(short_name)
ad_returnredirect [export_vars -base "." { authority_id }]
\ No newline at end of file
ad_returnredirect [export_vars -base "." { authority_id }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -24,3 +24,9 @@ if { $allowed_p } {
} else {
ad_return_error "Cannot disable authority" "Disabling this authority would mean that all site-wide administrator users are shut out from the system, meaning the system could no longer be adminstered."
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -60,3 +60,9 @@ if { $direction eq "up" } {
ad_returnredirect .
ad_script_abort
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -321,3 +321,9 @@ if { ($initial_request_p || $submit_p) && !$local_authority_p } {
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -64,3 +64,9 @@ ad_form -name batch_action_form \
}
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -13,3 +13,9 @@ set document [db_string select_document {
}]
ns_return 200 text/plain $document
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -16,3 +16,9 @@ set context [list [list "." "Authentication"] [list $authority_page_url "$author
set job_id [auth::authority::batch_sync -authority_id $authority_id]
set job_url [export_vars -base batch-job { job_id }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -75,7 +75,7 @@ ad_form \
} elseif { $element_name eq "creation_user" && $batch_job($element_name) ne "" } {
set $element_name [acs_community_member_link -user_id $batch_job($element_name)]
} else {
set $element_name [ad_quotehtml $batch_job($element_name)]
set $element_name [ns_quotehtml $batch_job($element_name)]
}
}
......@@ -175,3 +175,9 @@ db_multirow -extend { entry_url short_message entry_time_pretty user_url } batch
set entry_time_pretty [lc_time_fmt $entry_time_ansi "%x %X"]
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -143,3 +143,9 @@ db_multirow -extend {
set auth_package_id [apm_package_id_from_key "acs-authentication"]
set parameter_url [export_vars -base /shared/parameters { { package_id $auth_package_id } { return_url [ad_return_url] } }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,3 +17,9 @@ if {$suffix eq "util_memoize"} {
}
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -17,7 +17,7 @@ if {[catch {set pair [ns_cache get util_memoize $key]} errmsg]} {
set pair [ns_cache get util_memoize $name]
set raw_time [lindex $pair 0]
if {$raw_time == $raw_date} {
set value [ad_quotehtml [lindex $pair 1]]
set value [ns_quotehtml [lindex $pair 1]]
set time [clock format $raw_time]
set key $name
break
......@@ -34,3 +34,9 @@ if {[catch {set pair [ns_cache get util_memoize $key]} errmsg]} {
ns_cache flush util_memoize $key
ad_returnredirect $return_url
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -18,3 +18,9 @@ foreach cache [lsort -dictionary [ns_cache_names]] {
template::multirow append caches $cache $entries $size $max \
$flushed $hit_rate
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -21,7 +21,7 @@ if {[ns_info name] eq "NaviServer"} {
if {[catch {set value [ns_cache get util_memoize $key]} errmsg]} {
set value "<i>could not retrieve</i>"
}
set value [ad_quotehtml $value]
set value [ns_quotehtml $value]
} else {
if {[catch {set pair [ns_cache get util_memoize $key]} errmsg]} {
......@@ -33,7 +33,7 @@ if {[ns_info name] eq "NaviServer"} {
set pair [ns_cache get util_memoize $name]
set raw_time [lindex $pair 0]
if {$raw_time == $raw_date} {
set value [ad_quotehtml [lindex $pair 1]]
set value [ns_quotehtml [lindex $pair 1]]
set time [clock format $raw_time]
set key $name
break
......@@ -45,12 +45,18 @@ if {[ns_info name] eq "NaviServer"} {
set time "?"
}
} else {
set value [ad_quotehtml [lindex $pair 1]]
set value [ns_quotehtml [lindex $pair 1]]
set time [clock format [lindex $pair 0]]
}
}
set safe_key [ad_quotehtml $key]
set safe_key [ns_quotehtml $key]
regsub -all -nocase -- $pattern $key \
"<font color=\"#990000\"><b>$pattern</b></font>" key
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,7 +20,7 @@ if {[ns_info name] eq "NaviServer"} {
foreach name $cached_names {size time} $stats {
if {[regexp -nocase -- $pattern $name match]} {
set key [ad_quotehtml $name]
set key [ns_quotehtml $name]
set safe_key $key ;# why twice?
set raw_date [ns_time seconds $time]
if {$raw_date eq 0} {
......@@ -33,7 +33,7 @@ if {[ns_info name] eq "NaviServer"} {
continue
}
set value_size [string length $value]
set value [ad_quotehtml $value]
set value [ns_quotehtml $value]
if {$full} {
template::multirow append matches $key $value $value_size \
$safe_key $expires $raw_date
......@@ -48,14 +48,14 @@ if {[ns_info name] eq "NaviServer"} {
foreach name $cached_names {
if {[regexp -nocase -- $pattern $name match]} {
set key [ad_quotehtml $name]
set safe_key [ad_quotehtml $name]
set key [ns_quotehtml $name]
set safe_key [ns_quotehtml $name]
if {[catch {set pair [ns_cache get util_memoize $name]} errmsg]} {
continue
}
set raw_date [lindex $pair 0]
set date [clock format $raw_date -format "%d %b %H:%M:%S"]
set value [ad_quotehtml [lindex $pair 1]]
set value [ns_quotehtml [lindex $pair 1]]
set value_size [string length $value]
if {$full} {
template::multirow append matches $key $value $value_size \
......@@ -69,3 +69,9 @@ if {[ns_info name] eq "NaviServer"} {
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -9,3 +9,9 @@ ad_page_contract {
set page_title "Developer's Administration"
set context [list $page_title]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
<master>
<property name="doc(title)">@page_title;literal@</property>
<div style="float: right;">
<a href="developer" class="button">Developer's Admin</a>
</div>
<h1>Site-Wide Administration</h1>
<h1>Core Administration</h1>
<include src="/packages/acs-admin/lib/site-wide-services">
<include src="/packages/acs-admin/lib/site-wide-services"
nr_subsites="@subsite_number;literal@" >
<if @packages:rowcount@ gt 0>
<h1>Site-Wide Package Administration</h1>
<listtemplate name="packages"></listtemplate>
</if>
<h3>Site-Wide Package Administration</h3>
<if @too_many_subsites_p@ gt 0>
<h1>Subsite Administration</h1>
<p>Too many subsites to display: @subsite_number@</p>
<p>Manage application packages with site-wide administration facilities.
These packages have either site-wide parameters (package
parameters valid for every instance of the package) or they have an
own web interface for site-wide administration (www/site-wide-admin).
<listtemplate name="packages" style="table-2third"></listtemplate>
<p>
</if>
<else>
<if @subsites:rowcount@ gt 0>
<h1>Subsite Administration</h1>
<ul>
<multiple name="subsites">
<li><a href="@subsites.admin_url@">@subsites.path_pretty@</a></li>
</multiple>
</ul>
</if>
</else>
<h1>Service Administration</h1>
<h3>Site-Wide Service Administration</h3>
<p>Manage service packages having either parameters or pages (for admins or users):
</p>
<include src="/packages/acs-admin/lib/service-parameters">
......@@ -7,37 +7,23 @@ ad_page_contract {
set page_title [ad_conn instance_name]
set package_keys '[join [subsite::package_keys] ',']'
set subsite_number [db_string count_subsites {}]
if {$subsite_number > 100} {
set too_many_subsites_p 1
} else {
set too_many_subsites_p 0
db_multirow -extend { admin_url path_pretty } subsites subsite_admin_urls {} {
set admin_url "${node_url}admin/"
set path_pretty $instance_name
array set node [site_node::get -node_id $node_id]
set parent_id $node(parent_id)
while { $parent_id ne "" } {
array unset node
array set node [site_node::get -node_id $parent_id]
set path_pretty "$node(instance_name) > $path_pretty"
set parent_id $node(parent_id)
}
}
multirow sort subsites path_pretty
}
set subsite_number [db_string count_subsites [subst {
select count(*) from apm_packages where package_key in ($package_keys)
}]]
db_multirow -extend { admin_url global_param_url } packages installed_packages {} {
if { [apm_package_installed_p $package_key] && [file exists "[acs_package_root_dir $package_key]/www/sitewide-admin/"] } {
if {
[apm_package_installed_p $package_key]
&& [file exists "[acs_package_root_dir $package_key]/www/sitewide-admin/"]
} {
set admin_url "package/$package_key/"
} else {
set admin_url ""
}
if { [catch {db_1row global_params_exist {}} errmsg] ||
$global_params == 0 } {
set global_param_url ""
if { [catch {db_1row global_params_exist {}} errmsg]
|| $global_params == 0
} {
set global_param_url ""
} else {
set return_url [ad_conn url]
set global_param_url [export_vars -base /shared/parameters {package_key return_url {scope global}}]
......@@ -53,17 +39,28 @@ template::list::create \
-elements {
pretty_name {
label "Package"
html {align left}
}
admin_url {
label "Site-Wide Administration"
link_html { title "Site-wide Administration" }
link_url_col admin_url
display_template {<if @packages.admin_url@ not nil>#acs-admin.Administration#</if>}
html {align left}
}
global_param_url {
label "Global Parameters"
link_html {title "Manage Global Parameters" }
link_url_col global_param_url
display_template {<if @packages.global_param_url@ not nil>#acs-admin.Parameters#</if>}
html {align left}
}
}
#
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
<?xml version="1.0"?>
<queryset>
<fullquery name="count_subsites">
<querytext>
select count(*)
from apm_packages
where package_key in ($package_keys)
</querytext>
</fullquery>
<fullquery name="installed_packages">
<querytext>
select package_key,
......
......@@ -3,31 +3,37 @@
<property name="context">@context;literal@</property>
<h1>@page_title@</h1>
<table style="border: 1px solid gray" border="1" cellspacing="0" cellpadding="3">
<tr>
<th>From Repository</th>
<th>Local Files</th>
</tr>
<tr>
<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>
</td>
</tr>
<tr>
<td>
<a href="@remote_install_url@">Install</a> or
<a href="@remote_upgrade_url@">upgrade</a>
from repository.
</td>
<td><a href="@local_install_url@">Install or upgrade</a> from local file system.</td>
</tr>
</table>
<h2>Installed Packages</h2>
<listfilters name="packages" style="inline-filters"></listfilters>
<listtemplate name="packages"></listtemplate>
<ul>
<li><h3>Install from Repository</h3>
<p>Download and install/upgrade packages from the <a href="http://openacs.org/repository/">OpenACS.org repository</a>.
<br>When using this option, the existing code of the currently installed packages is moved
away <br>and replaced by the chosen packages from the OpenACS respository.
<p><a href="/acs-admin/@remote_install_url@" class="button">Install</a> or
<a href="/acs-admin/@remote_upgrade_url@" class="button">upgrade</a> from repository.</p>
<li><h3>Install from Local File System</h3>
<p>Install/upgrade packages from the local file system (@local_path@).
<br>Use this if your site has
custom code or your packages are kept in a local code repository.
<a href="/doc/upgrade-openacs-files">Help</a>.</p>
<p><a href="@local_install_url@" class="button">Install or upgrade</a>
from the local file system.</p>
<li><h3>Install from URL or Local Path</h3>
<p>Load a single package an archive stored an a non-standard place on
your local file system or from an URL.</p>
<p><a href="/acs-admin/apm/package-load" class="button">Load</a> from URL or Local Path</p>
</ul>
<hr>
<h3>Package Manager</h3>
<ul>
<li>
<a href="/acs-admin/apm/">Manage Installed Packages</a>
</li>
</ul>
......@@ -4,63 +4,17 @@ ad_page_contract {
package_type:optional
}
set page_title "Install Software"
set page_title "Install OpenACS Packages"
set context [list $page_title]
template::list::create \
-name packages \
-multirow packages \
-elements {
pretty_name {
label "Package"
}
version_name {
label "Version"
}
package_type_pretty {
label "Type"
hide_p 1
}
} -filters {
package_type {
label "Type"
default_value apm_application
where_clause {
t.package_type = :package_type
}
values {
{Application apm_application}
{Service apm_service}
}
}
}
db_multirow -extend { package_type_pretty } packages packages "
select v.version_id,
v.package_key,
t.pretty_name,
t.package_type,
v.version_name
from apm_package_versions v,
apm_package_types t
where t.package_key = v.package_key
and v.enabled_p = 't'
and v.installed_p = 't'
[template::list::filter_where_clauses -and -name packages]
order by t.package_type, t.pretty_name
" {
set package_type_pretty [string totitle [lindex [split $package_type "_"] 1]]
}
#set local_install_url [export_vars -base "install" { { package_type apm_application } }]
#set local_service_install_url [export_vars -base "install" { { package_type apm_service } }]
#set local_upgrade_url [export_vars -base "install" { { upgrade_p 1 } }]
set local_install_url "[ad_conn package_url]/apm/packages-install"
set local_path $::acs::rootdir/packages
set remote_install_url [export_vars -base "install/install" { repository_url channel current_channel head_channel }]
set remote_upgrade_url [export_vars -base "install/install" { {upgrade_p 1} repository_url channel current_channel head_channel}]
set repository_url "http://openacs.org/repository/"
set head_channel [lindex [apm_get_repository_channels $repository_url] 0]
set current_channel [apm_get_repository_channel]
set channel $current_channel
set remote_install_url [export_vars -base "install" { repository_url channel current_channel head_channel }]
set remote_upgrade_url [export_vars -base "install" { { upgrade_p 1 } repository_url channel current_channel head_channel}]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -138,3 +138,9 @@ template::list::create \
}
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -141,7 +141,8 @@ foreach package_key $install_order {
<p>Installing $package_key ...<br>
<script>window.scrollTo(0,document.body.scrollHeight);</script>
}]
# Install the packages -- this actually copies the files into the
# Install the package -- this actually copies the files into the
# right place in the file system and backs up any old files
set version_id [apm_package_install \
-enable \
......@@ -155,11 +156,6 @@ foreach package_key $install_order {
# as there might be packages depending on the failed package. Ideally we should
# probably check for such dependencies and continue if there are none.
set success_p 0
} elseif {[file exists $::acs::rootdir/packages/$package_key/install.xml]} {
ns_write "... configure $package_key<br>\n"
#ns_log notice "===== RUN /packages/$package_key/install.xml"
apm::process_install_xml /packages/$package_key/install.xml ""
ns_write "... installation OK <br>\n"
} else {
ns_write "... installation OK <br>\n"
}
......@@ -177,3 +173,9 @@ foreach package_key $install_order {
ad_progress_bar_end -url [export_vars -base install-4 { repository_url success_p }]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -21,3 +21,9 @@ if { $success_p } {
set context [list [list "." "Install Software"] [list $parent_page_url $parent_page_title] $page_title]
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -3,11 +3,20 @@ ad_page_contract {
} {
{package_type ""}
{upgrade_p:boolean 0}
{repository_url ""}
{repository_url "http://openacs.org/repository/"}
{channel ""}
{maturity:naturalnum ""}
{current_channel}
{head_channel}
{current_channel ""}
{head_channel ""}
}
if {$current_channel eq ""} {
set current_channel [apm_get_repository_channel]
set channel $current_channel
}
if {$head_channel eq ""} {
set head_channel [lindex [apm_get_repository_channels $repository_url] 0]
}
#
......@@ -203,3 +212,9 @@ template::list::create \
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -72,3 +72,9 @@ if [catch { set uptime_output [exec /usr/bin/uptime] } errmsg] {
# whoops something wrong with uptime (check path)
set uptime_output "ERROR running uptime, check path in script"
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -25,7 +25,7 @@ ad_page_contract {
if {[catch {acs_mail_lite::send -send_immediately -to_addr $email -from_addr $email_from -subject $subject -body $message} errmsg]} {
ad_return_error $error_subject "<p>$error_message</p>
<div><code>[ad_quotehtml $errmsg]</code></div>"
<div><code>[ns_quotehtml $errmsg]</code></div>"
ad_script_abort
}
......@@ -34,3 +34,9 @@ if { $show_sent_message_p != "t" } {
ad_returnredirect $return_url
ad_script_abort
}
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -15,3 +15,9 @@ set context [list $page_title]
# We do this as a schedule proc, so the server will have time to serve the page
ad_schedule_proc -thread t -once t 2 ns_shutdown
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -18,4 +18,9 @@ if { $result eq "MyValue" } {
ns_write "
</ul>
[ad_footer]"
\ No newline at end of file
[ad_footer]"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -121,4 +121,9 @@ ns_write "
[ad_footer]
"
\ No newline at end of file
"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
......@@ -20,4 +20,9 @@ ns_return 200 text/html "
cookies set. <a href=\"signed-cookies-test-2\">test it out</a>.
[ad_footer]"
\ No newline at end of file
[ad_footer]"
# Local variables:
# mode: tcl
# tcl-indent-level: 4
# indent-tabs-mode: nil
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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