Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/ChangeLog'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/readme.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/readme.txt,v
diff -u -r1.9 -r1.10
--- openacs-4/readme.txt 11 Dec 2003 21:39:42 -0000 1.9
+++ openacs-4/readme.txt 26 Jan 2004 15:39:39 -0000 1.10
@@ -1,6 +1,6 @@
This is the OpenACS - the Open Architecture Community System.
-Version 5.0.0 beta 4
+Version 5.0.0 Final
--------------
@@ -35,12 +35,9 @@
The original ACS was Copyright (C) 1995-2000 ArsDigita Corporation
and, in some cases, individual authors.
-OpenACS is a community created and supported software system, visit
+OpenACS is a community created and supported software system; visit
http://openacs.org for more information.
-The major change in OpenACS 4.x is its database-independence; it can
-use either PostgreSQL (7.2 or later) or Oracle (8.1.6 or later).
-
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
Index: openacs-4/contrib/packages/classified-ads/tcl/ads-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/tcl/ads-procs.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/contrib/packages/classified-ads/tcl/ads-procs.xql 29 Jul 2003 09:10:42 -0000 1.6
+++ openacs-4/contrib/packages/classified-ads/tcl/ads-procs.xql 26 Jan 2004 15:39:39 -0000 1.7
@@ -19,7 +19,10 @@
ci.parent_id = :parent_id and
ci.content_type = 'ca_ad' and
cm.keyword_id = :category_id and
- ci.item_id = ads.ad_id
+ -- RBM (2004-01-17) - Dont remember why this was being compared to
+ -- item_id
+ -- ci.item_id = ads.ad_id
+ ci.latest_revision = ads.ad_id
order by cm.keyword_id asc,
cr.title asc
Index: openacs-4/contrib/packages/classified-ads/www/categories.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/www/categories.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/classified-ads/www/categories.tcl 21 Jul 2003 16:08:07 -0000 1.2
+++ openacs-4/contrib/packages/classified-ads/www/categories.tcl 26 Jan 2004 15:39:39 -0000 1.3
@@ -12,14 +12,14 @@
}
set root_folder_id [classified-ads::get_root_folder_id]
-set package_category_id [classified-ads::categories::package_category_exists_p]
+set package_category_id [classified-ads::categories::get_package_keyword_id]
set package_category_p 0
set title "Categories"
if {[empty_string_p $keyword_id]} {
set keyword_id $package_category_id
set package_category_p 1
-} elseif {[string equal [classified-ads::main_keyword_exists_p] $keyword_id]} {
+} elseif {[string equal [classified-ads::get_main_keyword_id] $keyword_id]} {
ad_return_complaint 1 "
Index: openacs-4/contrib/packages/classified-ads/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/www/index.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/contrib/packages/classified-ads/www/index.tcl 30 Jul 2003 04:56:41 -0000 1.5
+++ openacs-4/contrib/packages/classified-ads/www/index.tcl 26 Jan 2004 15:39:39 -0000 1.6
@@ -48,12 +48,12 @@
-rows [classified-ads::ads::get_assigned_ads_by_category -category_id $keyword_id] \
-var_name assigned_ads
-template::list::create \
- -name assigned_ads \
- -multirow assigned_ads \
- -key ad_id \
- -actions [list "Place Ad" [export_vars -base ad-one {keyword_id}] "Place an Ad"] \
- -row_pretty_plural "Ads" \
+template::list::create \
+ -name assigned_ads \
+ -multirow assigned_ads \
+ -key ad_id \
+ -actions [list "Place Ad" [export_vars -base ad-one {keyword_id}] "Place an Ad"] \
+ -row_pretty_plural "Ads" \
-elements {
title {
label "Title"
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/README'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/payflowpro.info'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/oracle/payflowpro-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/oracle/payflowpro-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/oracle/payflowpro-sc-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/oracle/payflowpro-sc-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/postgresql/payflowpro-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/postgresql/payflowpro-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/postgresql/payflowpro-sc-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/sql/postgresql/payflowpro-sc-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/tcl/payflowpro-procs-oracle.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/tcl/payflowpro-procs-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/tcl/payflowpro-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/verisign-module/Makefile'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/verisign-module/README'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/verisign-module/verisign.c'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/www/admin/index.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/www/admin/index.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/www/admin/transactions.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/www/admin/transactions.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/payflowpro/www/admin/transactions.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/project-manager.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/Attic/project-manager.info,v
diff -u -r1.13 -r1.14
--- openacs-4/contrib/packages/project-manager/project-manager.info 11 Dec 2003 21:39:44 -0000 1.13
+++ openacs-4/contrib/packages/project-manager/project-manager.info 26 Jan 2004 15:39:40 -0000 1.14
@@ -17,6 +17,8 @@
+
+
@@ -26,6 +28,7 @@
+
Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-create.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-create.sql 30 Jul 2003 20:42:05 -0000 1.3
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-create.sql 26 Jan 2004 15:39:40 -0000 1.4
@@ -8,4 +8,5 @@
--
\i project-manager-table-create.sql
-\i project-manager-functions-create.sql
\ No newline at end of file
+\i project-manager-functions-create.sql
+\i project-manager-notifications-create.sql
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-custom-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-custom-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-notifications-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-notifications-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-table-create.sql,v
diff -u -r1.16 -r1.17
--- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 11 Dec 2003 21:39:44 -0000 1.16
+++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 26 Jan 2004 15:39:40 -0000 1.17
@@ -343,10 +343,10 @@
description varchar(1000)
);
-insert into pm_task_dependency_types (short_name, description) values ('start_before_start','Start before this starts');
-insert into pm_task_dependency_types (short_name, description) values ('start_before_finish','Start before this finishes');
-insert into pm_task_dependency_types (short_name, description) values ('finish_before_start','Finish before this starts');
-insert into pm_task_dependency_types (short_name, description) values ('finish_before_finish','Finish before this finishes');
+insert into pm_task_dependency_types (short_name, description) values ('start_before_start','Starts before this starts');
+insert into pm_task_dependency_types (short_name, description) values ('start_before_finish','Starts before this finishes');
+insert into pm_task_dependency_types (short_name, description) values ('finish_before_start','Finishes before this starts');
+insert into pm_task_dependency_types (short_name, description) values ('finish_before_finish','Finishes before this finishes');
create sequence pm_task_dependency_seq;
@@ -356,15 +356,21 @@
constraint pm_task_const_id_pk
primary key,
task_id integer
+ constraint pm_task_const_task_id_nn
+ not null
constraint pm_task_const_task_id_fk
references pm_tasks
on delete cascade,
parent_task_id integer
+ constraint pm_tasks_const_parent_id_nn
+ not null
constraint pm_tasks_const_parent_id_fk
references pm_tasks
on delete cascade,
dependency_type varchar
- constraint pm_tasks_const_type
+ constraint pm_tasks_const_type_nn
+ not null
+ constraint pm_tasks_const_type_fk
references pm_task_dependency_types,
constraint pm_task_dependency_uq
unique (task_id, parent_task_id)
@@ -532,3 +538,5 @@
Maps who is assigned to process tasks. These will be the default people
assigned to the new tasks
';
+
+\i project-manager-custom-create.sql
Index: openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/project-procs.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 4 Sep 2003 23:18:23 -0000 1.3
+++ openacs-4/contrib/packages/project-manager/tcl/project-procs.tcl 26 Jan 2004 15:39:40 -0000 1.4
@@ -12,7 +12,190 @@
namespace eval project_manager::project {}
+ad_proc -public project_manager::project::latest_start {
+ end_date_j
+ hours_to_complete
+ hours_day
+} {
+ # set latest_start($my_iid) [expr $task_deadline_j - [expr $activity_time($my_iid) / double($hours_day)]]
+
+ # we now set the latest start. This is equal to the
+ # latest finish date minus the amount of time it will
+ # take to accomplish the job. We need to disregard holidays!
+
+ set t_end_date $end_date_j
+ set t_today $t_end_date
+
+ while {![is_workday_p $t_today]} {
+ set t_today [expr $t_today - 1]
+ }
+ set t_total_hours $hours_to_complete
+
+ while {$t_total_hours > $hours_day} {
+
+ set t_today [expr $t_today - 1]
+
+ # if it is a holiday, don't subtract from total time
+
+ if {[is_workday_p $t_today]} {
+ set t_total_hours [expr $t_total_hours - $hours_day]
+ }
+
+ }
+
+ return $t_today
+
+}
+
+
+ad_proc -public project_manager::project::earliest_finish {
+ earliest_start_j
+ hours_to_complete
+ hours_day
+} {
+
+ # set earliest_finish($task_item) [expr $earliest_start($task_item) + [expr $activity_time($task_item) / double($hours_day)]]
+
+ # we now set the earliest finish. This is equal to the
+ # earliest start plus the amount of time it will
+ # take to accomplish the job. We need to disregard holidays!
+
+ set t_start_date $earliest_start_j
+ set t_today $t_start_date
+
+ while {![is_workday_p $t_today]} {
+ set t_today [expr $t_today + 1]
+ }
+ set t_total_hours $hours_to_complete
+
+ while {$t_total_hours > $hours_day} {
+
+ set t_today [expr $t_today + 1]
+
+ # if it is a holiday, don't subtract from total time
+
+ if {[is_workday_p $t_today]} {
+ set t_total_hours [expr $t_total_hours - $hours_day]
+ }
+
+ }
+
+ return $t_today
+
+}
+
+
+ad_proc -public project_manager::project::my_earliest_start {
+ earliest_start_j
+ hours_to_complete
+ hours_day
+} {
+ Computing the earliest start requires getting a max of all the possible
+ candidates. This returns the value for one candidate
+} {
+ # set my_earliest_start [expr [expr $activity_time($dependent_item) / double($hours_day)] + $earliest_start($dependent_item)]
+
+ set t_start_date $earliest_start_j
+ set t_today $t_start_date
+
+ while {![is_workday_p $t_today]} {
+ set t_today [expr $t_today + 1]
+ }
+
+ set t_total_hours $hours_to_complete
+
+ while {$t_total_hours > $hours_day} {
+
+ set t_today [expr $t_today + 1]
+
+ # if it is a holiday, don't subtract from total time
+
+ if {[is_workday_p $t_today]} {
+ set t_total_hours [expr $t_total_hours - $hours_day]
+ }
+
+ }
+
+ return $t_today
+
+}
+
+
+ad_proc -public project_manager::project::my_latest_finish {
+ latest_start_j
+ hours_to_complete
+ hours_day
+} {
+ Computing the latest
+} {
+ # set temp [expr $min_latest_start + [expr $activity_time($task_item) / double($hours_day)]]
+
+ set t_start_date $latest_start_j
+ set t_today $t_start_date
+
+ while {![is_workday_p $t_today]} {
+ set t_today [expr $t_today + 1]
+ }
+
+ set t_total_hours $hours_to_complete
+
+ while {$t_total_hours > $hours_day} {
+
+ set t_today [expr $t_today + 1]
+
+ # if it is a holiday, don't subtract from total time
+
+ if {[is_workday_p $t_today]} {
+ set t_total_hours [expr $t_total_hours - $hours_day]
+ }
+
+ }
+
+ return $t_today
+
+}
+
+
+ad_proc -public project_manager::project::julian_to_day_of_week {
+ julian_date
+} {
+ Computes the day of the week. 0=Sunday
+ Initially, I used Tcl's clock command, but it doesn't accept dates
+ larger than 2038, so I had to do this myself.
+} {
+ set date [dt_julian_to_ansi $julian_date]
+ regexp {([0-9]*)-([0-9]*)-([0-9]*)} $date match year month day
+ regexp {0(.)} $month match month extra
+ regexp {0(.)} $day match day extra
+ set alpha [expr [expr 14 - $month] / 12]
+ set y [expr $year - $alpha]
+ set m [expr $month + [expr 12 * $alpha] - 2]
+ set day_of_week_pre_mod [expr $day + $y + [expr $y / 4] - [expr $y / 100] + [expr $y / 400] + [expr 31 * $m / 12]]
+ set day_of_week [expr $day_of_week_pre_mod % 7]
+ return $day_of_week
+}
+
+ad_proc -public project_manager::project::is_workday_p {
+ date_j
+} {
+
+ Figures out whether or not a given date is a workday or not
+
+} {
+
+ # need to add in a table of holidays
+
+ set day_of_week [julian_to_day_of_week $date_j]
+
+ if {[string equal $day_of_week 6] || [string equal $day_of_week 0]} {
+ return 0
+ } else {
+ return 1
+ }
+}
+
+
ad_proc -public project_manager::project::compute_status {project_item_id} {
Looks at tasks and subprojects, and computes the current status of a project.
@@ -67,7 +250,7 @@
# --------------------------------------------------------------------
# for now, hardcode in a day is 8 hours. Later, we want to set this by
- # person. Note also that it assumes everyone works 7 days a week
+ # person.
# --------------------------------------------------------------------
set hours_day 8
@@ -97,6 +280,8 @@
set task_list [concat $task_list $task_list_project]
+ ns_log Notice "task_list: $task_list"
+
# -------------------------
# no tasks for this project
# -------------------------
@@ -112,6 +297,7 @@
# today_j (julian date for today)
db_1row tasks_group_query { }
+ ns_log notice "Julian today: $today_j"
# --------------------------------------------------------------
# Set up activity_time for all tasks
@@ -124,9 +310,12 @@
if {[exists_and_not_null task_deadline_j]} {
+ ns_log notice "$my_iid has a deadline $task_jdeadline_j"
+
set latest_finish($my_iid) $task_deadline_j
- set latest_start($my_iid) [expr $task_deadline_j - [expr $activity_time($my_iid) / double($hours_day)]]
+ set latest_start($my_iid) [latest_start $task_deadline_j $activity_time($my_iid) $hours_day]
+
}
}
@@ -145,7 +334,7 @@
set dependency_types($task_item_id-$parent_task_id) $dependency_type
- ns_log Notice "id: $dependency_id task: $task_item_id parent: $parent_task_id type: $dependency_type"
+ ns_log Notice "dependency (id: $dependency_id) task: $task_item_id parent: $parent_task_id type: $dependency_type"
}
@@ -190,7 +379,8 @@
if {![info exists depends($task_item)]} {
set earliest_start($task_item) $start_date_j
- set earliest_finish($task_item) [expr $earliest_start($task_item) + [expr $activity_time($task_item) / double($hours_day)]]
+ #set earliest_finish($task_item) [expr $earliest_start($task_item) + [expr $activity_time($task_item) / double($hours_day)]]
+ set earliest_finish($task_item) [earliest_finish $earliest_start($task_item) $activity_time($task_item) $hours_day]
lappend present_tasks $task_item
@@ -228,7 +418,7 @@
if {![exists_and_not_null earliest_start($task_item)]} {
- ns_log Notice " info exists for $task_item"
+ ns_log Notice " !info exists for $task_item"
# ---------------------------------------------
# set the earliest_start for this task =
@@ -237,19 +427,20 @@
# (i-1 means an item that this task depends on)
# ---------------------------------------------
- set max_earliest_start $today_j
+ set max_earliest_start 0
foreach dependent_item $depends($task_item) {
- set my_earliest_start [expr [expr $activity_time($dependent_item) / double($hours_day)] + $earliest_start($dependent_item)]
+ set my_earliest_start [my_earliest_start $earliest_start($dependent_item) $activity_time($dependent_item) $hours_day]
if {$my_earliest_start > $max_earliest_start} {
set max_earliest_start $my_earliest_start
}
}
set earliest_start($task_item) $max_earliest_start
- set earliest_finish($task_item) [expr $max_earliest_start + [expr $activity_time($task_item) / double($hours_day)]]
+ # set earliest_finish($task_item) [expr $max_earliest_start + [expr $activity_time($task_item) / double($hours_day)]]
+ set earliest_finish($task_item) [earliest_finish $max_earliest_start $activity_time($task_item) $hours_day]
ns_log Notice \
" earliest_start ($task_item): $earliest_start($task_item)"
@@ -327,10 +518,14 @@
# info for these items
# -----------------------------------------------------
+ ns_log Notice "Starting foreach task-item $task_list"
+
foreach task_item $task_list {
if {![info exists dependent($task_item)]} {
+ ns_log Notice " !info exists dependent($task_item)"
+
# we check this because some tasks already have
# hard deadlines set.
if {[info exists latest_finish($task_item)]} {
@@ -339,7 +534,8 @@
set latest_finish($task_item) $end_date_j
}
- set late_start_temp [expr $latest_finish($task_item) - [expr $activity_time($task_item) / double($hours_day)]]
+ #set late_start_temp [expr $latest_finish($task_item) - [expr $activity_time($task_item) / double($hours_day)]]
+ set late_start_temp [latest_start $latest_finish($task_item) $activity_time($task_item) $hours_day]
if {$late_start_temp < $latest_start($task_item)} {
set latest_start($task_item) $late_start_temp
@@ -348,12 +544,15 @@
} else {
set latest_finish($task_item) $end_date_j
- set latest_start($task_item) [expr $latest_finish($task_item) - [expr $activity_time($task_item) / double($hours_day)]]
+ #set latest_start($task_item) [expr $latest_finish($task_item) - [expr $activity_time($task_item) / double($hours_day)]]
+ set latest_start($task_item) [latest_start $latest_finish($task_item) $activity_time($task_item) $hours_day]
}
lappend present_tasks $task_item
ns_log Notice "Begin latest_start($task_item): $latest_start($task_item) latest_finish: $latest_finish($task_item)"
+ } else {
+ ns_log Notice " info exists dependent($task_item)"
}
}
@@ -381,7 +580,7 @@
ns_log Notice "this task_item: $task_item"
# -----------------------------------------------------
- # some tasks may already have latest_start filled in
+ # some tasks may already have latest_start filled in.
# the first run of tasks, for example, had their values
# filled in earlier
# -----------------------------------------------------
@@ -405,11 +604,15 @@
if {![exists_and_not_null latest_start($dependent_item)]} {
# let's not do this task_item yet
lappend future_tasks $task_item
+ ns_log Notice " defer"
set defer_p t
} else {
- set my_latest_start [expr $latest_start($dependent_item) - [expr $activity_time($dependent_item) / double($hours_day)]]
+ #set my_latest_start [expr $latest_start($dependent_item) - [expr $activity_time($dependent_item) / double($hours_day)]]
+ set my_latest_start [latest_start $latest_start($dependent_item) $activity_time($task_item) $hours_day]
+ ns_log Notice " my_latest_start: $my_latest_start"
+
if {$my_latest_start < $min_latest_start} {
set min_latest_start $my_latest_start
}
@@ -430,8 +633,12 @@
set latest_start($task_item) $min_latest_start
}
- set temp [expr $min_latest_start + [expr $activity_time($task_item) / double($hours_day)]]
+ ns_log Notice " min_latest_start: $min_latest_start"
+ # temp is temporary latest_finish
+ #set temp [expr $min_latest_start + [expr $activity_time($task_item) / double($hours_day)]]
+ set temp [my_latest_finish $min_latest_start $activity_time($task_item) $hours_day]
+
if {[exists_and_not_null latest_finish($task_item)]} {
if {$temp < $latest_finish($task_item)} {
set latest_finish($task_item)
@@ -517,8 +724,8 @@
set root_folder [db_exec_plsql get_root_folder { }]
- while {$parent_id != $root_folder} {
- set parent_id [db_string get_parent_id {}]
+ while {$parent_id != $root_folder && $parent_id != "-1"} {
+ set parent_id [db_string get_parent_id {} -default "-1"]
set last_item_id $my_item_id
set my_item_id $parent_id
}
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/tcl/task-procs-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/tcl/task-procs.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/add-edit-2.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/www/add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.13
+++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 26 Jan 2004 15:39:40 -0000 1.14
@@ -43,7 +43,9 @@
set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"]
set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"]
+set use_project_customizations_p [parameter::get -parameter "UseProjectCustomizationsP" -default "0"]
+
if {[exists_and_not_null project_id]} {
set title "Edit a $project_term_lower"
set context_bar [ad_context_bar "Edit $project_term"]
@@ -74,6 +76,7 @@
{project_name:text
{label "[set project_term] name"}
{value $project_name}
+ {html {size 50}}
}
{description:text(textarea),optional
@@ -123,7 +126,7 @@
if {![empty_string_p [category_tree::get_mapped_trees $package_id]]} {
ad_form -extend -name add_edit -form {
{category_ids:integer(category),multiple,optional {label "Categories"}
- {html {size 4}} {value {$package_id $package_id}}
+ {html {size 4}} {value {}}
}
}
}
@@ -161,10 +164,17 @@
} -new_data {
set project_id [db_exec_plsql new_project_item { *SQL* }]
set project_item_id [db_string get_item_id { }]
-
- ad_returnredirect "one?[export_url_vars project_item_id project_id]"
- ad_script_abort
-
+
+ category::map_object -remove_old -object_id $project_item_id $category_ids
+
+ if {$use_project_customizations_p} {
+ ad_returnredirect "add-edit-2?[export_url_vars project_item_id project_id]"
+ ad_script_abort
+ } else {
+ ad_returnredirect "one?[export_url_vars project_item_id project_id]"
+ ad_script_abort
+ }
+
} -edit_data {
set project_id [db_exec_plsql new_project_revision { *SQL* }]
@@ -174,6 +184,11 @@
} -after_submit {
- ad_returnredirect "one?[export_url_vars project_id]"
- ad_script_abort
+ if {$use_project_customizations_p} {
+ ad_returnredirect "add-edit-2?[export_url_vars project_id]"
+ ad_script_abort
+ } else {
+ ad_returnredirect "one?[export_url_vars project_id]"
+ ad_script_abort
+ }
}
Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/dependency-add-edit-postgresql.xql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/dependency-add-edit.adp'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/contrib/packages/project-manager/www/dependency-add-edit.tcl'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/project-manager/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index-postgresql.xql,v
diff -u -r1.9 -r1.10
--- openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.9
+++ openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.10
@@ -20,10 +20,12 @@
p.estimated_hours_total,
to_char(p.estimated_finish_date, 'MM/DD/YY') as estimated_finish_date,
to_char(p.earliest_finish_date, 'MM/DD/YY') as earliest_finish_date,
- to_char(p.latest_finish_date, 'MM/DD/YY') as latest_finish_date
- FROM pm_projectsx p LEFT JOIN (select om.category_id, om.object_id, t.name as category_name from category_object_map om, category_translations t where om.category_id = t.category_id) c ON p.item_id = c.object_id, cr_items i, pm_project_status s
+ to_char(p.latest_finish_date, 'MM/DD/YY') as latest_finish_date,
+ o.name as customer_name
+ FROM pm_projectsx p LEFT JOIN organizations o ON p.customer_id = o.organization_id LEFT JOIN (select om.category_id, om.object_id, t.name as category_name from category_object_map om, category_translations t, categories ctg where om.category_id = t.category_id and ctg.category_id = t.category_id and ctg.deprecated_p = 'f') c ON p.item_id = c.object_id,
+ cr_items i,
+ pm_project_status s
WHERE p.project_id = i.live_revision and
- p.parent_id = :root_folder and
s.status_id = p.status_id
[template::list::filter_where_clauses -and -name projects]
[template::list::orderby_clause -orderby -name projects]
Index: openacs-4/contrib/packages/project-manager/www/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.adp,v
diff -u -r1.18 -r1.19
--- openacs-4/contrib/packages/project-manager/www/index.adp 11 Dec 2003 21:39:44 -0000 1.18
+++ openacs-4/contrib/packages/project-manager/www/index.adp 26 Jan 2004 15:39:40 -0000 1.19
@@ -11,6 +11,8 @@
+ @category_select;noquote@
+
Index: openacs-4/contrib/packages/project-manager/www/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/index.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/contrib/packages/project-manager/www/index.tcl 11 Dec 2003 21:39:44 -0000 1.10
+++ openacs-4/contrib/packages/project-manager/www/index.tcl 26 Jan 2004 15:39:40 -0000 1.11
@@ -17,7 +17,8 @@
} {
orderby_project:optional
status_id:optional
- category_id:optional
+ category_id:multiple,optional
+ {subprojects_p ""}
} -properties {
context:onevalue
@@ -56,14 +57,58 @@
# root CR folder
set root_folder [db_string get_root "select pm_project__get_root_folder (:package_id, 'f')"]
+# hack to make the subprojects filter work
+#if {[string equal $subprojects_p "t"]} {
+# set subprojects_p ""
+#}
+
+
# Projects, using list-builder ---------------------------------
+# Categories are arranges into category trees.
+# Set up an array for each tree. The array contains the category for each tree
-set category_choices [db_list_of_lists gg "select t.name, t.category_id from category_tree_map tm, categories c, category_translations t where c.tree_id = tm.tree_id and c.category_id = t.category_id and tm.object_id = :package_id"]
+db_foreach get_choices "select t.name as cat_name, t.category_id as cat_id, tm.tree_id from category_tree_map tm, categories c, category_translations t where c.tree_id = tm.tree_id and c.category_id = t.category_id and tm.object_id = :package_id order by t.name" {
+ lappend category_choices($tree_id) [list $cat_name $cat_id]
+}
+# We want to set up a filter for each category tree.
+set export_vars [export_vars -form {status_id subprojects_p orderby}]
+set category_select ""
+
+foreach tree_list [db_list_of_lists get_category_trees "select tt.name as tree_name, tt.tree_id from category_tree_map tm, category_tree_translations tt where tm.object_id = :package_id and tm.tree_id = tt.tree_id"] {
+
+ set tree_name [lindex $tree_list 0]
+ set tree_id [lindex $tree_list 1]
+
+ if {![exists_and_not_null category_choices($tree_id)]} {
+ set category_choices($tree_id) [list]
+ }
+
+
+
+ append category_select ""
+}
+
+
template::list::create \
-name projects \
-multirow projects \
@@ -74,11 +119,14 @@
link_url_col item_url
link_html { title "View this project version" }
}
+ customer_name {
+ label "Customer"
+ }
earliest_finish_date {
label "Earliest finish"
}
- estimated_finish_date {
- label "Estimated Finish"
+ latest_finish_date {
+ label "Latest Finish"
}
actual_hours_completed {
label "Hours completed"
@@ -100,22 +148,24 @@
} \
-filters {
status_id {
- label "Status"
+ label "Status"
values {[db_list_of_lists get_status "select description, status_id from pm_project_status order by status_type desc, description"]}
- where_clause {
- s.status_id = :status_id
- }
+ where_clause {s.status_id = :status_id}
}
+ subprojects_p {
+ label Subprojects
+ values {{"No" "f"} {"Yes" ""}}
+ default_value {f}
+ has_default_p 0
+ where_clause {p.parent_id = :root_folder}
+ }
category_id {
- label "Category"
- values {$category_choices}
- where_clause {
- om.category_id = :category_id
- }
+ label Categories
+ where_clause {c.category_id = [join [value_if_exists category_id] ","]}
}
} \
-orderby {
- default_value category_id,asc
+ default_value project_name,asc
project_name {
label "Project name"
orderby_desc "upper(p.title) desc"
Index: openacs-4/contrib/packages/project-manager/www/one-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one-postgresql.xql,v
diff -u -r1.20 -r1.21
--- openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.20
+++ openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.21
@@ -86,10 +86,12 @@
t.title,
to_char(t.end_date,'YYYY-MM-DD HH24:MI') as end_date,
to_char(t.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start,
+ to_char(t.earliest_start,'J') as earliest_start_j,
to_char(t.earliest_finish,'YYYY-MM-DD HH24:MI') as earliest_finish,
to_char(t.latest_start,'YYYY-MM-DD HH24:MI') as latest_start,
+ to_char(t.latest_start,'J') as latest_start_j,
+ to_char(current_date,'J') as today_j,
to_char(t.latest_finish,'YYYY-MM-DD HH24:MI') as latest_finish,
- to_char(t.latest_start-t.earliest_start,'DD') || ' days' as slack_time,
u.first_names,
u.last_name,
t.percent_complete,
@@ -100,11 +102,10 @@
t.estimated_hours_work_max,
t.actual_hours_worked
FROM
- (select * from pm_tasks_revisionsx LEFT JOIN pm_task_assignment ON item_id = task_id) t, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id, all_users u
+ (select * from pm_tasks_revisionsx LEFT JOIN pm_task_assignment ON item_id = task_id) t LEFT JOIN all_users u ON t.party_id = u.party_id, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id
WHERE
t.parent_id = :project_item_id and
- t.revision_id = i.live_revision and
- t.party_id = u.party_id
+ t.revision_id = i.live_revision
[template::list::orderby_clause -name tasks -orderby]
@@ -147,4 +148,9 @@
+
+
+
+
+
Index: openacs-4/contrib/packages/project-manager/www/one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.adp,v
diff -u -r1.28 -r1.29
--- openacs-4/contrib/packages/project-manager/www/one.adp 11 Dec 2003 21:39:44 -0000 1.28
+++ openacs-4/contrib/packages/project-manager/www/one.adp 26 Jan 2004 15:39:40 -0000 1.29
@@ -85,11 +85,6 @@
-
Estimated finish
-
@project.estimated_finish_date@
-
-
-
Latest finish
@project.latest_finish_date@
@@ -128,7 +123,18 @@
+
+
+
+
Project information
+
+
+
+
+
+
+
Add subproject
Index: openacs-4/contrib/packages/project-manager/www/one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.tcl,v
diff -u -r1.27 -r1.28
--- openacs-4/contrib/packages/project-manager/www/one.tcl 11 Dec 2003 21:39:44 -0000 1.27
+++ openacs-4/contrib/packages/project-manager/www/one.tcl 26 Jan 2004 15:39:40 -0000 1.28
@@ -37,12 +37,14 @@
write_p:onevalue
create_p:onevalue
versions:multirow
+ custom:multirow
parent_task_id:onevalue
task_type:onevalue
project_id:onevalue
use_goal_p:onevalue
use_project_code_p:onevalue
use_uncertain_completion_times_P:onevalue
+ use_project_customizations_p:onevalue
} -validate {
project_item_id_exists {
if {![exists_and_not_null project_item_id]} {
@@ -56,6 +58,8 @@
}
}
+set original_project_id $project_id
+
# --------------------------------------------------------------- #
# the unique identifier for this package
@@ -68,6 +72,7 @@
set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"]
set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"]
set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"]
+set use_project_customizations_p [parameter::get -parameter "UseProjectCustomizationsP" -default "0"]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
@@ -109,34 +114,29 @@
set work_display_template "@tasks.estimated_hours_work@ h"
}
+set process_link "process-use?project_item_id=$project_item_id"
+
template::list::create \
-name tasks \
-multirow tasks \
-key task_id \
-elements {
+ task_id {
+ label "ID"
+ }
title {
label "Subject"
display_col title
- link_url_col item_url
- link_html { title "View this task" }
display_template {
- @tasks.title@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ @tasks.title@
}
}
+ parent_task_id {
+ label "Dep"
+ display_template {
+ @tasks.parent_task_id@
+ }
+ }
slack_time {
label "Slack"
display_template "@tasks.slack_time@"
@@ -167,7 +167,7 @@
}
} \
- -actions [list "Use process" [export_vars -base process-use {project_item_id}] "Use a process"] \
+ -actions [list "Use process" $process_link "Use a process" "Projects" "index" "View list of tasks" "Tasks" "tasks" "View tasks for all projects" "Processes" "processes" "View and use processes" "Admin" "admin/" "Administration pages"]\
-bulk_actions {
"Edit" "task-add-edit" "Edit tasks"
} \
@@ -190,7 +190,6 @@
earliest_start {orderby earliest_start}
earliest_finish {orderby earliest_finish}
latest_start {orderby latest_start}
- slack_time {orderby slack_time}
latest_finish {orderby latest_finish}
default_value latest_start,asc
} \
@@ -199,14 +198,25 @@
}
-db_multirow -extend { item_url earliest_start_pretty earliest_finish_pretty latest_start_pretty latest_finish_pretty} tasks project_tasks_query {
+db_multirow -extend { item_url earliest_start_pretty earliest_finish_pretty latest_start_pretty latest_finish_pretty slack_time} tasks project_tasks_query {
} {
set item_url [export_vars -base "task-one" { revision_id task_id}]
set earliest_start_pretty [lc_time_fmt $earliest_start "%x"]
set earliest_finish_pretty [lc_time_fmt $earliest_finish "%x"]
set latest_start_pretty [lc_time_fmt $latest_start "%x"]
set latest_finish_pretty [lc_time_fmt $latest_finish "%x"]
+
+ if {[exists_and_not_null earliest_start_j]} {
+ if {$earliest_start_j < $today_j} {
+ set slack_time "[expr $latest_start_j - $today_j] days"
+ } else {
+ set slack_time "[expr $latest_start_j - $earliest_start_j] days"
+ }
+ } else {
+ set slack_time "n/a"
+ }
+
}
@@ -344,7 +354,15 @@
}
+# -------------------------CUSTOMIZATIONS--------------------------
+# If there are customizations, put them in a multirow called custom
+# -----------------------------------------------------------------
-ad_return_template
+db_1row custom_query { } -column_array custom
+# end of customizations
+
+
+
+ad_return_template
# ------------------------- END OF FILE ------------------------- #
Index: openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit-postgresql.xql,v
diff -u -r1.12 -r1.13
--- openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.12
+++ openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.13
@@ -105,4 +105,52 @@
+
+
+ select
+ short_name,
+ description
+ FROM
+ pm_task_dependency_types
+ ORDER BY
+ short_name
+
+
+
+
+
+ select
+ r.item_id,
+ r.title as task_title
+ FROM
+ pm_tasks_revisionsx r,
+ cr_items i
+ WHERE
+ r.parent_id = :project_item_id and
+ r.revision_id = i.live_revision
+ ORDER BY
+ upper(r.title)
+
+
+
+
+
+ INSERT INTO pm_task_dependency
+ (dependency_id, task_id, parent_task_id, dependency_type)
+ VALUES
+ (:dependency_id, :this_task_id, :parent_task_id, :p_dep_type)
+
+
+
+
+
+ select
+ item_id
+ FROM
+ pm_tasks_revisionsx
+ WHERE
+ revision_id = :this_revision_id
+
+
+
Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.adp,v
diff -u -r1.10 -r1.11
--- openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 10 Nov 2003 19:34:54 -0000 1.10
+++ openacs-4/contrib/packages/project-manager/www/task-add-edit.adp 26 Jan 2004 15:39:40 -0000 1.11
@@ -18,11 +18,19 @@
-
@num.rownum@
+
#@num.rownum@
-
Subject:*
+
Subject:*
+
+ Error
+
+
- Description:
+ Description:
+
+ Error
+
+
@@ -34,37 +42,71 @@
Min:
-
hrs
-
-
schedule constrained by other @task_term_lower@
+
hrs
+
+
+ Error
+
+
Max:
-
hrs
+
hrs
+
+
+ Error
+
+
+
-
hrs
-
-
depends on another @task_term_lower@
+
hrs
+
+
+ Error
+
+
+
+
+
+
+ You must enter a number here (make your best guess)
+
-
+
- Deadline:
+
+ Deadline:
-
+
+ Error
-
-
- You may optionally enter a hard deadline, otherwise it is computed
+
+
+ You may optionally enter a hard deadline
+
+
+ Dependency:
-
+
+ Error
+
+ Error
+
+
+
+ You may enter a @task_term_lower@ that needs to be completed before this @task_term_lower@
Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.tcl,v
diff -u -r1.24 -r1.25
--- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.24
+++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 26 Jan 2004 15:39:40 -0000 1.25
@@ -1,10 +1,14 @@
-ns_log notice task add edit page
-set mypage [ns_getform]
-if {[string equal "" $mypage]} {
- ns_log notice no form was submitted on my page
-} else {
- ns_log notice the following form was submitted on my page
- ns_set print $mypage
+set debug 1
+
+if {[string equal $debug 1]} {
+ ns_log notice task add edit page
+ set mypage [ns_getform]
+ if {[string equal "" $mypage]} {
+ ns_log notice no form was submitted on my page
+ } else {
+ ns_log notice the following form was submitted on my page
+ ns_set print $mypage
+ }
}
ad_page_contract {
@@ -20,7 +24,7 @@
@return num num is used as a multirow datasource to iterate over the ad_form elements
@return edit_p if t then we are editing. Used to show different portions of the form
- @param process_task_ids Specifies what process task ids were used if a process were used. We pass this on to future pages to determine things such as dependencies and assignments
+ @param process_task_ids Specifies what process task ids were used if a process were used. We pass this on to future pages to determine things such as assignments
@param project_item_id Specifies which project this task is associated with
@param project_id Specifies which project revision this task is associated with
@param number The number of Tasks to create
@@ -30,7 +34,6 @@
@param my_key if set, then ad_form knows that this is an edit
@param task_title
@param process_id The process we're using to create this task
- @param use_dependency_p Whether or not to use dependencies with this task
@param use_uncertain_completion_times_p Whether or not to use PERT-style completion time uncertainty 1 = yes
} {
@@ -40,11 +43,10 @@
project_id:integer,optional
{number:integer "1"}
task_revision_id:integer,optional
- task_id:integer,multiple,optional
+ {task_id ""}
task_item_id:array,optional
task_title:array,optional
{process_id:integer ""}
- use_dependency_p:array,optional
description:array,optional
name:array,optional
end_date:array,optional
@@ -53,6 +55,8 @@
estimated_hours_work:array,optional
estimated_hours_work_min:array,optional
estimated_hours_work_max:array,optional
+ dependency_type:array,optional
+ dependency_task_id:array,optional
} -properties {
@@ -120,13 +124,20 @@
set number [llength $process_tasks]
}
+# we use this to get around the lack of a hidden multiple in ad_form
+set task_id_pass [string map {"-" " "} $task_id]
+set task_id $task_id_pass
if {![ad_form_new_p -key task_id]} {
+ # Editing!
# -----------------------------------------------------
# create a multirow we can use to iterate
# we also set the number variable for future use
# -----------------------------------------------------
template::multirow create num number
+
+ # TODO:get task IDS
+ #
set i 1
set number 0
@@ -202,6 +213,8 @@
permission::require_permission -party_id $user_id -object_id $package_id -privilege create
}
+# we use this to pass through the task_ids
+set task_id_pass [string map {" " "-"} $task_id]
ad_form -name add_edit -form {
my_key:key(acs_object_id_seq)
@@ -210,6 +223,10 @@
{value $project_item_id}
}
+ {task_id:text(hidden)
+ {value $task_id_pass}
+ }
+
{project_id:text(hidden)
{value $project_id}
}
@@ -241,12 +258,6 @@
set actual_hours_worked_arr($i) $actual_hours_worked
set task_item_id_arr($i) [lindex $task_id [expr $i - 1]]
- if {[exists_and_not_null parent_task_id]} {
- set use_dependency_arr($i) [list checked ""]
- } else {
- set use_dependency_arr($i) ""
- }
-
# we are not using a process
set process_task_id_arr($i) ""
@@ -284,10 +295,9 @@
for {set i 1} {$i <= $number} {incr i} {
set task_title_arr($i) ""
set description_arr($i) ""
- set estimated_hours_arr($i) ""
- set estimated_hours_min_arr($i) ""
- set estimated_hours_max_arr($i) ""
- set use_dependency_arr($i) ""
+ set estimated_hours_arr($i) "0"
+ set estimated_hours_min_arr($i) "0"
+ set estimated_hours_max_arr($i) "0"
set parent_arr($i) ""
set end_date_arr($i) ""
set percent_complete_arr($i) 0
@@ -304,12 +314,6 @@
set estimated_hours_arr($i) $estimated_hours_work_v($ptask_id)
set estimated_hours_min_arr($i) $estimated_hours_work_min_v($ptask_id)
set estimated_hours_max_arr($i) $estimated_hours_work_max_v($ptask_id)
-
- if {[exists_and_not_null dependency_v($ptask_id)]} {
- set use_dependency_arr($i) [list checked ""]
- } else {
- set use_dependency_arr($i) ""
- }
# keeps track of what process_task_id this was based on
# so we can later get info on what assignments the process
@@ -340,17 +344,55 @@
}
}
+# get dependency types
+set options [list]
+db_foreach get_dependency_types { } -column_array dependencies {
+ lappend options "{\"$dependencies(description)\" $dependencies(short_name)}"
+}
+
+# get tasks this task can depend on
+
+set dependency_keys [list]
+
+db_foreach get_dependency_tasks { } -column_array dependency_tasks {
+
+ set dependency_options($dependency_tasks(task_title)) $dependency_tasks(item_id)
+ lappend dependency_keys $dependency_tasks(task_title)
+}
+
+set dependency_keys [lsort $dependency_keys]
+
+
+
+
# ----------------------------------------------
# extend the form with all the items that repeat
# ----------------------------------------------
for {set i 1} {$i <= $number} {incr i} {
-
+
+ # ----------------------------------------------------------------
# reading this code, you may wonder why we put the .$i at the end.
# DaveB showed me this trick. It lets you make a multiple out of
# the items by stuffing them in an array. Long live DaveB.
+ # ----------------------------------------------------------------
+ # set up the tasks that can be viewed. Take out the current task.
+ # TODO: add in process defaults
+ set dependency_options_full ""
+ append dependency_options_full "{\"--None--\" \"\"} "
+ # adds in the NEW tasks as options. We have to check later to make sure
+ # the user doesn't enter any loops!
+ for {set j 1} {$j <= $number} {incr j} {
+ if {![string equal $i $j]} {
+ append dependency_options_full "{\"New Task \#$j\" \"num$j\"} "
+ }
+ }
+ foreach key $dependency_keys {
+ append dependency_options_full "{\"$key\" $dependency_options($key)} "
+ }
+
ad_form -extend \
-name add_edit \
-form \
@@ -376,18 +418,24 @@
{value {$description_arr($i)}} \
] \
[list \
- use_dependency_p.$i:text(checkbox) \
- {label "Use dependency"} \
- {options {{"" "on"}}} \
- {html $use_dependency_arr($i)} \
- ] \
- [list \
end_date.$i:date,to_sql(linear_date),optional \
{label "Deadline"} \
{format "MONTH DD YYYY"} \
{value $end_date_arr($i)} \
{help} \
] \
+ [list \
+ dependency_type.$i:text(select),optional \
+ {label \"Dependency type\"} \
+ {options {[join $options " "]}} \
+ {value {finish_before_start}} \
+ ] \
+ [list \
+ dependency_task_id.$i:text(select),optional \
+ {label \"Dependency\"} \
+ {options {$dependency_options_full}} \
+ {help_text {$task_term the dependency is based on}} \
+ ] \
]
if {$use_uncertain_completion_times_p} {
@@ -435,12 +483,9 @@
# --------------------------------------------------------------
# each task we add in returns a task_revision_id
- # we set up two lists, one for tasks that will need dependencies
- # another for tasks that don't
# --------------------------------------------------------------
- set revision_has_dependencies [list]
- set revision_no_dependencies [list]
+ set task_id [list]
for {set i 1} {$i <= $number} {incr i} {
@@ -462,38 +507,112 @@
}
# set up variables, pulling from arrays
- set p_task_title $task_title($i)
- set p_description $description($i)
- set p_work $estimated_hours_work($i)
- set p_work_min $estimated_hours_work_min($i)
- set p_work_max $estimated_hours_work_max($i)
+ set p_task_title $task_title($i)
+ set p_description $description($i)
+ set p_work $estimated_hours_work($i)
+ set p_work_min $estimated_hours_work_min($i)
+ set p_work_max $estimated_hours_work_max($i)
+ set p_dep_type $dependency_type($i)
+ set p_dep_id $dependency_task_id($i)
+ set parent_task_id $p_dep_id
- ns_log Notice "adding task: pii: $project_item_id tt:$p_task_title d:$p_description ed: end_date($i) w:$p_work m:$p_work_min mx:$p_work_max"
+ ns_log Notice "adding task: pii: $project_item_id tt:$p_task_title d:$p_description ed: end_date($i) w:$p_work m:$p_work_min mx:$p_work_max dep_type:$p_dep_type dep_id:$p_dep_id"
+ # add in the new task
set this_revision_id [db_exec_plsql new_task_item { *SQL* }]
+ set this_task_id [db_string get_task_item_id {}]
+ set dep_task_id($i) $this_task_id
- if {[info exists use_dependency_p($i)] && [string equal $use_dependency_p($i) "on"]} {
- lappend revision_has_dependencies $this_revision_id
- } else {
- lappend revision_no_dependencies $this_revision_id
+ if {[exists_and_not_null p_dep_id]} {
+
+ # if the p_dep_id contains num at the beginning, then
+ # the task is supposed to depend on other tasks that
+ # are currently being created. We have to do all sorts of
+ # things like make sure there are no loops, etc..
+ if {[regexp {num.*} $p_dep_id]} {
+ regexp {num(.*)} $p_dep_id match d_parent
+
+ # dep_parent tracks who is parent of what
+ set dep_parent($i) $d_parent
+ set dep_type($i) $p_dep_type
+ lappend parent_new_task $i
+ # we wait until after all the tasks have been created to create these
+ # dependencies
+ } else {
+
+ # add in the new dependency
+ set dependency_id [db_nextval pm_task_dependency_seq]
+ db_dml new_dependency { *SQL* }
+ }
}
lappend process_task_id $process_task_ids($i)
+ lappend revisions $this_revision_id
+ lappend task_id $this_task_id
}
+ if {[exists_and_not_null parent_new_task]} {
+ # there are tasks that depend on newly created tasks.
+ # 1. check for loops
+ # 2. if no loops, create dependencies
+
+ # the way we check for a loop is to follow the dependencies
+ # until we get to a task that has already been created.
+ # we make the assumption that the following is true:
+ # starting condition: no tasks are created
+ # when adding a task: no loop is created if you depend on a task already present
+ # therefore, if you add a task without creating a loop in the newly
+ # created tasks, you are safe.
+
+ # we check that the new items don't depend on each other by following them
+ # if they loop more than $number times, then we have a loop
+ set loop_limit $number
+
+ foreach dep_task $parent_new_task {
+
+ set passes_p f
+
+ set my_task $dep_task
+ while {$loop_limit >= 0} {
+
+ if {[exists_and_not_null dep_parent($my_task)]} {
+ set my_task $dep_parent($my_task)
+ } else {
+ set passes_p t
+ break
+ }
+
+ set loop_limit [expr $loop_limit - 1]
+ }
+
+ if {[string equal $passes_p t]} {
+ # add in the new dependency
+ set dependency_id [db_nextval pm_task_dependency_seq]
+ set this_task_id $dep_task_id($dep_task)
+ set parent_task_id $dep_task_id($dep_parent($dep_task))
+ set p_dep_type $dep_type($dep_task)
+ db_dml new_dependency { *SQL* }
+ } else {
+ ns_log Notice "PM: Adding in dependency failed for $dep_task_id($dep_task) due to looping"
+ }
+
+ }
+
+
+
+ }
+
+ ns_log Notice "Project_item_id $project_item_id"
+ project_manager::project::compute_parent_status $project_item_id
+
} -edit_data {
ns_log Notice "edit_data"
# --------------------------------------------------------------
# each task we edit returns a task_revision_id
- # we set up two lists, one for tasks that will need dependencies
- # another for tasks that don't
# --------------------------------------------------------------
- set revision_has_dependencies [list]
- set revision_no_dependencies [list]
-
for {set i 1} {$i <= $number} {incr i} {
if {![exists_and_not_null estimated_hours_work($i)]} {
@@ -527,14 +646,13 @@
ns_log Notice "Added in $this_revision_id"
+ lappend revisions $this_revision_id
+
+ ns_log Notice "in new: task_id $task_id"
+
# BUG: we need to make sure we take care of deleting dependencies
# if unchecked, adding dependencies, etc..
- if {[info exists use_dependency_p($i)] && [string equal $use_dependency_p($i) "t"]} {
- lappend revision_has_dependencies $this_revision_id
- } else {
- lappend revision_no_dependencies $this_revision_id
- }
}
project_manager::project::compute_parent_status $project_item_id
@@ -543,12 +661,9 @@
} -after_submit {
- # now go through the use_dependency_p items. For each that is checked,
- # we add that to a list of ids that we pass to the dependency-add-edit
- # page.
+ ns_log Notice "TASK_ID: $task_id"
-
- ad_returnredirect "task-assign-add-edit?[export_vars -url {revision_has_dependencies:multiple revision_no_dependencies:multiple project_item_id process_task_id:multiple}]"
+ ad_returnredirect "task-assign-add-edit?[export_vars -url {project_item_id process_task_id:multiple revisions:multiple task_id:multiple}]"
ad_script_abort
}
Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit-postgresql.xql,v
diff -u -r1.4 -r1.5
--- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql 10 Oct 2003 22:51:04 -0000 1.4
+++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.5
@@ -1,22 +1,34 @@
-
+
select
+ title as one_line,
+ description,
item_id
FROM
pm_tasks_revisionsx t
WHERE
revision_id in ([join $revisions ","])
+ ORDER BY
+ item_id
-
+
select
title as one_line,
description,
- item_id
+ item_id,
+ to_char(end_date, 'YYYY-MM-DD HH24:MI:SS') as end_date_ansi,
+ estimated_hours_work,
+ estimated_hours_work_min,
+ estimated_hours_work_max,
+ to_char(earliest_start, 'YYYY-MM-DD HH24:MI:SS') as earliest_start_ansi,
+ to_char(earliest_finish, 'YYYY-MM-DD HH24:MI:SS') as earliest_finish_ansi,
+ to_char(latest_start, 'YYYY-MM-DD HH24:MI:SS') as latest_start_ansi,
+ to_char(latest_finish, 'YYYY-MM-DD HH24:MI:SS') as latest_finish_ansi
FROM
pm_tasks_revisionsx t
WHERE
@@ -104,4 +116,18 @@
+
+
+ select
+ title
+ FROM
+ pm_projects p, cr_revisions r, cr_items i
+ WHERE
+ r.item_id = :project_item_id and
+ i.item_id = r.item_id and
+ p.project_id = i.live_revision and
+ p.project_id = r.revision_id
+
+
+
Index: openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-assign-add-edit.tcl,v
diff -u -r1.6 -r1.7
--- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.6
+++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 26 Jan 2004 15:39:40 -0000 1.7
@@ -28,9 +28,8 @@
my_key:integer,optional
{process_task_id:multiple,optional ""}
- revision_has_dependencies:multiple,optional
- revision_no_dependencies:multiple,optional
task_id:multiple,optional
+ revisions:multiple
{project_item_id:integer ""}
role_id:array,optional
party_id:array,optional
@@ -49,42 +48,14 @@
# --------------------------------------------------------------- #
-if {![exists_and_not_null revision_no_dependencies]} {
- set revision_no_dependencies ""
-}
-
-if {![exists_and_not_null revision_has_dependencies]} {
- set revision_has_dependencies ""
-}
-
-ns_log Notice "Before hack, revision_no_dependencies: $revision_no_dependencies revision_has_dependencies: $revision_has_dependencies"
-
-
# hack to get around lack of multiple hidden support with ad_form
-set process_task_id_pass [string map {"-" " "} $process_task_id]
-set process_task_id $process_task_id_pass
+set process_task_id [string map {"-" " "} $process_task_id]
+set revisions [string map {"-" " "} $revisions]
+set task_id [string map {"-" " "} $task_id]
-set task_revision_dep_pass $revision_has_dependencies
-set task_revision_dep_pass [string map {"-" " "} $task_revision_dep_pass]
-set revision_has_dependencies $task_revision_dep_pass
-
-set task_revision_nodep_pass $revision_no_dependencies
-set task_revision_nodep_pass [string map {"-" " "} $task_revision_nodep_pass]
-set revision_no_dependencies $task_revision_nodep_pass
-
-ns_log Notice " After hack, revision_no_dependencies: $revision_no_dependencies revision_has_dependencies: $revision_has_dependencies"
-
-
-set revisions [concat $revision_has_dependencies $revision_no_dependencies]
-
-set task_id [db_list get_task_item_ids { }]
-
-
-
db_multirow tasks get_task_info { }
-
# create a multirow we can use to iterate
template::multirow create num number
@@ -100,6 +71,7 @@
set project_term [parameter::get -parameter "ProjectName" -default "Project"]
set task_term [parameter::get -parameter "TaskName" -default "Task"]
set task_term_lower [parameter::get -parameter "taskname" -default "task"]
+set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "0"]
# the unique identifier for this package
set package_id [ad_conn package_id]
@@ -119,27 +91,22 @@
set roles_lofl "{{--Select Role--} {}} "
append roles_lofl [db_list_of_lists get_roles { }]
-
set process_task_id_pass [string map {" " "-"} $process_task_id]
+set revisions_pass [string map {" " "-"} $revisions]
+set task_id_pass [string map {" " "-"} $task_id]
-set task_revision_dep_pass $revision_has_dependencies
-set task_revision_dep_pass [string map {" " "-"} $task_revision_dep_pass]
-
-set task_revision_nodep_pass $revision_no_dependencies
-set task_revision_nodep_pass [string map {" " "-"} $task_revision_nodep_pass]
-
ad_form -name add_edit -form {
my_key:key(acs_object_id_seq)
{process_task_id:text(hidden)
{value $process_task_id_pass}}
- {revision_has_dependencies:text(hidden)
- {value $task_revision_dep_pass}}
+ {revisions:text(hidden)
+ {value $revisions_pass}}
- {revision_no_dependencies:text(hidden)
- {value $task_revision_nodep_pass}}
+ {task_id:text(hidden)
+ {value $task_id_pass}}
{project_item_id:text(hidden)
{value $project_item_id}}
@@ -156,6 +123,24 @@
#role_id
#party_id
+ set process_task_id [string map {"-" " "} $process_task_id]
+ set revisions [string map {"-" " "} $revisions]
+ set task_id [string map {"-" " "} $task_id]
+
+ db_foreach get_more_task_info {} {
+ set one_lines($item_id) $one_line
+ set descriptions($item_id) $description
+ set end_dates_pretty($item_id) [lc_time_fmt $end_date_ansi "%x"]
+ set est_hours_work($item_id) $estimated_hours_work
+ set est_hours_work_min($item_id) $estimated_hours_work_min
+ set est_hours_work_max($item_id) $estimated_hours_work_max
+ set earliest_starts($item_id) [lc_time_fmt $earliest_start_ansi "%x"]
+ set earliest_finishes($item_id) [lc_time_fmt $earliest_finish_ansi "%x"]
+ set latest_starts($item_id) [lc_time_fmt $latest_start_ansi "%x"]
+ set latest_finishes($item_id) [lc_time_fmt $latest_finish_ansi "%x"]
+
+ }
+
if {[info exists role_id]} {
set searchToken [array startsearch role_id]
@@ -210,6 +195,15 @@
db_dml delete_assignments { }
+ set project_name [db_string get_project_name { } -default "N/A"]
+
+ # set up role names
+ foreach r [db_list_of_lists get_roles { }] {
+ set des [lindex $r 0]
+ set val [lindex $r 1]
+ set role_oneline($val) $des
+ }
+
foreach pl $party_list {
regexp {(.*),(.*)} $pl match task_id_v num_value
@@ -220,6 +214,57 @@
ns_log Notice "tid: $t_id rid: $r_id pid: $p_id"
+ set subject "New Task \#$t_id: $one_lines($t_id)"
+
+ if {[string equal $use_uncertain_completion_times_p 1]} {
+ set estimated_work "
+Hrs work (min): $est_hours_work_min($t_id)
+Hrs work (max): $est_hours_work_max($t_id)"
+ } else {
+ set estimated_work "
+Hrs work: $est_hours_work($t_id)"
+
+}
+ set notification_text "-------------
+Task overview
+-------------
+Task ID: \#$t_id
+Description: $one_lines($t_id)
+Project: $project_name
+Your role: $role_oneline($r_id)
+
+---------------
+Estimated work:
+---------------$estimated_work
+
+------
+Dates:
+------
+Deadline: [ad_decode $end_dates_pretty($t_id) "" "None" $end_dates_pretty($t_id)]
+Earliest start: $earliest_starts($item_id)
+Earliest finish: $earliest_finishes($item_id)
+Latest start: $latest_starts($item_id)
+Latest finish $latest_finishes($item_id)
+
+-----------
+Description
+-----------
+$descriptions($t_id)"
+
+ notification::request::new \
+ -type_id [notification::type::get_type_id -short_name pm_task_notif] \
+ -object_id $t_id \
+ -user_id $p_id \
+ -interval_id [notification::interval::get_id_from_name -name instant] \
+ -delivery_method_id [notification::delivery::get_id -short_name email]
+
+ notification::new \
+ -type_id [notification::type::get_type_id -short_name pm_task_notif] \
+ -object_id $t_id \
+ -response_id $user_id \
+ -notif_subject $subject \
+ -notif_text $notification_text
+
db_dml add_assignment { }
}
@@ -301,15 +346,7 @@
} -after_submit {
- # for some reason this hack is necessary here
-
- set task_revision_dep_pass $revision_has_dependencies
- set task_revision_dep_pass [string map {"-" " "} $task_revision_dep_pass]
- set revision_has_dependencies $task_revision_dep_pass
-
- set task_revisions $revision_has_dependencies
-
- ad_returnredirect "dependency-add-edit?[export_vars -url {task_revisions:multiple project_item_id process_task_id:multiple}]"
+ ad_returnredirect "one?project_item_id=$project_item_id"
ad_script_abort
}
@@ -343,7 +380,7 @@
set users_length [string length $users_values]
set roles_length [string length $roles_values]
- for {set i 0} {$i <= 10} {incr i} {
+ for {set i 0} {$i <= 5} {incr i} {
if {$i < $users_length && $i < $roles_length} {
set uv [lindex $users_values $i]
Index: openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one-postgresql.xql,v
diff -u -r1.16 -r1.17
--- openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 3 Oct 2003 22:21:45 -0000 1.16
+++ openacs-4/contrib/packages/project-manager/www/task-one-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.17
@@ -43,10 +43,12 @@
t.description,
to_char(t.end_date,'Mon DD ''YY') as end_date,
to_char(t.earliest_start,'Mon DD ''YY') as earliest_start,
+ to_char(t.earliest_start,'J') as earliest_start_j,
to_char(t.earliest_finish,'Mon DD ''YY') as earliest_finish,
to_char(t.latest_start,'Mon DD ''YY') as latest_start,
+ to_char(t.latest_start,'J') as latest_start_j,
to_char(t.latest_finish,'Mon DD ''YY') as latest_finish,
- to_char(t.latest_start-t.earliest_start,'DD') || ' days' as slack_time,
+ to_char(current_date,'J') as today_j,
t.estimated_hours_work,
t.estimated_hours_work_min,
t.estimated_hours_work_max,
Index: openacs-4/contrib/packages/project-manager/www/task-one.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.adp,v
diff -u -r1.20 -r1.21
--- openacs-4/contrib/packages/project-manager/www/task-one.adp 11 Dec 2003 21:39:44 -0000 1.20
+++ openacs-4/contrib/packages/project-manager/www/task-one.adp 26 Jan 2004 15:39:40 -0000 1.21
@@ -12,7 +12,9 @@
-
+
+
+
@task_term@ #@item_id@: @task_info.task_title@
Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v
diff -u -r1.22 -r1.23
--- openacs-4/contrib/packages/project-manager/www/task-one.tcl 10 Nov 2003 19:34:54 -0000 1.22
+++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 26 Jan 2004 15:39:40 -0000 1.23
@@ -92,6 +92,16 @@
db_1row task_query { } -column_array task_info
set task_info(description) [ad_text_to_html -- $task_info(description)]
+if {[exists_and_not_null task_info(earliest_start_j)]} {
+ if {$task_info(earliest_start_j) < $task_info(today_j)} {
+ set task_info(slack_time) "[expr $task_info(latest_start_j) - $task_info(today_j)] days"
+ } else {
+ set task_info(slack_time) "[expr $task_info(latest_start_j) - $task_info(earliest_start_j)] days"
+ }
+} else {
+ set task_info(slack_time) "n/a"
+}
+
# Task Revisions, using list-builder ---------------------------------
template::list::create \
Index: openacs-4/contrib/packages/project-manager/www/task-select-project.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-select-project.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/project-manager/www/task-select-project.tcl 6 Oct 2003 22:57:28 -0000 1.1
+++ openacs-4/contrib/packages/project-manager/www/task-select-project.tcl 26 Jan 2004 15:39:40 -0000 1.2
@@ -41,8 +41,12 @@
set title "Edit a $task_term_lower"
-set context_bar [ad_context_bar [list "processes" "Processes"] "Use"]
+if {[exists_and_not_null process_id]} {
+ set context_bar [ad_context_bar [list "processes" "Processes"] "Use"]
+} else {
+ set context_bar [ad_context_bar [list "tasks" "Tasks"] "Select Project"]
+}
# need to change this to show all the projects you're on by
# default, and then give you the option of selecting all projects
Index: openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.2
+++ openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql 26 Jan 2004 15:39:40 -0000 1.3
@@ -23,11 +23,16 @@
p.first_names || ' ' || p.last_name as full_name,
r.one_line as role
FROM
- pm_tasks ts, pm_tasks_revisionsx t LEFT JOIN pm_task_assignment ta on t.item_id = ta.task_id, persons p, pm_roles r
+ pm_tasks ts,
+ pm_tasks_revisionsx t
+ LEFT JOIN pm_task_assignment ta
+ ON t.item_id = ta.task_id
+ LEFT JOIN persons p
+ ON ta.party_id = p.person_id,
+ pm_roles r
WHERE
ts.task_id = t.item_id and
- ta.party_id = p.person_id and
- ta.role_id = r.role_id
+ ta.role_id = r.role_id
[template::list::filter_where_clauses -and -name tasks]
[template::list::orderby_clause -orderby -name tasks]
Index: openacs-4/contrib/packages/project-manager/www/tasks.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/project-manager/www/tasks.adp 11 Dec 2003 21:39:44 -0000 1.2
+++ openacs-4/contrib/packages/project-manager/www/tasks.adp 26 Jan 2004 15:39:40 -0000 1.3
@@ -11,6 +11,11 @@
+
+
Index: openacs-4/contrib/packages/project-manager/www/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/project-manager/www/tasks.tcl 11 Dec 2003 21:39:44 -0000 1.2
+++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 26 Jan 2004 15:39:40 -0000 1.3
@@ -17,6 +17,7 @@
} {
orderby:optional
party_id:optional
+ {searchterm ""}
} -properties {
task_term:onevalue
context_bar:onevalue
@@ -39,9 +40,9 @@
set user_id [ad_maybe_redirect_for_registration]
# by default, show this user's tasks
-if {![exists_and_not_null party_id]} {
- set party_id $user_id
-}
+#if {![exists_and_not_null party_id]} {
+# set party_id $user_id
+#}
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
@@ -83,18 +84,24 @@
-actions {
"Projects" "index" "View list of tasks"
"Processes" "processes" "View and use processes"
- "Add task" "task-add-edit" "Add a task"
+ "Add task" "task-select-project" "Add a task"
"Admin" "admin/" "Administration pages"
} \
-main_class {
narrow
} \
-filters {
+ searchterm {
+ label "Search"
+ where_clause {
+ t.title ilike '%:searchterm%'
+ }
+ }
party_id {
label "People"
values {[db_list_of_lists get_people "select first_names || ' ' || last_name, u.party_id from all_users u, pm_task_assignment a where u.party_id = a.party_id order by upper(first_names), upper(last_name)"]}
where_clause {
- ta.party_id = :party_id
+ t.party_id = :party_id
}
}
} \
Index: openacs-4/contrib/packages/survey/survey.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/Attic/survey.info,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/survey/survey.info 8 Oct 2003 15:54:51 -0000 1.2
+++ openacs-4/contrib/packages/survey/survey.info 26 Jan 2004 15:39:40 -0000 1.3
@@ -7,15 +7,15 @@
ff
-
+ Dave BauerLuke PondMalte SussdorffNew version of survey package for dotLRN/OpenACS 5.0dotLRN
- New version of survey package for dotLRN/OpenACS 5.0
+ New version of survey package for dotLRN/OpenACS 5.0. This version supports branching and sections, uses ad_form templates but so far is not internationalized. Upgrade scripts are available for Oracle only (at the moment).
-
+
Index: openacs-4/contrib/packages/survey/acs-templating/widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/acs-templating/Attic/widget-procs.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/acs-templating/widget-procs.tcl 23 Oct 2003 06:37:42 -0000 1.1
+++ openacs-4/contrib/packages/survey/acs-templating/widget-procs.tcl 26 Jan 2004 15:39:40 -0000 1.2
@@ -20,6 +20,15 @@
set count 0
foreach option $options {
if {$count == 0} {
+ # answer descriptions in a list: {{desc1 no_of_answers} {desc2 no_of_answers} ...}
+ append output "
"
Index: openacs-4/contrib/packages/survey/sql/oracle/survey-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/oracle/Attic/survey-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/sql/oracle/survey-create.sql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/sql/oracle/survey-create.sql 26 Jan 2004 15:39:41 -0000 1.2
@@ -291,8 +291,16 @@
references survey_predefined_questions
);
+create table survey_block_sections (
+ block_section_id integer primary key
+ section_id integer
+ constraint survey_b_q_section_id_fk
+ references survey_sections,
+ answer_description varchar(400)
+);
+
create table survey_block_questions (
- block_section_id integer,
+ block_section_id references survey_block_sections,
section_id integer
constraint survey_b_q_section_id_fk
references survey_sections,
Index: openacs-4/contrib/packages/survey/sql/oracle/survey-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/oracle/Attic/survey-package-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/survey/sql/oracle/survey-package-create.sql 30 Sep 2003 12:10:01 -0000 1.2
+++ openacs-4/contrib/packages/survey/sql/oracle/survey-package-create.sql 26 Jan 2004 15:39:41 -0000 1.3
@@ -229,7 +229,8 @@
v_response_row survey_responses%ROWTYPE;
v_section_row survey_sections%ROWTYPE;
begin
-
+ delete from survey_branches where section_id in (select section_id from survey_sections where survey_id=remove.survey_id);
+ delete from survey_conditions where question_id in (select question_id from survey_questions q, survey_sections s where s.section_id=q.section_id and s.survey_id=remove.survey_id);
for v_response_row in (select response_id
from survey_responses
where survey_id=remove.survey_id
@@ -309,6 +310,8 @@
) is
v_question_row survey_questions%ROWTYPE;
begin
+ delete from survey_branches where section_id=remove.section_id;
+ delete from survey_conditions where question_id in (select question_id from survey_questions where section_id=remove.section_id);
for v_question_row in (select question_id
from survey_questions
where section_id=remove.section_id) loop
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/contrib/packages/survey/sql/oracle/upgrade/survey-upgrade-0.3d1-0.4.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/contrib/packages/survey/sql/postgresql/survey-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/postgresql/Attic/survey-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/sql/postgresql/survey-create.sql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/sql/postgresql/survey-create.sql 26 Jan 2004 15:39:41 -0000 1.2
@@ -311,11 +311,16 @@
create index survey_q_sort_order on survey_questions(sort_order);
create index survey_q_active_p on survey_questions(active_p);
+create table survey_block_sections (
+ block_section_id integer primary key
+ section_id integer
+ constraint survey_b_q_section_id_fk
+ references survey_sections,
+ answer_description varchar(400)
+);
+
create table survey_block_questions (
- block_section_id integer,
- section_id integer
- constraint survey_b_q_section_id_fk
- references survey_sections,
+ block_section_id references survey_block_sections,
choice_id integer
constraint survey_b_q_choice_id_nn
not null,
Index: openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/sql/postgresql/Attic/survey-package-create.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/sql/postgresql/survey-package-create.sql 26 Jan 2004 15:39:41 -0000 1.2
@@ -131,6 +131,8 @@
remove__section_id alias for $1;
v_question_row survey_questions%ROWTYPE;
begin
+ delete from survey_branches where section_id=remove.section_id;
+ delete from survey_conditions where question_id in (select question_id from survey_questions where section_id=remove.section_id);
for v_question_row in select question_id
from survey_questions
where section_id=remove__section_id
@@ -326,6 +328,8 @@
remove__response_id alias for $1;
v_response_row survey_responses%ROWTYPE;
begin
+ delete from survey_branches where section_id in (select section_id from survey_sections where survey_id=remove.survey_id);
+ delete from survey_conditions where question_id in (select question_id from survey_questions q, survey_sections s where s.section_id=q.section_id and s.survey_id=remove.survey_id);
for v_response_row in select response_id from survey_responses
where initial_response_id=remove__response_id
loop
Index: openacs-4/contrib/packages/survey/tcl/survey-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/tcl/Attic/survey-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 11 Dec 2003 21:39:44 -0000 1.2
+++ openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 26 Jan 2004 15:39:41 -0000 1.3
@@ -120,6 +120,7 @@
# for this, the "options"-parameter has to be built, which is somewhat complicated
set explanation ""
set options [list]
+ lappend options [db_list_of_lists answer_descriptions ""]
set all_choices [list]
set old_block 0
db_foreach block_choices "" {
@@ -189,22 +190,26 @@
set user_value ""
- db_1row predefined_question_id ""
if {$predefined_question_id!=[db_null]} {
# question is a predefined question. If it has already been answered, get the last response value from the db
# if it is a predefined question with action_type="db" get the value from the db instead.
db_1row predefined_question_data ""
if {$action_type == "db"} {
# select preselected value from the db
set user_id [ad_get_user_id]
- set user_value [db_string ignore "select $column_name from $table_name where $key_name=:user_id"]
- set choice_id $user_value
- set boolean_answer $user_value
- set clob_answer $user_value
- set number_answer $user_value
- set varchar_answer $user_value
- set date_answer $user_value
- set attachment_answer $user_value
+ # We have to check for date
+ if {$abstract_data_type == "date"} {
+ set user_value [db_string ignore "select to_char($column_name,'YYYY MM DD') from $table_name where $key_name=:user_id" -default ""]
+ set date_answer $user_value
+ } else {
+ set user_value [db_string ignore "select $column_name from $table_name where $key_name=:user_id" -default ""]
+ set choice_id $user_value
+ set boolean_answer $user_value
+ set clob_answer $user_value
+ set number_answer $user_value
+ set varchar_answer $user_value
+ set attachment_answer $user_value
+ }
} else {
# select preselected value from latest response
set user_id [ad_get_user_id]
@@ -399,7 +404,7 @@
-datatype text \
-widget checkbox \
-label "$question_text" \
- -value $user_value \
+ -values $user_value \
-options $options \
-required_p $required_p
}
Index: openacs-4/contrib/packages/survey/tcl/survey-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/tcl/Attic/survey-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/tcl/survey-procs.xql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/tcl/survey-procs.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -54,10 +54,16 @@
+
+
+ select max(answer_description), count(*) from survey_block_Sections bs, survey_block_questions bq where section_id=:section_id and bs.block_section_id=bq.block_section_id group by bs.block_section_id, bq.block_section_id order by bs.block_section_id
+
+
+
- select label,block_section_id from survey_block_questions where section_id=:section_id order by block_section_id,
- sort_order
+ select label,bs.block_section_id from survey_block_questions bq, survey_block_Sections bs where section_id=:section_id and bs.block_section_id=bq.block_section_id order by block_section_id,
+ sort_order
@@ -104,7 +110,8 @@
presentation_options,
presentation_alignment,
creation_user,
- creation_date
+ creation_date,
+ predefined_question_id
from
survey_questions, acs_objects
where
@@ -113,17 +120,9 @@
-
-
-
- select predefined_question_id from survey_questions where
- question_id=:question_id
-
-
-
- select action_type,table_name,column_name,key_name from
+ select action_type,abstract_data_type,table_name,column_name,key_name from
survey_predefined_questions where predefined_question_id=:predefined_question_id
@@ -447,8 +446,6 @@
-
-
select question_text,abstract_data_type, presentation_type,
Index: openacs-4/contrib/packages/survey/www/process-response.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/process-response.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/process-response.tcl 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/process-response.tcl 26 Jan 2004 15:39:41 -0000 1.2
@@ -199,6 +199,9 @@
if {$action_type=="db"} {
# insert value into db
db_dml ignore "update $table_name set $column_name=:response_value where $key_name=:user_id"
+ if {![db_resultrows]} {
+ db_dml insert "insert into $table_name ($key_name,$column_name) values (:user_id,_response_value)"
+ }
} else {
if {$action_type=="tcl"} {
# execute tcl code - need more specs on that - Kolja
Index: openacs-4/contrib/packages/survey/www/respond-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/respond-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/respond-oracle.xql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/respond-oracle.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -3,24 +3,6 @@
oracle8.1.6
-
-
- select count(*) from survey_responses, acs_objects
- where survey_id=:survey_id
- and response_id=object_id
- and initial_response_id is null
-
-
-
-
-
- select max(response_id) from survey_responses
- where survey_id=:survey_id
- and survey_response.initial_user_id(response_id)=:user_id
- and initial_response_id is null
-
-
-
Index: openacs-4/contrib/packages/survey/www/respond-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/respond-postgresql.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/respond-postgresql.xql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/respond-postgresql.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -3,25 +3,6 @@
postgresql7.1
-
-
- select count(*) from survey_responses
- where survey_id=:survey_id
- and survey_response__initial_user_id(response_id)=:user_id
- and initial_response_id is null
-
-
-
-
-
- select max(response_id) from survey_responses
- where survey_id=:survey_id
- and survey_response__initial_user_id(response_id)=:user_id
- and initial_response_id is null
-
-
-
-
@@ -30,7 +11,6 @@
-
select max(response_id) as response_id,count(*) as unfinished
@@ -42,7 +22,5 @@
and survey_id=:survey_id
-
-
Index: openacs-4/contrib/packages/survey/www/respond.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/respond.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/respond.tcl 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/respond.tcl 26 Jan 2004 15:39:41 -0000 1.2
@@ -15,7 +15,7 @@
survey_id:integer,notnull
{section_ids:integer,multiple 0}
{response_id:integer 0}
- return_url:optional
+ {return_url:optional index}
{edit_p "f"}
} -validate {
survey_exists -requires {survey_id} {
@@ -25,12 +25,12 @@
#set user_id [ad_maybe_redirect_for_registration]
# Allow public surveys
set user_id [ad_conn user_id]
- set number_of_responses [db_string count_responses {}]
+ set count_resp [db_0or1row count_responses {}]
# If we have a response in the system, and the survey is editable
# set the response_id to the latest response unless response_id is
# submited when calling the function
if {$number_of_responses!=0 && $response_id==0} {
- set response_id [db_string get_latest_response_id {}]
+ set response_id $max_response_id
}
get_survey_info -survey_id $survey_id
Index: openacs-4/contrib/packages/survey/www/respond.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/Attic/respond.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/respond.xql 19 Sep 2003 16:48:03 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/respond.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -1,6 +1,16 @@
+
+
+ select count(*) as number_of_responses, max(response_id) as max_response_id from survey_responses, acs_objects
+ where survey_id=:survey_id
+ and creation_user=:user_id
+ and object_id=response_id
+ and initial_response_id is null
+
+
+
select 1 from surveys where survey_id = :survey_id
Index: openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/predefined-question-ae-2.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl 23 Oct 2003 06:22:26 -0000 1.2
+++ openacs-4/contrib/packages/survey/www/admin/predefined-question-ae-2.tcl 26 Jan 2004 15:39:41 -0000 1.3
@@ -26,13 +26,13 @@
{presentation_type_new:text(hidden) {value $presentation_type}}
{presentation_type:text(hidden) {value $presentation_type}}
{question_text_inform:text(inform) {label "Question"} {html {rows 5 cols 70}} {value $question_text}}
-} -select_query {
- select abstract_data_type,presentation_options,presentation_alignment,summary_type,action_type,tcl,table_name,column_name,key_name from survey_predefined_questions where predefined_question_id=:predefined_question_id
+
}
if {[info exist predefined_question_id]} {
# get choices
set valid_responses ""
+ set choice_id_to_update_list [list]
db_foreach survey_question_valid_responses "" {
lappend choice_id_to_update_list $choice_id
append valid_responses "$label\n"
@@ -50,17 +50,14 @@
{abstract_data_type:text(select) {label "Type of Response"}
{options {{"Short Text" shorttext} {Text text} {Boolean boolean} {Number number} {Integer integer}}}
}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
+
}
}
textarea {
ad_form -extend -name predef -form {
{presentation:text(inform) {label "Presentation Type"} {value "Essay Answer"}}
{textarea_size:text(select) {options {{Small small} {Medium medium} {Large large}}} {label "Size"}}
{abstract_data_type:text(hidden) {value "text"}}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
}
}
"radio" -
@@ -73,8 +70,6 @@
{valid_responses:text(textarea)
{label "For Multiple Choice Enter a List of Valid Responses (enter one choice per line)"}
{html {rows 10 cols 50}} {value $valid_responses}}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
} -validate {
{valid_responses {$abstract_data_type!="choice" || ![empty_string_p $valid_responses]} "You did not enter a set of valid responses"}
}
@@ -85,8 +80,6 @@
{presentation:text(inform) {label "Presentation Type"} {value "Multiple Choice"}}
{valid_responses:text(textarea) {label "Valid Resposnes (enter one choice per line)"} {html {rows 10 cols 50}}}
{abstract_data_type:text(hidden) {value "choice"}}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
} -validate {
{valid_responses {$abstract_data_type!="choice" || ![empty_string_p $valid_responses]} "You did not enter a set of valid responses"}
}
@@ -95,24 +88,20 @@
ad_form -extend -name predef -form {
{presentation:text(inform) {label "Presentation Type"} {value "Date Answer"}}
{abstract_data_type:text(hidden) {value date}}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
}
}
"upload_file" {
ad_form -extend -name predef -form {
{presentation:text(inform) {label "Presentation Type"} {value "Attachment Answer"}}
{abstract_data_type:text(hidden) {value blob}}
- } -select_query {
- select * from survey_predefined_questions where predefined_question_id=:predefined_question_id
}
}
}
ad_form -extend -name predef -form {
# {presentation_alignment:text(radio) {options {{"Beside the question" beside} {"Below the question" below}}} {value below} {label "Presentation Alignment"}}
{presentation_alignment:text(hidden) {value beside}}
- {action_type:text(radio) {label "Action on submit"} {options {{"Update DB" db} {"Execute TCL-Code" tcl} {"Nothing" "null"}}} {value "null"}}
+ {action_type:text(radio) {label "Action on submit"} {options {{"Update DB" db} {"Execute TCL-Code" tcl} {"Nothing" "null"}}}}
{tcl:text(textarea),optional {label "TCL-Code"}}
{table_name:text(text),optional {label "Table"}}
{column_name:text(text),optional {label "Column"}}
@@ -128,6 +117,8 @@
{column_name {$action_type=="db" || [empty_string_p $column_name]} "Please select \"Update DB\" if you want to insert values into the Database"}
{key_name {$action_type=="db" || [empty_string_p $key_name]} "Please select \"Update DB\" if you want to insert values into the Database"}
{key_name {![empty_string_p $key_name] || $action_type!="db"} "Please enter a key name"}
+} -new_request {
+ set action_type "null"
} -on_submit {
if {$action_type=="null"} {
set action_type [db_null]
Index: openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit-2.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/section-edit-2.tcl 26 Jan 2004 15:39:41 -0000 1.2
@@ -6,7 +6,8 @@
@author cmceniry@arsdigita.com
@author nstrug@arsdigita.com
- @date Jun 16, 2000
+ @author openacs@sussdorff.de
+ @date Jan 13, 2004
@cvs-id $Id$
} {
@@ -18,6 +19,7 @@
branch_p:boolean,notnull
{block_section_p:boolean "f"}
page_break_p:boolean,notnull
+ {answer_descriptions:trim ""}
} -validate {
first_section_not_branch -requires {branch_p:notnull} {
if {$branch_p=="t" && $after==0} {
@@ -55,24 +57,38 @@
ad_script_abort
}
# Make this a block section
+ # Create a row in survey_block_sections for each set of choices
# - create a row in survey_block_questions for each of the choices of the questions
# - mark section as block-section
db_foreach example_questions "" {
set block_id [db_nextval survey_block_section_id_seq]
set choice_id [db_nextval survey_block_choice_id_seq]
+ db_dml make_block_section ""
db_dml make_block_choices ""
}
- db_dml make_block_section ""
+ db_dml mark_block_section ""
} else {
if {$old_block_section_p=="t" && $block_section_p=="f"} {
# undo block section
- db_dml make_noblock_section ""
+ db_dml mark_noblock_section ""
db_dml remove_block_questions ""
+ db_dml remove_block_sections ""
}
}
+ # Answer descriptions for block sections
+ if {$block_section_p=="t"} {
+ set answer_descriptions [split $answer_descriptions "\n"]
+ set count 0
+ foreach block_section_id [db_list block_sections ""] {
+ set answer_description [lindex $answer_descriptions $count]
+ incr count
+ db_dml add_answer_description ""
+ }
+ }
+
# after is the section which is to be newly above the section
# refers_to is the section our condition refers to
# if after is before refers_to we're before our condition and that case should be avoided
Index: openacs-4/contrib/packages/survey/www/admin/section-edit-2.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit-2.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/admin/section-edit-2.xql 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/section-edit-2.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -40,36 +40,61 @@
+
+
+ insert into
+ survey_block_sections(block_section_id,section_id,answer_description)
+ values (:block_id,:section_id,'')
+
+
insert into
- survey_block_questions(block_section_id,section_id,choice_id,label,sort_order)
+ survey_block_questions(block_section_id,choice_id,label,sort_order)
select
- :block_id,:section_id,:choice_id,label,sort_order
+ :block_id,:choice_id,label,sort_order
from survey_question_choices where question_id=:question_id
-
+
update survey_sections set block_section_p='t' where section_id=:section_id
-
+
update survey_sections set block_section_p='f' where section_id=:section_id
- delete from survey_block_questions where section_id=:section_id
+ delete from survey_block_questions where block_section_id in (select block_section_id from survey_block_sections where section_id=:section_id)
+
+
+ delete from survey_block_sections where section_id=:section_id
+
+
+
+
+ select block_section_id from survey_block_sections where section_id=:section_id order by block_section_id
+
+
+
+
+
+ update survey_block_sections set answer_description=:answer_description where block_section_id=:block_section_id
+
+
+
+
update survey_branches set after=(select section_id from
Index: openacs-4/contrib/packages/survey/www/admin/section-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/admin/section-edit.tcl 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/section-edit.tcl 26 Jan 2004 15:39:41 -0000 1.2
@@ -6,6 +6,7 @@
@author cmceniry@arsdigita.com
@author nstrug@arsdigita.com
+ @author openacs@sussdorff.de
@date Jun 16, 2000
@cvs-id $Id$
} {
@@ -37,9 +38,11 @@
{page_break_p:text(radio) {label "New Page after this section"} {options {{Yes t} {No f}}} {value $page_break_p}}
}
-if {[survey_block_section_candidate_p $section_id]} {
+if {$block_section_p=="t" || [survey_block_section_candidate_p $section_id]} {
+ set answer_descriptions [join [db_list answer_descriptions ""] "\n"]
ad_form -extend -name modify_section -form {
{block_section_p:text(radio) {label "Measurement Section"} {options {{Yes t} {No f}}} {value $block_section_p}}
+ {answer_descriptions:text(textarea),optional {label "Answer descriptions (one per line)"} {value $answer_descriptions}}
}
} else {
ad_form -extend -name modify_section -form {
Index: openacs-4/contrib/packages/survey/www/admin/section-edit.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/survey/www/admin/Attic/section-edit.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/contrib/packages/survey/www/admin/section-edit.xql 19 Sep 2003 16:48:04 -0000 1.1
+++ openacs-4/contrib/packages/survey/www/admin/section-edit.xql 26 Jan 2004 15:39:41 -0000 1.2
@@ -18,4 +18,11 @@
+
+
+ select answer_description from survey_block_sections where section_id=:section_id
+ order by block_section_id
+
+
+
Index: openacs-4/etc/backup.sh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/etc/backup.sh,v
diff -u -r1.2 -r1.3
--- openacs-4/etc/backup.sh 11 Dec 2003 21:39:44 -0000 1.2
+++ openacs-4/etc/backup.sh 26 Jan 2004 15:39:41 -0000 1.3
@@ -86,7 +86,7 @@
TYPE="full";
fi
-if $TYPE == "full";
+if [ $TYPE == "full" ];
then
NEWER=""
else
@@ -152,7 +152,7 @@
# incremental backups are relative to the last successful full
# backup
-if $TYPE == "full";
+if [ $TYPE == "full" ];
then
NEWER=""
NOW=`date +%Y-%m-%d`
Index: openacs-4/etc/config.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/etc/config.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/etc/config.tcl 11 Dec 2003 21:39:44 -0000 1.13
+++ openacs-4/etc/config.tcl 26 Jan 2004 15:39:41 -0000 1.14
@@ -139,6 +139,9 @@
ns_param logroll on
ns_param maxbackup 5
ns_param debug $debug
+#ns_param OutputCharset utf-8 ;# Default output charset. When none specified,
+ # no character encoding of output is performed.
+#ns_param URLCharset utf-8 ;# Default Charset for Url Encode/Decode.
#---------------------------------------------------------------------
# Thread library (nsthread) parameters
Index: openacs-4/etc/install/build-release.sh
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/etc/install/build-release.sh,v
diff -u -r1.2 -r1.3
--- openacs-4/etc/install/build-release.sh 11 Dec 2003 21:39:45 -0000 1.2
+++ openacs-4/etc/install/build-release.sh 26 Jan 2004 15:39:41 -0000 1.3
@@ -32,7 +32,7 @@
# Checkout and tag the release
cvs -d $OACS_CVSROOT checkout -r $OACS_BRANCH openacs-4
cd openacs-4
- cvs tag -F oacs-$OACS_VERSION
+ cvs tag -F openacs-$OACS_VERSION
cd ../
@@ -58,7 +58,7 @@
#
mkdir tarball
cd tarball
-cvs -d $OACS_CVSROOT export -r oacs-$OACS_VERSION acs-core
+cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION acs-core
mv opeancs-4 openacs-${OACS_VERSION//-/.}
tar -czf ../openacs-${OACS_VERSION//-/.}.tar.gz openacs-${OACS_VERSION//-/.}
cd ..
@@ -67,9 +67,9 @@
#
mkdir dotlrn-tarball
cd dotlrn-tarball
-cvs -d $OACS_CVSROOT export -r oacs-$OACS_VERSION acs-core
+cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION acs-core
cd openacs-4/packages
-cvs -d $OACS_CVSROOT export -r oacs-$OACS_VERSION dotlrn-prereq
+cvs -d $OACS_CVSROOT export -r openacs-$OACS_VERSION dotlrn-prereq
cvs -d $DOTLRN_CVSROOT export -r dotlrn-$DOTLRN_VERSION dotlrn-core
cd ../..
cp -f openacs-4/packages/dotlrn/install.xml openacs-4
Index: openacs-4/packages/acs-admin/acs-admin.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/acs-admin.info,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/acs-admin/acs-admin.info 11 Dec 2003 21:39:45 -0000 1.23
+++ openacs-4/packages/acs-admin/acs-admin.info 26 Jan 2004 15:39:41 -0000 1.24
@@ -7,17 +7,17 @@
tt
-
+ Don BaccusAn interface for Site-wide administration of an OpenACS Installation.
- 2003-11-07
+ 2004-01-21OpenACSProvides a UI for administering site-wide services
(including package installation, cache, authentication, and user accounts) for an OpenACS system.
-
-
+
+
Index: openacs-4/packages/acs-admin/www/users/password-reset.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/password-reset.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-admin/www/users/password-reset.tcl 28 Oct 2003 14:30:05 -0000 1.1
+++ openacs-4/packages/acs-admin/www/users/password-reset.tcl 26 Jan 2004 15:39:41 -0000 1.2
@@ -8,6 +8,7 @@
acs_user::get -user_id $user_id -array user_info
auth::password::reset \
+ -admin \
-authority_id $user_info(authority_id) \
-username $user_info(username)
Index: openacs-4/packages/acs-api-browser/acs-api-browser.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/acs-api-browser.info,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-api-browser/acs-api-browser.info 11 Dec 2003 21:39:45 -0000 1.11
+++ openacs-4/packages/acs-api-browser/acs-api-browser.info 26 Jan 2004 15:39:41 -0000 1.12
@@ -7,15 +7,15 @@
tt
-
+ OpenACSInteractive documentation for the Tcl and SQL APIs.
- 2003-11-07
+ 2004-01-21OpenACSOn line interactive documentation for the locally installed Tcl and SQL APIs. Links to the Tcl core and AOLServer online documentation as well.
-
-
+
+
Index: openacs-4/packages/acs-api-browser/www/type-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/Attic/type-view.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-api-browser/www/type-view.tcl 6 Sep 2002 21:49:54 -0000 1.2
+++ openacs-4/packages/acs-api-browser/www/type-view.tcl 26 Jan 2004 15:39:41 -0000 1.3
@@ -22,12 +22,10 @@
}
}
-if [exists_and_not_null version_id] {
- set public_p [api_set_public $version_id]
-} else {
- set public_p [api_set_public]
-}
+set public_p [api_set_public $version_id]
+
+
set context [list]
if { [info exists version_id] } {
Index: openacs-4/packages/acs-authentication/acs-authentication.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/acs-authentication.info,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-authentication/acs-authentication.info 11 Dec 2003 21:39:46 -0000 1.11
+++ openacs-4/packages/acs-authentication/acs-authentication.info 26 Jan 2004 15:39:41 -0000 1.12
@@ -7,15 +7,16 @@
tt
-
+ Lars PindAuthentication, account management, and related functionality.
+ 2004-01-21CollaboraidImplements authentication-related security functions for OpenACS, including password, account and session management, bulk account creation etc. Provides a contract based interface for different authentication methods such as PAM or LDAP based authentication.
-
-
-
+
+
+
Index: openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl,v
diff -u -r1.60 -r1.61
--- openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 21 Jan 2004 17:13:07 -0000 1.60
+++ openacs-4/packages/acs-authentication/tcl/authentication-procs.tcl 26 Jan 2004 15:39:41 -0000 1.61
@@ -845,7 +845,7 @@
# If so, add -2 or -3 or ... to make it unique
if { ![empty_string_p $existing_user_id] } {
- set match "$user_info)username)-%"
+ set match "${username}-%"
set existing_usernames [db_list select_existing_usernames {
select username
from users
Index: openacs-4/packages/acs-authentication/tcl/password-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/tcl/password-procs.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-authentication/tcl/password-procs.tcl 28 Oct 2003 14:29:12 -0000 1.10
+++ openacs-4/packages/acs-authentication/tcl/password-procs.tcl 26 Jan 2004 15:39:41 -0000 1.11
@@ -406,15 +406,20 @@
}
ad_proc -public auth::password::reset {
+ {-admin:boolean}
{-authority_id:required}
{-username:required}
} {
Reset the user's password, which means setting it to a new
randomly generated password and inform the user of that new
password.
- @param user_id The ID of the user whose password you want to reset.
+ @param admin Specify this flag if this call represents an admin changing a user's password.
+ @param authority_id The authority of the user
+
+ @param username The username of the user
+
@return An array list with the following entries:
@@ -435,9 +440,9 @@
} {
with_catch errmsg {
- array set result [auth::password::ResetPassword \
- -authority_id $authority_id \
- -username $username]
+ array set result [auth::password::ResetPassword \
+ -authority_id $authority_id \
+ -username $username]
# We do this so that if there aren't even a password_status in the array, that gets caught below
set dummy $result(password_status)
@@ -451,7 +456,11 @@
# Check the result code and provide canned responses
switch $result(password_status) {
ok {
- if { [exists_and_not_null result(password)] } {
+ if { [exists_and_not_null result(password)] && \
+ (!$admin_p || [parameter::get \
+ -parameter EmailChangedPasswordP \
+ -package_id [ad_conn subsite_id] \
+ -default 1]) } {
# We have retrieved or reset a forgotten password that we should email to the user
with_catch errmsg {
auth::password::email_password \
@@ -467,7 +476,7 @@
global errorInfo
ns_log Error "We had an error sending out email with new password to username $username, authority $authority_id:\n$errorInfo"
}
- }
+ }
if { ![exists_and_not_null result(password_message)] } {
set result(password_message) [_ acs-subsite.Check_Your_Inbox]
}
Index: openacs-4/packages/acs-automated-testing/acs-automated-testing.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/acs-automated-testing.info,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-automated-testing/acs-automated-testing.info 11 Dec 2003 21:39:46 -0000 1.6
+++ openacs-4/packages/acs-automated-testing/acs-automated-testing.info 26 Jan 2004 15:39:41 -0000 1.7
@@ -7,14 +7,14 @@
tf
-
+ OpenACSThe interface to the automated testing facilities within OpenACS.
- 2003-11-07
+ 2004-01-21OpenACSProvides a UI for viewing and running automated tests provided by each package within the OpenACS system.
-
+
Index: openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl,v
diff -u -r1.24 -r1.25
--- openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 11 Jan 2004 20:58:26 -0000 1.24
+++ openacs-4/packages/acs-automated-testing/tcl/aa-test-procs.tcl 26 Jan 2004 15:39:42 -0000 1.25
@@ -84,7 +84,7 @@
}
}
-ad_proc aa_unstub {
+ad_proc -public aa_unstub {
proc_name
} {
@author Peter Harper
@@ -237,7 +237,7 @@
}
# set munged_body [subst {uplevel 1 {$body}}]
- ad_proc _${package_key}__c_$component_id {} $body
+ ad_proc -private _${package_key}__c_$component_id {} $body
}
ad_proc -public aa_call_component {
@@ -394,7 +394,7 @@
}
"
}
- ad_proc _${package_key}__$testcase_id {} "
+ ad_proc -private _${package_key}__$testcase_id {} "
$init_class_code
set _aa_export {}
set body_count 0
@@ -431,16 +431,18 @@
"
}
-ad_proc aa_runseries {
+ad_proc -public aa_runseries {
-quiet:boolean
{-testcase_id ""}
by_package_key
by_category
} {
- Runs a series of testcases.
+ Runs a series of testcases.
+
Runs all cases if both package_key and
category are blank, otherwise it uses the package and/or category to
select which testcases to run.
+
@author Peter Harper
@creation-date 24 July 2001
} {
@@ -519,7 +521,7 @@
}
-ad_proc aa_run_testcase {
+ad_proc -public aa_run_testcase {
testcase_id
} {
@author Peter Harper
@@ -704,7 +706,7 @@
aa_log_result "fail" $error_notes
}
-ad_proc aa_log_result {
+ad_proc -public aa_log_result {
test_result
test_notes
} {
@@ -754,7 +756,7 @@
db_dml test_result_insert {}
}
-ad_proc aa_log_final {
+ad_proc -public aa_log_final {
test_passes
test_fails
} {
Index: openacs-4/packages/acs-automated-testing/tcl/example-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/tcl/example-procs.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-automated-testing/tcl/example-procs.tcl 1 Nov 2003 08:45:36 -0000 1.2
+++ openacs-4/packages/acs-automated-testing/tcl/example-procs.tcl 26 Jan 2004 15:39:42 -0000 1.3
@@ -15,7 +15,7 @@
@cvs-id $Id$
}
-ad_proc aa_example_write_audit_entry {
+ad_proc -public aa_example_write_audit_entry {
name
value
} {
@@ -26,7 +26,7 @@
return 1
}
-ad_proc aa_example_write_audit_entries {
+ad_proc -public aa_example_write_audit_entries {
entries
} {
@author Peter Harper
Index: openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 11 Dec 2003 21:39:46 -0000 1.14
+++ openacs-4/packages/acs-bootstrap-installer/acs-bootstrap-installer.info 26 Jan 2004 15:39:42 -0000 1.15
@@ -7,17 +7,16 @@
tt
-
+ Don BaccusBootstraps an OpenACS installation.
- 2003-11-07
+ 2004-01-21OpenACSThis package bootstraps OpenACS. If the core packages have not yet been installed, it calls the installer which leads the user through the steps necessary to do so. It also checks that the installation meets the requirements for a successful install of OpenACS.
+
+
-
-
-
Index: openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 29 Oct 2003 10:12:41 -0000 1.16
+++ openacs-4/packages/acs-bootstrap-installer/tcl/00-proc-procs.tcl 26 Jan 2004 15:39:42 -0000 1.17
@@ -393,7 +393,8 @@
ad_proc -public -deprecated proc_doc { args } {
A synonym for ad_proc (to support legacy code).
-
+
+ @see ad_proc
} {
eval ad_proc $args
}
@@ -409,7 +410,7 @@
} {
Declare a procedure with the following enhancements
- over regular Tcl "proc":
+ over regular Tcl "proc":
@@ -464,7 +465,7 @@
Here's an example with named parameters, and namespaces (notice the preferred way of
- declaring namespaces and namespaced procedures). Ignore the "\" in "\@param",
+ declaring namespaces and namespaced procedures). Ignore the \ in "\@param",
I had to use it so the api-browser wouldn't think the parameter docs were for ad_proc
itself:
@@ -602,7 +603,7 @@
} -
# procedures for doing type based dispatch
-ad_proc ad_method {
+ad_proc -public ad_method {
method_name
type
argblock
@@ -623,7 +624,7 @@
ad_proc ${method_name}__$type $argblock $docblock $body
}
-ad_proc ad_call_method {
+ad_proc -public ad_call_method {
method_name
object_id
args
@@ -641,7 +642,7 @@
return [apply ${method_name}__[util_memoize "acs_object_type $object_id"] [concat $object_id $args]]
}
-ad_proc ad_dispatch {
+ad_proc -public ad_dispatch {
method_name
type
args
Index: openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl,v
diff -u -r1.31 -r1.32
--- openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 14 Dec 2003 16:08:46 -0000 1.31
+++ openacs-4/packages/acs-bootstrap-installer/tcl/30-apm-load-procs.tcl 26 Jan 2004 15:39:42 -0000 1.32
@@ -26,7 +26,7 @@
return [info exists apm_first_time_loading_p]
}
-ad_proc ad_after_server_initialization { name args } {
+ad_proc -public ad_after_server_initialization { name args } {
Registers code to run after server initialization is complete.
@@ -37,7 +37,7 @@
nsv_lappend ad_after_server_initialization . [list name $name script [info script] args $args]
}
-ad_proc apm_guess_file_type { package_key path } {
+ad_proc -public apm_guess_file_type { package_key path } {
Guesses and returns the file type key corresponding to a particular path
(or an empty string if none is known). $path should be
@@ -370,7 +370,7 @@
return [expr ![file exists "${package_path}/sql"] || [file exists "${package_path}/sql/[db_type]"]]
}
-ad_proc apm_source { __file } {
+ad_proc -private apm_source { __file } {
Sources $__file in a clean environment, returning 1 if successful or 0 if not.
Records that the file has been sourced and stores its mtime in the nsv array
apm_library_mtime
@@ -394,15 +394,15 @@
# Special boot strap load file routine.
-ad_proc apm_bootstrap_load_file { root_directory file } {
+ad_proc -private apm_bootstrap_load_file { root_directory file } {
Source a single file during initial bootstrapping and set APM data.
} {
ns_log "Notice" "Loading [file tail $root_directory]/$file"
apm_source "${root_directory}/${file}"
}
-ad_proc apm_bootstrap_load_libraries {
+ad_proc -private apm_bootstrap_load_libraries {
{-load_tests:boolean 0}
{-init:boolean}
{-procs:boolean}
Index: openacs-4/packages/acs-content-repository/acs-content-repository.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/acs-content-repository.info,v
diff -u -r1.29 -r1.30
--- openacs-4/packages/acs-content-repository/acs-content-repository.info 23 Jan 2004 17:36:25 -0000 1.29
+++ openacs-4/packages/acs-content-repository/acs-content-repository.info 26 Jan 2004 15:39:42 -0000 1.30
@@ -7,20 +7,20 @@
tt
-
+ Dan WickstromThe canonical repository for OpenACS content.
- 2003-11-07
- OpenACS
+ 2004-01-21
+ OpenACSProvides the API for creating and managing user generated content including
full support for versioning, rendering content to the filesystem, folders and composite content items, and
other CMS backing functionality. Utilized by Bug Tracker, File Storage, and other packages.
-
-
-
-
+
+
+
+
Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 11 Dec 2003 21:39:47 -0000 1.15
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-keyword.sql 26 Jan 2004 15:39:43 -0000 1.16
@@ -197,20 +197,23 @@
is_assigned__keyword_id alias for $2;
is_assigned__recurse alias for $3; -- default ''none''
v_ret boolean;
+ v_is_assigned__recurse varchar;
begin
if is_assigned__recurse is null then
- is_assigned__recurse := ''none'';
+ v_is_assigned__recurse := ''none'';
+ else
+ v_is_assigned__recurse := is_assigned__recurse;
end if;
-- Look for an exact match
- if is_assigned__recurse = ''none'' then
+ if v_is_assigned__recurse = ''none'' then
return count(*) > 0 from cr_item_keyword_map
where item_id = is_assigned__item_id
and keyword_id = is_assigned__keyword_id;
end if;
-- Look from specific to general
- if is_assigned__recurse = ''up'' then
+ if v_is_assigned__recurse = ''up'' then
return count(*) > 0
where exists (select 1
from (select keyword_id from cr_keywords c, cr_keywords c2
@@ -221,7 +224,7 @@
and m.item_id = is_assigned__item_id);
end if;
- if is_assigned__recurse = ''down'' then
+ if v_is_assigned__recurse = ''down'' then
return count(*) > 0
where exists (select 1
from (select k2.keyword_id
Index: openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql 11 Dec 2003 21:39:47 -0000 1.2
+++ openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql 26 Jan 2004 15:39:43 -0000 1.3
@@ -448,20 +448,23 @@
is_assigned__keyword_id alias for $2;
is_assigned__recurse alias for $3; -- default ''none''
v_ret boolean;
+ v_is_assigned__recurse varchar;
begin
if is_assigned__recurse is null then
- is_assigned__recurse := ''none'';
+ v_is_assigned__recurse := ''none'';
+ else
+ v_is_assigned__recurse := is_assigned__recurse;
end if;
-- Look for an exact match
- if is_assigned__recurse = ''none'' then
+ if v_is_assigned__recurse = ''none'' then
return count(*) > 0 from cr_item_keyword_map
where item_id = is_assigned__item_id
and keyword_id = is_assigned__keyword_id;
end if;
-- Look from specific to general
- if is_assigned__recurse = ''up'' then
+ if v_is_assigned__recurse = ''up'' then
return count(*) > 0
where exists (select 1
from (select keyword_id from cr_keywords c, cr_keywords c2
@@ -472,7 +475,7 @@
and m.item_id = is_assigned__item_id);
end if;
- if is_assigned__recurse = ''down'' then
+ if v_is_assigned__recurse = ''down'' then
return count(*) > 0
where exists (select 1
from (select k2.keyword_id
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-content-repository/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/acs-core-docs.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/acs-core-docs.info,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-core-docs/acs-core-docs.info 11 Dec 2003 21:39:47 -0000 1.11
+++ openacs-4/packages/acs-core-docs/acs-core-docs.info 26 Jan 2004 15:39:43 -0000 1.12
@@ -7,17 +7,17 @@
tt
-
+ OpenACS Documentation TeamDocumentation for the OpenACS Core.
- 2003-11-07
+ 2004-01-21OpenACSStatic HTML documentation for the OpenACS core (includes the DocBook sources).
-
-
-
+
+
+
Index: openacs-4/packages/acs-core-docs/www/openacs.css
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.css,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-core-docs/www/openacs.css 19 Nov 2003 15:44:50 -0000 1.4
+++ openacs-4/packages/acs-core-docs/www/openacs.css 26 Jan 2004 15:39:43 -0000 1.5
@@ -1,64 +1,28 @@
/* These are aimed at DocBook output, specifically from the chunk.xsl style and derivatives /*
-body,ol,td,th,hr,h1,h2,h3,strong,dl,a,blockquote,em,.force,dt,dd,ul,li,p {
- font-family: verdana,helvetica,arial,sans-serif;
-}
+body, ol, td, th, hr, h1, h2, h3, strong, dl, a, blockquote, em, .force, dt, dd, ul, li, p{font-family:verdana,helvetica,arial,sans-serif}
+a:link{color:0000ff}
+a:visited{color:000099}
+a.topnav{font-size:1.2em}
+a.bottomnav{font-size:1.2em}
-a:link {color: #f00;}
-a:visited {color: #000099;}
+code{font-family:mono-space}
+.CVS, .cvstag{font-family:mono-space; font-size:small; color:#999999; text-align:right}
-a.topnav {font-size: 1.2em;}
-a.bottomnav {font-size: 1.2em;}
+.codeblock{background-color:#ffffff;font-family:monospace}
+.strong{font-weight:bold}
+.authorblurb{font-size:small}
-code {
- font-family: courier,monospace;
-}
-
-.codeblock {
- background-color: #fff;
- font-family: monospace;
-}
-.strong {font-weight: bold;}
-.authorblurb {font-size: small;}
-
/* this is intended to catch docbook Screen stuff */
-pre {background-color: #eee;}
+pre {background-color:#eeeeee;}
/* DocBook stuff */
-.guibutton {
- background-color: #fff;
- border: solid #eee 3px;
- margin: 2px;
-}
-.replaceable {
- color: red;
- font-style: italic;
-}
-.guilabel {
- background-color: #ccc;
- margin: 2px;
-}
-.programlisting {
- background-color: #eee;
- margin-left: 1em;
- padding-left: .5em;
-}
-.strong {font-weight:bold;}
-.authorblurb {font-size:small;}
-.screen {
- padding:4px;
- margin-left: 1em;
-}
-.action {font-weight:bold;}
+.guibutton{background-color:white;border: solid#eeeeee; padding:1px;}
+.replaceable{color:red; font-style:italic;}
+.guilabel{background-color:silver; padding:2px;}
+.programlisting{background-color:#eeeeee}
+.strong{font-weight:bold}
+.authorblurb{font-size:small}
+.screen{padding:3px;}
+.action{padding:0.5em; margin:0.5em;font-weight:bold;}
-.table,.informaltable,.informalfigure,.figure { margin-left: 1em; }
-
-body { margin: 1em 0 0 1em; max-width: 75em; }
-
-div.cvstag {
- font-family: courier,monospace;
- color: #999;
- font-size: small;
- text-align: right;
-}
-
Fisheye: Tag 1.19 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/upgrade-detail.html'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/www/files/svgroup.txt
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/files/svgroup.txt,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-core-docs/www/files/svgroup.txt 1 Feb 2002 17:12:18 -0000 1.1
+++ openacs-4/packages/acs-core-docs/www/files/svgroup.txt 26 Jan 2004 15:39:43 -0000 1.2
@@ -16,4 +16,4 @@
chmod g+r $i/supervise/status
chgrp $g $i/supervise
chmod g+x $i/supervise
-done
+done
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-create.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-create.sql~'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-drop.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/files/tutorial/myfirstpackage-drop.sql~'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/www/xml/Makefile
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/Makefile,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-core-docs/www/xml/Makefile 11 Dec 2003 21:39:48 -0000 1.9
+++ openacs-4/packages/acs-core-docs/www/xml/Makefile 26 Jan 2004 15:39:44 -0000 1.10
@@ -2,9 +2,12 @@
# @author Vinod Kurup (vinod@kurup.com)
# @author Modified by Roberto Mello (rmello@fslc.usu.edu) to have PDF generation
# plus refactored it a bit to have rules and dependencies.
+# @author davis@xarg.net Added automatic creation of an XSL link so we don't edit openacs.xsl,
+# added a lint target which runs xmllint, changed pdf generation to use FOP. Made it
+# work on the mac. OSX note: xmllint from fink does not work, use /usr/bin/xmllint
#
# @creation-date 2002-08-10
-# @modified-date 2002-09-21
+# @modified-date 2003-12-06
#
# This simply copys all the 'files' and 'images'
# to the appropriate directory in www so that they are accessible
@@ -15,15 +18,16 @@
# I'm a Makefile newbie, so feel free to comment/slash/change.
# Paths
-XSLTPROC=/usr/bin/xsltproc
-HTMLDOC=/usr/bin/htmldoc
+XSLTPROC=xsltproc
+HTMLDOC=htmldoc
all: html
XSL:
if [ ! -d XSL -a ! -L XSL ]; then \
echo -e "\n\nNo XSL directory here. I am looking for one...\n"; \
for d in \
+ /sw/share/xml/docbook-xsl \
/usr/share/sgml/docbook/xsl-stylesheets-* \
/usr/share/sgml/docbook/xsl-stylesheets \
/usr/share/sgml/docbook/stylesheet/xsl/nwalsh; \
@@ -48,17 +52,17 @@
prelim:
- cp -u images/*.{pdf,png,gif,jpg} ../images/
+ cp images/*.{pdf,png,gif,jpg} ../images/
# put all non-regenerated html in a sub-dir so that we can delete html
# in the main directory and regenerate
- cp -u non-xml/*.html ../
+ cp non-xml/*.html ../
- cp -u openacs.css ..
+ cp openacs.css ..
html: prelim XSL
# adding --nonet --novalid is much faster but generates a bunch of bogus error messages
- cd .. ; $(XSLTPROC) --nonet --novalid --xinclude xml/openacs.xsl xml/index.xml
+ cd .. ; $(XSLTPROC) --xinclude xml/openacs.xsl xml/index.xml
# I got this to work with FOP 0.20.5 and docbook-xsl 1.62, and Jimi 1.0
# see README.fop for some notes.
@@ -70,4 +74,4 @@
# In emacs do M-x compile then make lint; then C-x ` to walk through the resulting errors.
#
lint: XSL
- xmllint --xinclude --noout -postvalid index.xml 2>&1 | grep -v 'No declaration for attribute base of element'
+ xmllint --xinclude --noout --postvalid index.xml 2>&1 | grep -v 'No declaration for attribute base of element'
Index: openacs-4/packages/acs-core-docs/www/xml/README.fo
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/README.fo,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-core-docs/www/xml/README.fo 11 Dec 2003 21:39:48 -0000 1.2
+++ openacs-4/packages/acs-core-docs/www/xml/README.fo 26 Jan 2004 15:39:44 -0000 1.3
@@ -9,8 +9,13 @@
* Jimi 1.0 from Sun
* docbook/xsl-stylesheets-1.62.0/
-(all this except Jimi was installed unchanged via emerge on gentoo)
+All this except Jimi was installed unchanged via emerge on gentoo.
+It works on OS X 10.3 as well but you have to change the fink build file
+to add jimi when building FOP (and it's only on 10.3 unstable I think).
+
+
+
I did have to change the fop executable script to increase the JVM
memory. On the last line of /usr/bin/fop (or whereever yours ends
up) add -Xms64m -Xmx256m; smaller might work too...
@@ -33,6 +38,9 @@
* If you try to generate a list-of-tables or figures it barfs. (see
in fo.xsl for how to turn this off).
+* Versions 1.62.4 and 1.64.0 of docbook-xsl generate .fo code that sends
+ FOP into an infinite loop. I may investigate but probably not.
+
All in all it's pretty unforgiving of validation errors and it's output
is not great (and it's table handling is iffy).
@@ -43,4 +51,4 @@
XEP.
-Jeff Davis davis@xarg.ne
+Jeff Davis davis@xarg.net
\ No newline at end of file
Index: openacs-4/packages/acs-core-docs/www/xml/index.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/index.xml,v
diff -u -r1.21 -r1.22
--- openacs-4/packages/acs-core-docs/www/xml/index.xml 23 Jan 2004 15:10:47 -0000 1.21
+++ openacs-4/packages/acs-core-docs/www/xml/index.xml 26 Jan 2004 15:39:44 -0000 1.22
@@ -133,6 +133,10 @@
Section Missing
+
+ Section Missing
+
+
Section Missing
@@ -151,12 +155,10 @@
Placeholder
-
- Upgrading
-
- Section missing
-
-
+
+ Section missing
+
+
Maintenance
Index: openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml 22 Jan 2004 13:48:45 -0000 1.7
+++ openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml 26 Jan 2004 15:39:44 -0000 1.8
@@ -10,25 +10,30 @@
How to package and release OpenACS
- update the version number in
- packages/acs-core-docs/www/xml/variables.ent, readme.txt,
- and all core .info files. Regenerate the html documentation
- and commit all the changes. Update the information in the
- packages/acs-core-docs/www/xml/for-everyone/release-notes.xml
- file.
-
+ Update documentation version numbers:
+
+
+ Update /packages/acs-core-docs/www/xml/variables.ent with the new version number and regenerate all HTML docs
+
+
+
+ Update /readme.txt with the new version number
+
+
+
+ Commit changes
+
+
+
-
Check out the whole cvs tree. The files must be checked
- out through a cvs account with write access and should be a
- checkout from the release branch. In this example, the cvs
- user on openacs.org is implied from the ssh login information
- previously set up. It could be overridden via
- foobar@openacs.org.
+ out through a cvs account with write access and should be a
+ checkout from the release branch. In this example, we are assuming
+ this is being done as a local user on openacs.org (which make the
+ checkout and tagging operations much faster).
cd /var/tmp
-cvs -d /cvsroot checkout -r oacs-5-0 openacs-4
-
+cvs -d /cvsroot checkout -r oacs-5-0 openacs-4
Repeat with the dotlrn cvs tree.cd /var/tmp
mkdir dotlrn-packages
@@ -41,7 +46,16 @@
cd /var/tmp/openacs-4
cvs tag -F openacs-5-0-0a1
- Tag dotLRN. Since the dotLRN packages aren't all in one module, we iterate through all of the modules. Log in first (cvs login) so that you don't have to log in for each module.
+ Note that we use the -F flag which will force the tag to the new version (just in
+ case someone has created the tag already on another version). Excercise care when doing this since
+ you don't want to inadvertently move a prior release tag. Also if the tagging goes horribly wrong
+ for some reason you can delete the tag via "cvs tag -d <symbolic_tag>".
+
+ Tag dotLRN. Since the dotLRN packages aren't all in one
+ module, we iterate through all of the modules. Log in first
+ (cvs login) so that you don't have to log in for each
+ module.
+
cd /var/tmp/dotlrn-packages
for dir in *; do ( cd $dir && cvs tag -F dotlrn-2-0-0a1 ); done
@@ -59,14 +73,13 @@
Go to a new working space and export the tagged files.mkdir /var/tmp/tarball
cd /var/tmp/tarball
-cvs -d :pserver:anonymous@openacs.org:/cvsroot export -r openacs-5-0-0a1 acs-core
-mv openacs-4 openacs
+cvs -d /cvsroot export -r openacs-5-0-0a1 acs-core
- Generate the tarball
+ Generate the tarball.cd /var/tmp/tarball
-mv openacs openacs-5.0.0a1
+mv openacs-4 openacs-5.0.0a1
tar cz -f openacs-5.0.0a1.tar.gz openacs-5.0.0a1
@@ -85,30 +98,26 @@
openacs at the end)
mkdir /var/tmp/dotlrn-tarball
cd /var/tmp/dotlrn-tarball
-cvs -d :pserver:anonymous@openacs.org:/cvsroot export \
- -r openacs-5-0-0a1 acs-core
+cvs -d /cvsroot export -r openacs-5-0-0a1 acs-core
cd /var/tmp/dotlrn-tarball/openacs-4/packages
-cvs -d :pserver:anonymous@openacs.org:/cvsroot export \
- -r openacs-5-0-0a1 dotlrn-prereq
-cvs -d :pserver:anonymous@dotlrn.openacs.org:/dotlrn-cvsroot export \
- -r dotlrn-2-0-0a1 dotlrn-core
-cd /var/tmp/dotlrn-tarball
-mv openacs-4 openacs
+cvs -d /cvsroot export -r openacs-5-0-0a1 dotlrn-prereq
+cvs -d /dotlrn-cvsroot export -r dotlrn-2-0-0a1 dotlrn-core
Copy the dotlrn install.xml file, which controls
which packages are installed on setup, to the root
location:
- cp /var/tmp/dotlrn-tarball/openacs/packages/dotlrn/install.xml /var/tmp/dotlrn-tarball/openacs
+ cp /var/tmp/dotlrn-tarball/openacs-4/packages/dotlrn/install.xml \
+ /var/tmp/dotlrn-tarball/openacs-4
Generate the tarball
- cd /var/tmp/tarball
-mv openacs dotlrn-2.0.0a1
+ cd /var/tmp/dotlrn-tarball
+mv openacs-4 dotlrn-2.0.0a1
tar cz -f dotlrn-2.0.0a1.tar.gz dotlrn-2.0.0a1
@@ -120,9 +129,16 @@
Test the new tarball
- Update on the site
+ Update openacs.org frontpage, bug-tracker versions, project page, etc.
+
+ Clean up after yourself.
+ cd /var/tmp
+rm -rf tarball dotlrn-tarball dotlrn-packages openacs-5.0.0a1
+
+
+
@@ -167,4 +183,14 @@
+
+
+
+ Here is a shell script that automates packaging the tarball:
+
+
+ release script missing
+
+ ($Id$)
+
Index: openacs-4/packages/acs-core-docs/www/xml/variables.ent
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/variables.ent,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-core-docs/www/xml/variables.ent 11 Dec 2003 21:39:48 -0000 1.5
+++ openacs-4/packages/acs-core-docs/www/xml/variables.ent 26 Jan 2004 15:39:44 -0000 1.6
@@ -1,5 +1,5 @@
-
-
-
+
+
+
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml 11 Dec 2003 21:39:48 -0000 1.5
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml 26 Jan 2004 15:39:44 -0000 1.6
@@ -16,29 +16,29 @@
cvssetup
- These steps take an existing OpenACS directory and add
+ These steps take an existing OpenACS directory and add
it to a CVS
- repository.
-
-
-
- Create and set permissions on a subdirectory in the local cvs repository.
- [root@yourserver root]# mkdir /cvsroot/service0
-[root@yourserver root]# chown service0.web /cvsroot/service0
-[root@yourserver root]#
+ repository.
+
+
+
+ Create and set permissions on a subdirectory in the local cvs repository.
+ [root root]# mkdir /cvsroot/service0
+[root root]# chown service0.web /cvsroot/service0
+[root root]#
mkdir /cvsroot/service0
chown service0.web /cvsroot/service0Add the repository location to the user environment.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ emacs .bashrc
+ [root root]# su - service0
+[service0 service0]$ emacs .bashrcPut this string into /home/service0/.bashrc:export CVSROOT=/cvsroot
- [service0@yourserver service0]$ exit
+ [service0 service0]$ exit
logout
-[root@yourserver root]#
+[root root]#Import all files into cvs. In order to work on
@@ -53,33 +53,33 @@
"OpenACS" is the vendor tag, and "&cvsversiontag;" is the
release tag. These tags will be useful in upgrading and
branching. -m sets the version comment.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ cd /web/service0
-[service0@yourserver service0]$ cvs import -m "initial install" service0 OpenACS &cvsversiontag;
+ [root root]# su - service0
+[service0 service0]$ cd /web/service0
+[service0 service0]$ cvs import -m "initial install" service0 OpenACS &cvsversiontag;
N service0/license.txt
N service0/readme.txt
(many lines omitted)
N service0/www/SYSTEM/flush-memoized-statement.tcl
No conflicts created by this import
-[service0@yourserver service0]$
+[service0 service0]$
su - service0
cd /web/service0
cvs import -m "initial install" service0 OpenACS &cvsversiontag;Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files.
- [service0@yourserver service0]$ cd ..
-[service0@yourserver web]$ mv service0service0.orig
-[service0@yourserver web]$ cvs checkout service0
+ [service0 service0]$ cd ..
+[service0 web]$ mv service0service0.orig
+[service0 web]$ cvs checkout service0
cvs checkout: Updating service0
U service0/license.txt
(many lines omitted)
U service0/www/SYSTEM/dbtest.tcl
U service0/www/SYSTEM/flush-memoized-statement.tcl
-[service0@yourserver web]$ exit
+[service0 web]$ exit
logout
-[root@yourserver web]#
+[root web]#
cd ..
mv service0service0.orig
cvs checkout service0
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/form-builder.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/form-builder.xml,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/form-builder.xml 11 Dec 2003 21:39:48 -0000 1.2
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/form-builder.xml 26 Jan 2004 15:39:44 -0000 1.3
@@ -44,5 +44,5 @@
-($Id$)
+ ($Id$)
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 11 Dec 2003 21:39:48 -0000 1.7
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/i18n.xml 26 Jan 2004 15:39:44 -0000 1.8
@@ -50,6 +50,23 @@
+
+
+ AOLserver Configuration for Multilingual Sites
+
+
+ For multilingual websites we recommend using the UTF8
+ charset. In order for AOLserver to use utf8 you need to set
+ the config parameters OutputCharset and
+ URLCharset to utf-8 in your AOLserver config file (use the etc/config.tcl
+ template file). For sites running on Oracle you need to make
+ sure that AOLserver is running with the NLS_LANG environment
+ variable set to .UTF8. You should set this variable in the
+ nsd-oracle run script (use the
+ acs-core-docs/www/files/nds-oracle.txt template file).
+
+
+
Using the Message Catalog
@@ -153,8 +170,171 @@
+
+ Message Keys in TCL Files
+
+
+ In adp files message lookups are typically done with the syntax
+ \#package_key.message_key\#. In Tcl
+ files all message lookups *must* be on either of the following formats:
+
+
+
+
+ Typical static key lookup: [_ package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.
+
+
+
+ Static key lookup with non-default locale: [lang::message::lookup $locale package_key.message_key] - The message key and package key used here must be string literals, they can't result from variable evaluation.
+
+
+
+ Dynamic key lookup: [lang::util::localize $var_with_embedded_message_keys] - In this case the message keys in the variable var_with_embedded_message_keys must appear as string literals \#package_key.message_key\# somewhere in the code. Here is an example of a dynamic lookup:
+
+
+ set message_key_array {
+ dynamic_key_1 \#package_key.message_key1\#
+ dynamic_key_2 \#package_key.message_key2\#
+ }
+
+ set my_text [lang::util::localize $message_key_array([get_dynamic_key])]
+
+
+
+
+
+
+
+ Translatable texts in page TCL scripts are often found in page titles,
+ context bars, and form labels and options. Many times the texts are
+ enclosed in double quotes. The following is an example of grep commands
+ that can be used on Linux to highlight translatable text in TCL files:
+
+
+
+ # Find text in double quotes
+ find -iname '*.tcl'|xargs egrep -i '"[a-z]'
+ # Find untranslated text in form labels, options and values
+ find -iname '*.tcl'|xargs egrep -i '\-(options|label|value)'|egrep -v '<#'|egrep -v '\-(value|label|options)[[:space:]]+\$[a-zA-Z_]+[[:space:]]*\\?[[:space:]]*$'
+ # Find text in page titles and context bars
+ find -iname '*.tcl'|xargs egrep -i 'set (title|page_title|context_bar) '|egrep -v '<#'
+ # Find text in error messages
+ find -iname '*.tcl'|xargs egrep -i '(ad_complain|ad_return_error)'|egrep -v '<#'
+
+
+
+ You may mark up translatable text in TCL library files and TCL pages
+ with temporary tags on the <#key text#> syntax.
+ If you have a sentence or paragraph of text with
+ variables and or procedure calls in it you should in most cases
+ try to turn the whole text into one
+ message in the catalog (remember that translators is made easier the longer the phrases to translate are). In those cases, follow these steps:
+
+
+
+ For each message call in the text, decide on a variable name and replace
+ the procedure call with a variable lookup on the syntax %var_name%. Remember
+ to initialize a tcl variable with the same name on some line above the text.
+ If the text is in a tcl file you must replace variable lookups
+ (occurences of $var_name or ${var_name}) with %var_name%
+ You are now ready to follow the normal procedure and mark up the text using a
+ tempoarary message tag (<#_ text_with_percentage_vars#>) and run the action
+ replace tags with keys in the APM.
+
+
+
+ The variable values in the message are usually fetched with upvar, here is an example from dotlrn:
+
+
+
+ ad_return_complaint 1 "Error: A [parameter::get -parameter classes_pretty_name]
+ must have <em>no</em>[parameter::get -parameter class_instances_pretty_plural] to be deleted"
+
+
+
+ was replaced by:
+
+
+
+ set subject [parameter::get -localize -parameter classes_pretty_name]
+ set class_instances [parameter::get -localize -parameter class_instances_pretty_plural]
+
+ ad_return_complaint 1 [_ dotlrn.class_may_not_be_deleted]
+
+
+
+ This kind of interpolation also works in adp files where adp variable values will be inserted into the message.
+
+
+
+ Alternatively, you may pass in an array list of the variable values to be interpolated into the message so that
+ our example becomes:
+
+
+
+ set msg_subst_list [list subject [parameter::get -localize -parameter classes_pretty_name]
+ class_instances [parameter::get -localize -parameter class_instances_pretty_plural]]
+
+ ad_return_complaint 1 [_ dotlrn.class_may_not_be_deleted $msg_subst_list]
+
+
+
+ When we were done going through the tcl files we ran the following
+ commands to check for mistakes:
+
+
+
+ # Message tags should usually not be in curly braces since then the message lookup may not be
+ # executed then (you can usually replace curly braces with the list command). Find message tags
+ # in curly braces (should return nothing, or possibly a few lines for inspection)
+ find -iname '*.tcl'|xargs egrep -i '\{.*<#'
+ # Check if you've forgotten space between default key and text in message tags (should return nothing)
+ find -iname '*.tcl'|xargs egrep -i '<#_[^ ]'
+ # Review the list of tcl files with no message lookups
+ for tcl_file in $(find -iname '*.tcl'); do egrep -L '(<#|\[_)' $tcl_file; done
+
+
+
+ When you feel ready you may vist your package in the
+ package manager
+ and run the action "Replace tags with keys
+ and insert into catalog" on the TCL files that you've edited to
+ replace the temporary tags with calls to the message lookup
+ procedure.
+
+
+
+
+ Checking the Consistency of Catalog Files
+
+
+ This section describes how to check that the set of keys used in
+ message lookups in tcl, adp, and info files and the set of keys in
+ the catalog file are identical. The scripts below assume that
+ message lookups in adp and info files are on the format
+ \#package_key.message_key\#, and that message lookups in tcl files
+ are always is done with one of the valid lookups described above. The script further assumes
+ that you have perl installed and in your path. Run the script like
+ this:
+
+
+
+ acs-lang/bin/check-catalog.sh package_key
+
+
+
+ where package_key is the key of the package that you want to
+ test. If you don't provide the package_key argument then all
+ packages with catalog files will be checked.
+ The script will run its checks primarily on en_US xml catalog files.
+
+
+
+
+
+
APM Parameters
@@ -364,151 +544,8 @@
Internationalization, then
Convert ADP, Tcl, and SQL files to using the
message catalog..
-
-
-
- Replace text with tags:
- Choose Find human language text and replace with <# ... #> tags. This automated process
- automatically locates chunks of translatable text,
- generates a reasonable message key, and replaces the text
- with a "temporary" tag as described above.
-
- Any pieces of text found but not extractable -- for
- example, pieces of text with embedded adp variables
- (i.e. @var_name@) -- will be listed on the result
- page. Make sure to take note of these texts and translate
- them manually. Suppose for example that our script tells you
- that it left the text "Manage forum @forum_name@"
- untouched. What you should do then is to edit the
- corresponding adp file and manually replace that text with
- something like "<#manage_forum Manage forum @forum_name@#>"
- (to save you from too much typing you may use the shorthand
- <#_ Manage forum @forum_name@#>; an underscore key will
- result in the script auto-generating a key for you based on
- the text). After you have made all such manual edits you can
- simply run the second action labeled "Replace tags with keys
- and insert into catalog".
-
-Note: running this action will not find translatable text within HTML or adp tags on adp pages (i.e. text in alt tags of images), nor will it find translatable text in tcl files. Such texts will have to be found manually. If those texts are in adp files they are best replaced with the <#message_key text#> tags that can be extracted by the action described below. Here are some commands that we used on Linux to look for texts in adp pages not found by the script:
-
-# List image tags with alt attributes, look for alt attributes with literal text
-find -iname '*.adp'|xargs egrep -i '<img.*alt='
-# List submit buttons, look for text in the value attribute
-find -iname '*.adp'|xargs egrep -i '<input[^>]*type="?submit'
-
-
-
- When you run this step, any modified files are backed up in
- a file with a ".orig" suffix. Those files are
- never overwritten, though, so the .orig file will always be
- the original page file, not the second-to-last file. Running
- this action multiple times is harmless.
-
-
-
-
-
-
- Manually verify each ADP
- file. If necessary, you can add additional
- <#...#> tags, or you can move or remove the ones set
- by the automated step.
-
-
-
-
-
- Manually mark up Tcl
- files, marking up translatable text with the
- <#...#> notation.
-
- Ttranslatable texts are often found in page titles, context bars, and form labels and options. Many times the texts are enclosed in double quotes. Use the following grep commands on Linux to highlight translatable text in tcl files for us:
-
- # Find text in double quotes
-find -iname '*.tcl'|xargs egrep -i '"[a-z]'
-# Find untranslated text in form labels, options and values
-find -iname '*.tcl'|xargs egrep -i '\-(options|label|value)'|egrep -v '<#'|egrep -v '\-(value|label|options)[[:space:]]+\$[a-zA-Z_]+[[:space:]]*\\?[[:space:]]*$'
-# Find text in page titles and context bars
-find -iname '*.tcl'|xargs egrep -i 'set (title|page_title|context_bar) '|egrep -v '<#'
-# Find text in error messages
-find -iname '*.tcl'|xargs egrep -i '(ad_complain|ad_return_error)'|egrep -v '<#'
-
- You may mark up translatable text in tcl library files and tcl pages with temporary tags (on the <#key text#> syntax mentioned previously). If you have a sentence or paragraph of text with variables and or procedure calls in it you should in most cases try to turn the whole text into one message in the catalog. In those cases, follow these steps:
-
-
-
- For each message call in the text, decide on a variable
- name and replace the procedure call with a variable
- lookup on the syntax %var_name%. Remember to initialize
- a tcl variable with the same name on some line above the
- text.
-
-
- If the text is in a tcl file you must replace
- variable lookups (occurences of $var_name or
- ${var_name}) with %var_name%
-
-
- You are now ready to follow the normal procedure
- and mark up the text using a tempoarary message tag (<#_
- text_with_percentage_vars#>) and run the action replace
- tags with keys in the APM.
-
-
- The variable values in the message are usually fetched with upvar, here is an example from dotlrn:
-
- ad_return_complaint 1 "Error: A [parameter::get -parameter classes_pretty_name]
- must have no[parameter::get -parameter class_instances_pretty_plural] to be deleted"
-
-was replaced by:
-
- set subject [parameter::get -localize -parameter classes_pretty_name]
-set class_instances [parameter::get -localize -parameter class_instances_pretty_plural]
-ad_return_complaint 1 [_ dotlrn.class_may_not_be_deleted]
-
-
- This kind of interpolation also works in adp files where adp variable values will be inserted into the message.
-
- Alternatively, you may pass in an array list of the variable values to be interpolated into the message so that our example becomes:
-
- set msg_subst_list [list subject [parameter::get -localize -parameter classes_pretty_name]
- class_instances [parameter::get -localize -parameter class_instances_pretty_plural]]
-
-ad_return_complaint 1 [_ dotlrn.class_may_not_be_deleted $msg_subst_list]
-
- When we were done going through the tcl files we ran the following commands to check for mistakes:
-
- # Message tags should usually not be in curly braces since then the message lookup may not be
-# executed then (you can usually replace curly braces with the list command). Find message tags
-# in curly braces (should return nothing, or possibly a few lines for inspection)
-find -iname '*.tcl'|xargs egrep -i '\{.*<#'
-# Check if you've forgotten space between default key and text in message tags (should return nothing)
-find -iname '*.tcl'|xargs egrep -i '<#_[^ ]'
-# Review the list of tcl files with no message lookups
-for tcl_file in $(find -iname '*.tcl'); do egrep -L '(<#|\[_)' $tcl_file; done
-
- When you feel ready you may run the action "Replace tags with keys and insert into catalog" on the tcl files that you've edited to replace the temporary tags with calls to the message lookup procedure.
- The acs-lang/bin/check-catalog.sh script checks that the set of keys used in message lookups in tcl, adp, and info files and the set of keys in the catalog file are identical. The scripts below assume that message lookups in adp and info files are on the format #package_key.message_key#, and that message lookups in tcl files are always done with the underscore procedure. The script assumes that you have perl installed and in your path. Run the script like this:
-
- acs-lang/bin/check-catalog.sh package_key
-
- where package_key is the key of the package that you want to test. If you don't provide the package_key argument then all packages with catalog files will be checked. The script will run its checks on en_US xml catalog files.
-
-
-
-
-
- Replace tags with keys:
- This is an automated process, which will replace the
- temporary <#...#> notation in both ADP and Tcl files
- with the appropriate notation for the type of file, and
- store the text in the message catalog. You need to run the
- process twice, once for ADP files, and once for Tcl files.
-
-
-
-
+
Internationalize Package Parameters with visible messages
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/rp.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/rp.xml,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/rp.xml 11 Dec 2003 21:39:48 -0000 1.8
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/rp.xml 26 Jan 2004 15:39:44 -0000 1.9
@@ -33,9 +33,6 @@
-
- This is an image of the flow in the Request Processor
-
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 11 Dec 2003 21:39:48 -0000 1.5
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 26 Jan 2004 15:39:44 -0000 1.6
@@ -304,4 +304,137 @@
+
+ Notifications
+
+ by David Bell and Simon Carstensen
+
+
+ The notifications package allows you to send notifications through any
+ defined communications medium (e.g. email, sms) upon some event occuring within
+ the system.
+ This tutorial steps through the process of integrating the notifications
+ package with your package.
+
+ First step is to create the notification types. To do this a script similar
+ to the one below needs to be loaded into Postgresql. I create this script in a
+ package-name/sql/postgresql/package-name-notifications-init.sql file. I then load
+ this file from my create sql file. The following code snippet is taken from
+ Weblogger. It creates a lars_blogger_notif notification type (which was created
+ above).
+
+
+ create function inline_0() returns integer as '
+ declare
+ impl_id integer;
+ v_foo integer;
+ begin
+ -- the notification type impl
+ impl_id := acs_sc_impl__new (
+ ''NotificationType'',
+ ''lars_blogger_notif_type'',
+ ''lars-blogger''
+ );
+
+ v_foo := acs_sc_impl_alias__new (
+ ''NotificationType'',
+ ''lars_blogger_notif_type'',
+ ''GetURL'',
+ ''lars_blogger::notification::get_url'',
+ ''TCL''
+ );
+
+ v_foo := acs_sc_impl_alias__new (
+ ''NotificationType'',
+ ''lars_blogger_notif_type'',
+ ''ProcessReply'',
+ ''lars_blogger::notification::process_reply'',
+ ''TCL''
+ );
+
+ PERFORM acs_sc_binding__new (
+ ''NotificationType'',
+ ''lars_blogger_notif_type''
+ );
+
+ v_foo:= notification_type__new (
+ NULL,
+ impl_id,
+ ''lars_blogger_notif'',
+ ''Blog Notification'',
+ ''Notifications for Blog'',
+ now(),
+ NULL,
+ NULL,
+ NULL
+ );
+
+ -- enable the various intervals and delivery methods
+ insert into notification_types_intervals
+ (type_id, interval_id)
+ select v_foo, interval_id
+ from notification_intervals where name in (''instant'',''hourly'',''daily'');
+
+ insert into notification_types_del_methods
+ (type_id, delivery_method_id)
+ select v_foo, delivery_method_id
+ from notification_delivery_methods where short_name in (''email'');
+
+ return (0);
+ end;
+ ' language 'plpgsql';
+
+ select inline_0();
+ drop function inline_0();
+
+
+ The next step is to setup our notification creation. A new notification must
+ be added to the notification table for each blog entry added. We do this using the
+ notification::new procedure
+
+
+ notification::new \
+ -type_id [notification::type::get_type_id \
+ -short_name lars_blogger_notif] \
+ -object_id $blog(package_id) \
+ -response_id $blog(entry_id) \
+ -notif_subject $blog(title) \
+ -notif_text $new_content
+
+
+ This code is placed in the tcl procedure that creates blog entries, right after
+ the entry gets created in the code. The $blog(package_id)
+ is the OpenACS object_id of the Weblogger instance to which the entry has been posted to
+ and the $new_content is the content of the entry.
+
+ The final step is to setup the notification subscription process. In this
+ example we want to let a user find out when a new entry has been posted to the blog. To
+ do this we put a link on the blog that allows them to subscribe to notifications of new
+ entries. The notifications/requests-new page is very handy in this situation.
+
+ Such a link can be created using the notification::display::request_widget
+ proc:
+
+ set notification_chunk [notification::display::request_widget \
+ -type lars_blogger_notif \
+ -object_id $package_id \
+ -pretty_name [lars_blog_name] \
+ -url [lars_blog_public_package_url] \
+ ]
+
+
+ which will return something like
+
+
+ You may <a href="/notifications/request-new?...">request notification</a> for Weblogger.
+
+ which can be readily put on the blog index page. The pretty_name
+ parameter is what appears at the end of the text returned (i.e. "... request notification</a> for pretty_name"),
+ The url parameter should be set to the address we want the user
+ to be redirected to after they have finished the subscription process.
+
+ This should be all you need to implement a notification system. For more examples
+ look at the forums package.
+
+
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml 11 Dec 2003 21:39:48 -0000 1.8
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml 26 Jan 2004 15:39:44 -0000 1.9
@@ -1,5 +1,5 @@
-
%myvars;
@@ -55,77 +55,59 @@
by the API browser. The string
$Id:$ will automatically be
expanded when the file is checked in to cvs.
-[service0@yourserver postgresql]$ emacs myfirstpackage-create.sql
+[service0 ~]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/sql/postgresql
+[service0 postgresql]$ emacs myfirstpackage-create.sqlPaste this into the file and save and close.The creation script calls a function,
- content_type__create_type, which
+ content_type__create_type, which
in turn creates the necessary database changes to support our data
object. Notice the use of "mfp." This token, derived from "My
First Package," ensures that our object is unlikely to conflict
with objects from other packages.Create a database file to drop everything if the package
is uninstalled.
- [service0@yourserver postgresql]$ emacs myfirstpackage-drop.sql
+
+[service0 postgresql]$ emacs myfirstpackage-drop.sqlRun the create script manually to add your tables and functions.
- [service0@yourserver postgresql]$ psql -f myfirstpackage-create.sql
-psql:myfirstpackage-create.sql:14: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'mfp_notes_pkey' for table 'mfp_notes'
-psql:myfirstpackage-create.sql:14: NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+ [service0 postgresql]$ psql -f myfirstpackage-create.sql
+psql:myfirstpackage-create.sql:15: NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index 'mfp_notes_pkey' for table 'mfp_notes'
+psql:myfirstpackage-create.sql:15: NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
content_type__create_type
---------------------------
0
(1 row)
-[service0@yourserver postgresql]$
+ content_folder__register_content_type
+---------------------------------------
+ 0
+(1 row)
+
+[service0 postgresql]$If there are errors, use them to debug the sql file and try again. If there are errors in the database table creation, you may need to run the drop script to drop the table so that you can recreate it. The drop script will probably have errors since some of the things it's trying to drop may be missing. They can be ignored.Once you get the same output as shown above, test the drop script:
- [service0@yourserver postgresql]$ psql -f myfirstpackage-drop.sql
+ [service0 postgresql]$ psql -f myfirstpackage-drop.sql
+ content_folder__unregister_content_type
+-----------------------------------------
+ 0
+(1 row)
+
content_type__drop_type
-------------------------
0
(1 row)
-[service0@yourserver postgresql]$
+[service0 postgresql]$Once both scripts are working without errors, run the create script one last time and proceed.
+ [service0 postgresql]$ psql -f myfirstpackage-create.sql
\ No newline at end of file
Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 11 Dec 2003 21:39:48 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 26 Jan 2004 15:39:44 -0000 1.7
@@ -15,8 +15,8 @@
Install some APIAs a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:
- cp /var/lib/aolserver/service1/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service1/packages/myfirstpackage/tcl/
- To make this file take effect, go to the APM and choose "Reload all files" for "MyFirstPackage".
+ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/
+ To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage".Build the "Index" page
@@ -31,13 +31,13 @@
database-specific SQL. The default page in any directory is
index, so we'll build that
first, starting with the tcl file:
- [service0@yourserver postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
-[service0@yourserver www emacs index.tcl
+ [service0 postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
+[service0 www]$ emacs index.tclPaste this into the file.ad_page_contract {
This is the main page for the package. It displays all of the Notes and provides links to edit them and to create new Notes.
- @author Your Name (you@yourserver.test)
+ @author Your Name (you@example.com)
@cvs-id $Id$
}
@@ -98,7 +98,7 @@
ad_page_contract {
This is the main page for the package. It displays all of the Notes and provides links to edit them and to create new Notes.
- @author Your Name (you@yourserver.test)
+ @author Your Name (you@example.com)
@cvs-id $Id$
@param item_id If present, assume we are editing that note. Otherwise, we are creating a new note.
@@ -147,7 +147,7 @@
ad_page_contract {
This deletes a note
- @author Your Name (you@yourserver.test)
+ @author Your Name (you@example.com)
@cvs-id $Id$
@param item_id The item_id of the note to delete
Index: openacs-4/packages/acs-core-docs/www/xml/engineering-standards/docbook-primer.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/engineering-standards/docbook-primer.xml,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-core-docs/www/xml/engineering-standards/docbook-primer.xml 11 Dec 2003 21:39:49 -0000 1.10
+++ openacs-4/packages/acs-core-docs/www/xml/engineering-standards/docbook-primer.xml 26 Jan 2004 15:39:44 -0000 1.11
@@ -712,7 +712,7 @@
You could also look at the acs-core-docs Makefile
- for examples of how these documents are generated.`
+ for examples of how these documents are generated.
@@ -722,6 +722,9 @@
+ Using Xinclude
+
+
The LDP Author
Index: openacs-4/packages/acs-core-docs/www/xml/engineering-standards/psgml-mode.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/engineering-standards/psgml-mode.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/engineering-standards/psgml-mode.xml 11 Dec 2003 21:39:49 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/engineering-standards/psgml-mode.xml 26 Jan 2004 15:39:44 -0000 1.7
@@ -11,6 +11,8 @@
By David Lutterkort
+ Note: nxml mode replaces and/or complements psgml mode. More information.
+
What it is
@@ -80,7 +82,7 @@
in it. By maintaining your own CATALOG, it is easy to add more
DTD's without changing your emacs settings. (How about that HTML 4.01 DTD you
always wanted to get from W3C ? The
-DTD is in the zip archives and tarballs available on the site.
+DTD is in the zip archives and tarballs available on the site.)That's it. Now you are ready to tell emacs all about PSGML mode and
@@ -133,7 +135,7 @@
;; Some convenient key definitions:
(define-key sgml-mode-map "\C-c\C-x\C-e" 'sgml-describe-element-type)
(define-key sgml-mode-map "\C-c\C-x\C-i" 'sgml-general-dtd-info)
- (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity))))
+ (define-key sgml-mode-map "\C-c\C-x\C-t" 'sgml-describe-entity)
Index: openacs-4/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml 11 Dec 2003 21:39:49 -0000 1.12
+++ openacs-4/packages/acs-core-docs/www/xml/for-everyone/release-notes.xml 26 Jan 2004 15:39:44 -0000 1.13
@@ -42,22 +42,17 @@
After installation, the full documentation set can be found by visiting
- http://[your-host]/doc.
+ http://yourserver/doc.
END OF TEMPLATE -->
-
- Version 5.0.0 beta
+
+ Version 5.0.0
- This is the second beta release of OpenACS 5.0.0 (tagged as oacs-5-0-0b4). This
- release may still have a number of serious bugs, and is not suitable for
- production systems. It has passed several release criteria,
- including that it installs successfully, that all automated
- tests succeed, and that there are no known severity 1
- (security hole, data loss, system crash) bugs.
+ This is OpenACS 5.0.0. This version contains no known security, data loss, or crashing bugs, nor any bugs judged release blockers. This version has received manual testing. It has passed current automated testing, which is not comprehensive. This release contains work done on the translation server http://translate.openacs.org through 3 Nov 2003.
@@ -78,7 +73,7 @@
After installation, the full documentation set can be found by visiting
- http://[your-host]/doc.
+ http://yourserver/doc.
@@ -192,9 +187,20 @@
- The undocumented special handling of ~ and +variable+ in formtemplates has been removed in favor of
- using <noparse> and \@variable\@ (the standard templating mechanisms). Locally
- provided formtemplate styles still using these mechanisms will break.
+ With the release of OpenACS 5, PostgreSQL 7.2 is no longer supported.
+ Upgrades are supported from OpenACS 4.6.3 under Oracle or
+ PostgreSQL 7.3.
+
+
+
+
+
+ The undocumented special handling of ~ and +variable+ in
+ formtemplates, found in packages/acs-templating/resources/*,
+ has been removed in favor of using <noparse> and
+ \@variable\@ (the standard templating mechanisms). Locally
+ provided formtemplate styles still using these mechanisms
+ will break.
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 11 Dec 2003 21:39:49 -0000 1.16
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 26 Jan 2004 15:39:44 -0000 1.17
@@ -18,8 +18,8 @@
Download the aolserver tarball and unpack it.
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
+ [root root]# cd /usr/local/src
+[root src]# wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
--15:38:08-- http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
=> `aolserver3.3oacs1.tar.gz'
Resolving uptime.openacs.org... done.
@@ -30,8 +30,8 @@
100%[====================================>] 3,858,074 66.56K/s ETA 00:00
15:39:05 (66.56 KB/s) - `aolserver3.3oacs1.tar.gz' saved [3858074/3858074]
-[root@yourserver src]# tar xzf aolserver3.3oacs1.tar.gz
-[root@yourserver src]#
+[root src]# tar xzf aolserver3.3oacs1.tar.gz
+[root src]#
cd /usr/local/src
wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
tar xzf aolserver3.3oacs1.tar.gz
@@ -44,11 +44,11 @@
Compile and install AOLserver. First, prepare the installation directory and the source code. The message about BUILD-MODULES can be ignored.root@yourserver root]# mkdir -p /usr/local/aolserver
-[root@yourserver root]# cd /usr/local/src/aolserver
-[root@yourserver aolserver]# ./conf-clean
+[root root]# cd /usr/local/src/aolserver
+[root aolserver]# ./conf-clean
cat: BUILD-MODULES: No such file or directory
Done.
-[root@yourserver aolserver]#mkdir -p /usr/local/aolserver
+[root aolserver]#mkdir -p /usr/local/aolserver
cd /usr/local/src/aolserver
./conf-clean
@@ -65,8 +65,8 @@
conf-inst should contain the
location where AOLserver is to be installed. Overwrite the
tarball's default value with our default value, /usr/local/aolserver:
- [root@yourserver aolserver]# echo "/usr/local/aolserver" > conf-inst
-[root@yourserver aolserver]#
+ [root aolserver]# echo "/usr/local/aolserver" > conf-inst
+[root aolserver]#conf-make should contain the
name of the GNU Make command on your system. It defaults to
@@ -81,7 +81,7 @@
make these symlinks: ln -s
/usr/include/postgresql/ /usr/include/pgsql
and ln -s /usr/lib/postgresql /usr/local/pgsql)
- [root@yourserver aolserver]# export POSTGRES=/usr/local/pgsql; ./conf
+ [root aolserver]# export POSTGRES=/usr/local/pgsql; ./conf
Building in /usr/local/aolserver
with the following modules:
aolserver
@@ -102,7 +102,7 @@
Creating ...
==================================================================
Done Building Sat Mar 8 10:31:35 PST 2003
-[root@yourserver aolserver]#
+[root aolserver]#
This takes about 5 minutes. It builds aolserver, several modules, and the database driver. (Upgraders, note that the postgres database driver has changed from postgres.so to nspostgres.so). All of the results are logged to files in /usr/local/src/aolserver/log. If you run into problems running AOLserver, check these files for build errors.
@@ -121,20 +121,20 @@
Oracle
- [root@yourserver aolserver]# cd /usr/local/aolserver/bin
-[root@yourserver bin]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
-[root@yourserver bin]# chmod 750 nsd-oracle
-[root@yourserver bin]#
+ [root aolserver]# cd /usr/local/aolserver/bin
+[root bin]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
+[root bin]# chmod 750 nsd-oracle
+[root bin]#
cd /usr/local/aolserver/bin
cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
chmod 750 nsd-oraclePostgreSQL
- [root@yourserver aolserver]# cd /usr/local/aolserver/bin
-[root@yourserver bin]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
-[root@yourserver bin]# chmod 755 nsd-postgres
-[root@yourserver bin]#
+ [root aolserver]# cd /usr/local/aolserver/bin
+[root bin]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
+[root bin]# chmod 755 nsd-postgres
+[root bin]#
cd /usr/local/aolserver/bin
cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
chmod 755 nsd-postgres
@@ -148,8 +148,8 @@
tarball, unpack it, adjust the configuration file to match our patched
distribution of aolserver, and compile it.
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
+ [root root]# cd /usr/local/src
+[root src]# wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
--16:40:58-- http://www.tdom.org/tDOM-0.7.8.tar.gz
=> `tDOM-0.7.8.tar.gz'
Resolving www.tdom.org... done.
@@ -161,9 +161,9 @@
16:41:04 (138.06 KB/s) - `tDOM-0.7.8.tar.gz' saved [826613/826613]
-[root@yourserver src]# tar xzf tDOM-0.7.8.tar.gz
-[root@yourserver src]# cd tDOM-0.7.8/unix
-[root@yourserver unix]#
+[root src]# tar xzf tDOM-0.7.8.tar.gz
+[root src]# cd tDOM-0.7.8/unix
+[root unix]#
cd /usr/local/src
wget --passive http://www.tdom.org/tDOM-0.7.8.tar.gz
tar xzf tDOM-0.7.8.tar.gz
@@ -181,22 +181,22 @@
--with-aolserver=$aolsrc \
--with-tcl=$aolsrc/tcl8.3.2/unix
And configure and compile:
- [root@yourserver unix]# sh CONFIG
+ [root unix]# sh CONFIG
creating cache ./config.cache
checking for memmove... yes
(many lines omitted)
creating Makefile
creating tdomConfig.sh
-[root@yourserver unix]# make
+[root unix]# make
gcc -pipe -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_THREADS=1
-DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1
(many lines omitted)
-Wl,-rpath,/usr/local/lib -o tcldomsh;\
fi
-[root@yourserver unix]# cp libtdom0.7.8.so /usr/local/aolserver/bin/
-[root@yourserver unix]# cd /usr/local/aolserver/bin/
-[root@yourserver bin]# ln -s libtdom0.7.8.so libtdom.so
-[root@yourserver bin]#
+[root unix]# cp libtdom0.7.8.so /usr/local/aolserver/bin/
+[root unix]# cd /usr/local/aolserver/bin/
+[root bin]# ln -s libtdom0.7.8.so libtdom.so
+[root bin]#
sh CONFIG
make
@@ -227,10 +227,10 @@
/usr/local/aolserver/log and
/usr/local/aolserver/servers.
- [root@yourserver root]# cd /usr/local/aolserver
-[root@yourserver aolserver]# chown -R root.web log servers
-[root@yourserver aolserver]# chmod -R g+w log servers
-[root@yourserver aolserver]# ls -l
+ [root root]# cd /usr/local/aolserver
+[root aolserver]# chown -R root.web log servers
+[root aolserver]# chmod -R g+w log servers
+[root aolserver]# ls -l
total 32
drwxr-sr-x 2 root root 4096 Mar 8 12:57 bin
drwxr-xr-x 3 root root 4096 Mar 8 10:34 include
@@ -239,7 +239,7 @@
drwxr-sr-x 3 root root 4096 Mar 8 10:31 modules
-rw-r--r-- 1 root root 7320 Mar 31 2001 sample-config.tcl
drwxrwsr-x 3 root web 4096 Mar 8 10:31 servers
-[root@yourserver aolserver]#
+[root aolserver]#
cd /usr/local/aolserver
chown -R root.web log servers
@@ -252,8 +252,8 @@
hostname. It will then start up the server at port 8000 of that
IP address.
- [root@yourserver aolserver]# ./bin/nsd -t sample-config.tcl -u nobody -g web
-[root@yourserver aolserver]# [08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: starting to read config file...
+ [root aolserver]# ./bin/nsd -t sample-config.tcl -u nobody -g web
+[root aolserver]# [08/Mar/2003:15:07:18][31175.8192][-main-] Notice: config.tcl: starting to read config file...
[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nsssl not loaded -- key/cert files do not exist.
[08/Mar/2003:15:07:18][31175.8192][-main-] Warning: config.tcl: nscp not loaded
-- user/password is not set.
@@ -274,7 +274,7 @@
- [root@yourserver aolserver]# lynx localhost:8000
+ [root aolserver]# lynx localhost:8000
@@ -287,8 +287,8 @@
Shutdown the test server:
- [root@yourserver aolserver]# killall nsd
-[root@yourserver aolserver]#
+ [root aolserver]# killall nsd
+[root aolserver]#
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver4.xml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/database-maintenance.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/database-maintenance.xml,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/database-maintenance.xml 11 Dec 2003 21:39:49 -0000 1.3
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/database-maintenance.xml 26 Jan 2004 15:39:44 -0000 1.4
@@ -29,7 +29,7 @@
Change the OpenACS service's configuration file to
point to the remote database. Edit
- /web/service0/etc/config.tcl
+ /var/lib/aolserver/service0/etc/config.tcl
and changeto
@@ -54,20 +54,17 @@
option. This command will drop the user and every database object
the user owns.
-
-SVRMGR> drop user service0 cascade;
+ SVRMGR> drop user service0 cascade;
If this does not work because svrmgrl "cannot drop a user that
is currently connected", make sure to kill the AOLserver using
this user. If it still does not work, do:
-
-SVRMGR> select username, sid, serial# from v$session where lower(username)='service0';
+ SVRMGR> select username, sid, serial# from v$session where lower(username)='service0';and then
-
-SVRMGR> alter system kill session 'sid,serial#';
+ SVRMGR> alter system kill session 'sid, serial#';
where sid and serial# are
@@ -78,8 +75,7 @@
If you feel the need to delete everything
related to the service, you can also issue the following:
-
-SVRMGR> drop tablespace service0 including contents cascade constraints;
+ SVRMGR> drop tablespace service0 including contents cascade constraints;
@@ -97,7 +93,7 @@
Then, to drop the db, just do:
-service0:~$ dropdb service0
+[service0 ~]$ dropdb service0
DROP DATABASE
@@ -119,13 +115,12 @@
Edit your crontab:
-
-joeuser:~$ crontab -e
+ [joeuser ~]$ crontab -eWe'll set vacuum up to run nightly at 1 AM. Add the following
line:
-0 1 * * * /usr/local/pgsql/bin/vacuumdb birdnotes
+0 1 * * * /usr/local/pgsql/bin/vacuumdb service0($Id$)
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/macinstall.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/macinstall.xml,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/macinstall.xml 11 Dec 2003 21:39:49 -0000 1.4
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/macinstall.xml 26 Jan 2004 15:39:44 -0000 1.5
@@ -6,8 +6,31 @@
]>
-OpenACS Installation Guide for Mac OS X
- There are several resources for installing on OS X.
+ OpenACS Installation Guide for Mac OS X
+
+ Prerequisites
+ Install readline:
+
+
+
+ Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src
+
+
+ Extract readline in /usr/local/src, configure, compile, and install:
+ su - root
+cd /usr/local/src
+tar xvfz readline-4.3.tar.gz
+readline-4.3
+./configure
+make
+make install
+
+
+ Proceed with the Unix-like system instructions. OS X is incompatible with Oracle 8, and Oracle 9i on OSX is not yet verified for OpenACS. So continue with . Additional special steps for OS X are documented inline with the standard Unix-like instructions.
+
+
+
+ Additional resources for installing on OS X.OpenACS on Mac OS X Quickstart($Id$)
-
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 11 Dec 2003 21:39:49 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/maintenance.xml 26 Jan 2004 15:39:44 -0000 1.7
@@ -33,16 +33,16 @@
tarball at
/var/lib/aolserver/service0/etc/daemontools. To use it, first ill any existing AOLserver instances. As root, link the daemontools directory into the /service directory. Daemontools' svscan process checks this directory every five seconds, and will quickly execute run.
- [service0@yourserver etc]$ killall nsd
+ [service0 etc]$ killall nsd
nsd: no process killed
-[service0@yourserver etc]$ exit
+[service0 etc]$ exit
-[root@yourserver root]# ln -s /var/lib/aolserver/service0/etc/daemontools/ /service/service0
+[root root]# ln -s /var/lib/aolserver/service0/etc/daemontools/ /service/service0Verify that AOLserver is running.
- [root@yourserver root]# ps -auxw | grep nsd
+ [root root]# ps -auxw | grep nsdservice0 5562 14.2 6.2 22436 15952 ? S 11:55 0:04 /usr/local/aolserver/bin/nsd -it /var/lib/aolserver/service0/etc/config.tcl -u serve
root 5582 0.0 0.2 3276 628 pts/0 S 11:55 0:00 grep nsd
-[root@yourserver root]#
+[root root]#The user service0 can now control the service service0 with these commands:
@@ -89,16 +89,16 @@
Install a script to automate the stopping and starting
of AOLserver services via daemontools. You can then restart a service via restart-aolserver service0
- [root@yourserver root]# cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
-[root@yourserver root]# chmod 755 /usr/local/bin/restart-aolserver
-[root@yourserver root]#
+ [root root]# cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/restart-aolserver-daemontools.txt /usr/local/bin/restart-aolserver
+[root root]# chmod 755 /usr/local/bin/restart-aolserver
+[root root]#
At this point, these commands will work only for the
root user. Grant permission for the web group to use svc commands on the service0 server.
- [root@yourserver root]# svgroup web /service/service0
-[root@yourserver root]#
+ [root root]# svgroup web /service/service0
+[root root]#Verify that the controls work. You may want to tail -f /var/lib/aolserver/service0/log/service0-error.log in another window, so you can see what happens when you type these commands.
@@ -170,13 +170,13 @@
/usr/local/bin.
-joeuser:~$ su -
+[joeuser ~]$ su -
Password: ***********
-root:~# cp /tmp/restart-aolserver.txt /usr/local/bin/restart-aolserver
-root:~# chown root.web /usr/local/bin/restart-aolserver
-root:~# chmod 4750 /usr/local/bin/restart-aolserver
-root:~# ln -s /usr/bin/perl /usr/local/bin/perl
-root:~# exit
+[root ~]# cp /tmp/restart-aolserver.txt /usr/local/bin/restart-aolserver
+[root ~]# chown root.web /usr/local/bin/restart-aolserver
+[root ~]# chmod 4750 /usr/local/bin/restart-aolserver
+[root ~]# ln -s /usr/bin/perl /usr/local/bin/perl
+[root ~]# exit
@@ -188,12 +188,12 @@
running. You should see the following lines.
-joeuser:~$ killall nsd
+[joeuser ~]$ killall nsd
nsd: no process killed
-joeuser:~$ /usr/local/aolserver/bin/nsd-postgres -t ~/var/lib/aolserver/birdnotes/nsd.tcl
-joeuser:~$ restart-aolserver birdnotes
+[joeuser ~]$ /usr/local/aolserver/bin/nsd-postgres -t ~/var/lib/aolserver/birdnotes/nsd.tcl
+[joeuser ~]$ restart-aolserver birdnotes
Killing 23727
-joeuser:~$ killall nsd
+[joeuser ~]$ killall nsd
nsd: no process killed
@@ -210,9 +210,9 @@
/etc/inittab for
editing.
-joeuser:~$ su -
+[joeuser ~]$ su -
Password: ************
-root:~# emacs -nw /etc/inittab
+[root ~]# emacs -nw /etc/inittab
@@ -236,9 +236,9 @@
/etc/inittab.
-root:~# killall nsd
+[root ~]# killall nsd
nsd: no process killed
-root:~# /sbin/init q
+[root ~]# /sbin/init q
@@ -247,7 +247,7 @@
again.
-root:~# restart-aolserver birdnotes
+[root ~]# restart-aolserver birdnotes
Killing 23750
@@ -328,17 +328,17 @@
Prepare a certificate directory for the service.
- [service0@yourserver etc]$ mkdir /var/lib/aolserver/service0/etc/certs
-[service0@yourserver etc]$ chmod 700 /var/lib/aolserver/service0/etc/certs
-[service0@yourserver etc]$
+ [service0 etc]$ mkdir /var/lib/aolserver/service0/etc/certs
+[service0 etc]$ chmod 700 /var/lib/aolserver/service0/etc/certs
+[service0 etc]$
mkdir /var/lib/aolserver/service0/etc/certs
chmod 700 /var/lib/aolserver/service0/etc/certsIt takes two files to support an SSL connection. The certificate is the public half of the key pair - the server sends the certificate to browser requesting ssl. The key is the private half of the key pair. In addition, the certificate must be signed by Certificate Authority or browsers will protest. Each web browser ships with a built-in list of acceptable Certificate Authorities (CAs) and their keys. Only a site certificate signed by a known and approved CA will work smoothly. Any other certificate will cause browsers to produce some messages or block the site. Unfortunately, getting a site certificate signed by a CA costs money. In this section, we'll generate an unsigned certificate which will work in most browsers, albeit with pop-up messages.Use an OpenSSL perl script to generate a certificate and key.
- [service0@yourserver service0]$ cd /var/lib/aolserver/service0/etc/certs
-[service0@yourserver certs]$ perl /usr/share/ssl/misc/CA -newcert
+ [service0 service0]$ cd /var/lib/aolserver/service0/etc/certs
+[service0 certs]$ perl /usr/share/ssl/misc/CA -newcert
Using configuration from /usr/share/ssl/openssl.cnf
Generating a 1024 bit RSA private key
...++++++
@@ -347,16 +347,16 @@
Enter PEM pass phrase:Enter a pass phrase for the CA certificate. Then, answer the rest of the questions. At the end you should see this:Certificate (and private key) is in newreq.pem
-[service0@yourserver certs]$
+[service0 certs]$newreq.pem contains our certificate and private key. The key is protected by a passphrase, which means that we'll have to enter the pass phrase each time the server starts. This is impractical and unnecessary, so we create an unprotected version of the key. Security implication: if anyone gets access to the file keyfile.pem, they effectively own the key as much as you do. Mitigation: don't use this key/cert combo for anything besides providing ssl for the web site.
- [root@yourserver misc]# openssl rsa -in newreq.pem -out keyfile.pem
+ [root misc]# openssl rsa -in newreq.pem -out keyfile.pem
read RSA key
Enter PEM pass phrase:
writing RSA key
-[service0@yourserver certs]$
+[service0 certs]$ To create the certificate file, we take the combined file, copy it, and strip out the key.
- [service0@yourserver certs]$ cp newreq.pem certfile.pem
-[root@yourserver misc]# emacs certfile.pem
+ [service0 certs]$ cp newreq.pem certfile.pem
+[root misc]# emacs certfile.pemStrip out the section that looks like-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
@@ -379,12 +379,12 @@
the OpenACS tarball.
- [root@yourserver src]# su - service0
-[service0@yourserver service0]$ cd /var/lib/aolserver/service0
-[service0@yourserver service0]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
-[service0@yourserver service0]$ mkdir www/log
-[service0@yourserver service0]$ cp -r /usr/share/analog-5.31/images www/log/
-[service0@yourserver service0]$
+ [root src]# su - service0
+[service0 service0]$ cd /var/lib/aolserver/service0
+[service0 service0]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
+[service0 service0]$ mkdir www/log
+[service0 service0]$ cp -r /usr/share/analog-5.31/images www/log/
+[service0 service0]$
su - service0
cd /var/lib/aolserver/service0
cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/analog.cfg.txt etc/analog.cfg
@@ -399,29 +399,29 @@
Run it.
- [service0@yourserver service0]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
+ [service0 service0]$ /usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
/usr/share/analog-5.31/analog: analog version 5.31/Unix
/usr/share/analog-5.31/analog: Warning F: Failed to open DNS input file
/home/service0/dnscache: ignoring it
(For help on all errors and warnings, see docs/errors.html)
/usr/share/analog-5.31/analog: Warning R: Turning off empty Search Word Report
-[service0@yourserver service0]$
+[service0 service0]$Verify that it works by browing to http://yourserver.test:8000/log/traffic.htmlAutomate this by creating a file in
/etc/cron.daily.
- [service0@yourserver service0]$ exit
+ [service0 service0]$ exit
logout
-[root@yourserver root]# emacs /etc/cron.daily/analog
+[root root]# emacs /etc/cron.daily/analogPut this into the file:#!/bin/sh
/usr/share/analog-5.31/analog -G -g/var/lib/aolserver/service0/etc/analog.cfg
- [root@yourserver root]# chmod 755 /etc/cron.daily/analog
+ [root root]# chmod 755 /etc/cron.daily/analogTest it by running the script.
- [root@yourserver root]# sh /etc/cron.daily/analog
+ [root root]# sh /etc/cron.daily/analogBrowse to http://yourserver.test/log/traffic.html
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 11 Dec 2003 21:39:49 -0000 1.16
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 26 Jan 2004 15:39:44 -0000 1.17
@@ -19,10 +19,10 @@
/var/lib/aolserver, one
subdirectory per site. The first time you install an OpenACS
site on a server, you must create the parent directory and set its permissions:
- [root@yourserver root]# mkdir /var/lib/aolserver
-[root@yourserver root]# chgrp web /var/lib/aolserver
-[root@yourserver root]# chmod 770 /var/lib/aolserver
-[root@yourserver root]#
+ [root root]# mkdir /var/lib/aolserver
+[root root]# chgrp web /var/lib/aolserver
+[root root]# chmod 770 /var/lib/aolserver
+[root root]#
mkdir /var/lib/aolserver
chgrp web /var/lib/aolserver
chmod 770 /var/lib/aolserver
@@ -54,10 +54,9 @@
it in the service0 group so that it
can use database and server commands associated with that group.
-
- [root@yourserver root]# groupadd web
-[root@yourserver root]# useradd -g service0 -G web service0 -d /home/service0
-[root@yourserver root]#
+
+[root root]# useradd service0
+[root root]#
@@ -72,24 +71,24 @@
service's dedicated user. We put it there so that it is not
overwritten when we do the main CVS checkout to the target
location.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot co -d install openacs-4/etc/install
+ [root root]# su - service0
+[service0 service0]$ cvs -d :pserver:anonymous@openacs.org:/cvsroot co -d install openacs-4/etc/install
cvs server: Updating install
U install/README
U install/TODO
... many lines omitted ...
U install/tcl/twt-procs.tcl
U install/tcl/user-procs.tcl
-[service0@yourserver service0]$ cd install
-[service0@yourserver install]$
+[service0 service0]$ cd install
+[service0 install]$
Edit
/home/service0/install/install.tcl
and change the values as documented in the file. It will work
unchanged at 127.0.0.1:8000.Run the file as root.
- [service0@yourserver service0]$ exit
-[root@yourserver root]# sh /home/service0/install/install.sh
+ [service0 service0]$ exit
+[root root]# sh /home/service0/install/install.sh
/home/service0/install/install.sh: Starting installation with config_file
/home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/
service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes,
@@ -98,7 +97,7 @@
./install.sh: Finished (re)installing /var/lib/aolserver/service0 at Wed Nov
5 13:27:17 CET 2003. Access the new site at http://127.0.0.1:8000 with admin
username admin@yourserver.test and password 1
-[root@yourserver root]#
+[root root]#You can proceed to .
@@ -112,20 +111,19 @@
Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ cd /var/lib/aolserver
-[service0@yourserver aolserver]$ tar xzf /tmp/&tarballpath;.tgz
-[service0@yourserver aolserver]$ mv &tarballpath; service0
-[service0@yourserver aolserver]$ chmod -R 700 service0
-[service0@yourserver aolserver]$ ls -al
+ [root root]# su - service0
+[service0 service0]$ cd /var/lib/aolserver
+[service0 aolserver]$ tar xzf /tmp/&tarballpath;.tgz
+[service0 aolserver]$ mv &tarballpath; service0
+[service0 aolserver]$ chmod -R 700 service0
+[service0 aolserver]$ ls -al
total 3
drwxrwx--- 3 root web 1024 Mar 29 16:41 .
drwxr-xr-x 25 root root 1024 Mar 29 16:24 ..
drwx------ 7 service0 web 1024 Jan 6 14:36 service0
-[service0@yourserver aolserver]$ exit
+[service0 aolserver]$ exit
logout
-
-[root@yourserver root]#
+[root root]#
su - service0
cd /var/lib/aolserver
tar xzf /tmp/&tarballpath;.tgz
@@ -155,23 +153,20 @@
Verify membership by typing
groups when you login:
-
-service0:~$ groups
+ [service0 ~]$ groups
dba web
If you do not see these groups, take the following action:
-
-service0:~$ su -
+ [service0 ~]$ su -
Password: ************
-root:~# adduser service0 dba
+[root ~]# adduser service0 dba
If you get an error about an undefined group, then add that group
manually:
-
-root:~# groupadd dba
-root:~# groupadd web
+[root ~]# groupadd dba
+[root ~]# groupadd web
Make sure to logout as root when
you are finished with this step and log back in as
@@ -182,22 +177,17 @@
Connect to Oracle using
svrmgrl and login:
-
-service0:~$ svrmgrl
-
-SVRMGR> connect internal
+ [service0 ~]$ svrmgrl
+SVRMGR> connect internal
Connected.
Determine where the system tablespaces are stored:
-
-SVRMGR> select file_name from dba_data_files;
+ SVRMGR> select file_name from dba_data_files;
Example results:
-
-
-/ora8/m01/app/oracle/oradata/ora8/system01.dbf
+ /ora8/m01/app/oracle/oradata/ora8/system01.dbf
/ora8/m01/app/oracle/oradata/ora8/tools01.dbf
/ora8/m01/app/oracle/oradata/ora8/rbs01.dbf
/ora8/m01/app/oracle/oradata/ora8/temp01.dbf
@@ -230,14 +220,14 @@
root for this step:
-SVRMGR> exit
-service0:~$ su -
+SVRMGR> exit
+[service0 ~]$ su -
Password: ************
-root:~# mkdir -p /ora8/m02/oradata/ora8/
-root:~# chown service0.web /ora8/m02/oradata/ora8
-root:~# chmod 775 /ora8/m02/oradata/ora8
-root:~# exit
-service0:~$
+[root ~]# mkdir -p /ora8/m02/oradata/ora8/
+[root ~]# chown service0:web /ora8/m02/oradata/ora8
+[root ~]# chmod 775 /ora8/m02/oradata/ora8
+[root ~]# exit
+[service0 ~]$
@@ -252,41 +242,40 @@
tablespace.
-
-service0:~$ svrmgrl
-
-SVRMGR> connect internal;
-SVRMGR> create tablespace service0
- datafile '/ora8/m02/oradata/ora8/service001.dbf'
- size 50M
- autoextend on
- next 10M
- maxsize 300M
- extent management local
- uniform size 32K;
+ [service0 ~]$ svrmgrl
+SVRMGR> connect internal;
+SVRMGR> create tablespace service0
+ datafile '/ora8/m02/oradata/ora8/service001.dbf'
+ size 50M
+ autoextend on
+ next 10M
+ maxsize 300M
+ extent management local
+ uniform size 32K;
Create a database user for this service. Give the
user access to the tablespace and rights to connect. We'll use
- service0password as our password.
+ service0password as our password.
- Write down what you specify as service_name
- (i.e. service0) and
- database_password
- (i.e. service0password). You
- will need this information for configuring exports and
- AOLserver.
+ Write down what you specify as
+ service_name
+ (i.e. service0)
+ and database_password
+ (i.e. service0password). You
+ will need this information for configuring exports
+ and AOLserver.
-SVRMGR> create user service0 identified by service0password default tablespace service0
-temporary tablespace temp quota unlimited on service0;
-SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to service0;
-SVRMGR> revoke unlimited tablespace from service0;
-SVRMGR> alter user service0 quota unlimited on service0;
-SVRMGR> exit;
+SVRMGR> create user service0 identified by service0password default tablespace service0
+ temporary tablespace temp quota unlimited on service0;
+SVRMGR> grant connect, resource, ctxapp, javasyspriv, query rewrite to service0;
+SVRMGR> revoke unlimited tablespace from service0;
+SVRMGR> alter user service0 quota unlimited on service0;
+SVRMGR> exit;
Your table space is now ready. In case you are trying to delete a
@@ -298,16 +287,13 @@
Make sure that you can login to Oracle using your
service_name account:
-
-service0:~$ sqlplus service0/service0password
-SQL> select sysdate from dual;
-
+ [service0 ~]$ sqlplus service0/service0password
+SQL> select sysdate from dual;
SYSDATE
----------
2001-12-20
+SQL> exit;
-SQL> exit
-
You should see today's date in a format 'YYYY-MM-DD.'
If you can't login, try redoing step 1 again. If the date is
@@ -327,20 +313,19 @@
PostgreSQL:Create a user in the database matching the service
name. With default PostgreSQL authentication, a system user connecting locally automatically authenticates as the postgres user of the same name, if one exists. We currently use postgres "super-users" for everything, which means that anyone with access to any of the openacs system accounts on a machine has full access to all postgresql databases on that machine.
- [root@yourserver root]# su - postgres
-[postgres@yourserver pgsql]$ createuser -a -d service0
+ [root root]# su - postgres
+[postgres pgsql]$ createuser -a -d service0
CREATE USER
-[postgres@yourserver pgsql]$ exit
+[postgres pgsql]$ exit
logout
-
-[root@yourserver root]#
+[root root]#Create a database with the same name as our service name, service0.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ createdb -E UNICODE service0
+ [root root]# su - service0
+[service0 service0]$ createdb -E UNICODE service0
CREATE DATABASE
-[service0@yourserver service0]$
+[service0 service0]$
su - service0
createdb -E UNICODE service0
@@ -350,7 +335,7 @@
PostgresVacuuming
- [service0@yourserver service0]$ export EDITOR=emacs;crontab -e
+ [service0 service0]$ export EDITOR=emacs;crontab -eAdd this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
@@ -359,10 +344,7 @@
Add Full Text Search Support (OPTIONAL)
- [service0@yourserver service0]$ exit
-logout
-
-[root@yourserver root]#
+ At this point the database should be ready for installing OpenACS.
@@ -388,9 +370,9 @@
configuration
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ cd /var/lib/aolserver/service0/etc
-[service0@yourserver etc]# emacs config.tcl
+ [root root]# su - service0
+[service0 service0]$ cd /var/lib/aolserver/service0/etc
+[service0 etc]$ emacs config.tcl
You can continue without changing any values in the file. However, if you don't change address to match the computer's ip address, you won't be able to browse to your server from other machines.
@@ -479,10 +461,10 @@
501 -g
502. Second, if you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep
nsd and selectively kill by job number.
- [service0@yourserver etc]$ killall nsd
+ [service0 etc]$ killall nsd
nsd: no process killed
-[service0@yourserver service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/etc/config.tcl
-[service0@yourserver service0]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file...
+[service0 service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/etc/config.tcl
+[service0 service0]$ [08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: starting to read config file...
[08/Mar/2003:18:13:29][32131.8192][-main-] Notice: nsd.tcl: finished reading config file.
@@ -593,7 +575,7 @@
AOLserver to restart itself (ie. inittab or daemontools),
you'll need to manually restart your service.
- [service0@yourserver service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/config.tcl
+ [service0 service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/config.tcl
@@ -641,8 +623,8 @@
database, because those environmental variables are set by the
wrapper scripts nsd-postgres and nsd-oracle.
- [root@yourserver root]# su - service0
-[service0@yourserver service0]$ emacs .bashrc
+ [root root]# su - service0
+[service0 service0]$ emacs .bashrcPut in the appropriate lines for the database you are running. If you will use both databases, put in both sets of lines.
@@ -668,33 +650,32 @@
Test this by logging out and back in as
service0 and checking the paths.
- [service0@yourserver service0]$ exit
+ [service0 service0]$ exit
logout
-[root@yourserver src]# su - service0
-[postgres@yourserver pgsql]$ env | grep PATH
+[root src]# su - service0
+[service0 ~]$ envFor PostgreSQL, you should see:
-LD_LIBRARY_PATH=LD_LIBRARY_PATH=:/usr/local/pgsql/lib
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin
+LD_LIBRARY_PATH=:/usr/local/pgsql/lib
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:\
+ /root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/binFor Oracle:ORACLE_BASE=/ora8/m01/app/oracle
ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7
-PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/ora8/m01/app/oracle/product/8.1.7/bin
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:\
+ /root/bin:/ora8/m01/app/oracle/product/8.1.7/bin
LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.7/lib:/lib:/usr/lib
ORACLE_SID=ora8
ORACLE_TERM=vt100
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
- [service0@yourserver service0]$ exit
-logout
-[root@yourserver root]#Test your backup and recovery procedure.
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml 11 Dec 2003 21:39:49 -0000 1.13
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/oracle.xml 26 Jan 2004 15:39:44 -0000 1.14
@@ -18,7 +18,7 @@
- OpenACS &version; does not yet work with Oracle 9i
+ OpenACS &version; will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues.
@@ -155,7 +155,7 @@
startx
-joeuser:~$ startx
+[joeuser ~]$ startx
@@ -164,9 +164,9 @@
Open a terminal window type and login as root
-joeuser:~$ su -
+[joeuser ~]$ su -
Password: ***********
-root:~#
+[root ~]#
@@ -186,11 +186,11 @@
-root:~# groupadd dba
-root:~# groupadd oinstall
-root:~# groupadd oracle
-root:~# useradd -g dba -G oinstall,oracle -m oracle
-root:~# passwd oracle
+[root ~]# groupadd dba
+[root ~]# groupadd oinstall
+[root ~]# groupadd oracle
+[root ~]# useradd -g dba -G oinstall,oracle -m oracle
+[root ~]# passwd oracle
@@ -218,7 +218,7 @@
-root:~# mkdir /ora8
+[root ~]# mkdir /ora8
root:/ora8# cd /ora8
root:/ora8# mkdir -p m01 m02 m03/oradata/ora8
root:/ora8# chown -R oracle.dba /ora8
@@ -242,7 +242,7 @@
-joeuser:~$ su - oracle
+[joeuser ~]$ su - oracle
Password: ********
@@ -256,7 +256,7 @@
-oracle:~$ emacs .bash_profile
+[oracle ~]$ emacs .bash_profile
@@ -279,7 +279,7 @@
-joeuser:~$ xhost +localhost
+[joeuser ~]$ xhost +localhost
@@ -288,8 +288,8 @@
-oracle:~$ export DISPLAY=localhost:0.0
-oracle:~$ emacs .bash_profile
+[oracle ~]$ export DISPLAY=localhost:0.0
+[oracle ~]$ emacs .bash_profile
@@ -355,7 +355,7 @@
-oracle:~$ exit
+[oracle ~]$ exit
@@ -370,8 +370,8 @@
-joeuser:~$ su - oracle
-oracle:~$ env | grep ORA
+[joeuser ~]$ su - oracle
+[oracle ~]$ env | grep ORA
@@ -411,7 +411,7 @@
-oracle:~$ echo $PATH
+[oracle ~]$ echo $PATH
/bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/oracle/bin:/ora8/m01/app/oracle/product/8.1.7/bin
@@ -437,10 +437,10 @@
-joeuser:~$ xhost +localhost
-joeuser:~$ su - oracle
+[joeuser ~]$ xhost +localhost
+[joeuser ~]$ su - oracle
Password: **********
-oracle:~$ export DISPLAY=localhost:0.0
+[oracle ~]$ export DISPLAY=localhost:0.0
@@ -459,10 +459,10 @@
-oracle:~$ su - root
-root:~# mount -t iso9660 /dev/cdrom /mnt/cdrom
-root:~# exit
-oracle:~$ cd /mnt/cdrom
+[oracle ~]$ su - root
+[root ~]# mount -t iso9660 /dev/cdrom /mnt/cdrom
+[root ~]# exit
+[oracle ~]$ cd /mnt/cdrom
@@ -474,7 +474,7 @@
-oracle:~$ cd /where/oracle/Disk1
+[oracle ~]$ cd /where/oracle/Disk1
@@ -622,8 +622,8 @@
running the script below
-joueser:~$ su -
-root:~# ln -s /usr/bin/awk /bin/awk
+[joueser ~]$ su -
+[root ~]# ln -s /usr/bin/awk /bin/awk
@@ -632,15 +632,15 @@
Open a new terminal window, then type:
- joeuser:~$ su -
-root:~# cd /ora8/m01/app/oracle/product/8.1.7
-root:~# ./orainstRoot.sh
+ [joeuser ~]$ su -
+[root ~]# cd /ora8/m01/app/oracle/product/8.1.7
+[root ~]# ./orainstRoot.sh
; You should see:
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
Changing groupname of /ora8/m01/app/oracle/oraInventory to oinstall.
-root:~# mkdir -p /usr/local/java
-root:~# exit
-joeuser:~$ exit
+[root ~]# mkdir -p /usr/local/java
+[root ~]# exit
+[joeuser ~]$ exit
@@ -869,11 +869,11 @@
-joeuser:~$ su - oracle
+[joeuser ~]$ su - oracle
Password: *********
-oracle:~$ su
+[oracle ~]$ su
Password: *********
-root:~# /ora8/m01/app/oracle/product/8.1.7/root.sh
+[root ~]# /ora8/m01/app/oracle/product/8.1.7/root.sh
; You should see the following.
Creating Oracle Inventory pointer file (/etc/oraInst.loc)
@@ -909,8 +909,8 @@
-root:~# exit
-joeuser:~$ exit
+[root ~]# exit
+[joeuser ~]$ exit
@@ -1129,11 +1129,11 @@
-joeuser:~$ xhost +localhost
-joeuser:~$ su - oracle
+[joeuser ~]$ xhost +localhost
+[joeuser ~]$ su - oracle
Password: *********
-oracle:~$ export DISPLAY=localhost:0.0
-oracle:~$ dbassist
+[oracle ~]$ export DISPLAY=localhost:0.0
+[oracle ~]$ dbassist
@@ -1298,7 +1298,7 @@
-oracle:~$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora
+[oracle ~]$ emacs /ora8/m01/app/oracle/product/8.1.7/dbs/initora8.ora
@@ -1348,7 +1348,7 @@
-oracle:~$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib
+[oracle ~]$ cd /ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib
oracle:/ora8/m01/app/oracle/product/8.1.7/assistants/dbca/jlib$ ./sqlora8.sh
@@ -1397,7 +1397,7 @@
-oracle:~$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
+[oracle ~]$ cp /tmp/acceptance-sql.txt /tmp/acceptance.sql
@@ -1406,7 +1406,7 @@
-oracle:~$ sqlplus system/manager
+[oracle ~]$ sqlplus system/manager
SQL*Plus should startup. If you get an ORA-01034:
@@ -1415,7 +1415,7 @@
the oracle user.
-oracle:~$ svrmgrl
+[oracle ~]$ svrmgrl
SVRMGR> connect internal
SVRMGR> startup
@@ -1514,8 +1514,8 @@
-oracle:~$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart
-oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart
+[oracle ~]$ cp /tmp/dbstart.txt /ora8/m01/app/oracle/product/8.1.7/bin/dbstart
+[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/dbstart
@@ -1573,10 +1573,10 @@
-oracle:~$ su -
-root:~# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i
-root:~# chown root.root /etc/rc.d/init.d/oracle8i
-root:~# chmod 755 /etc/rc.d/init.d/oracle8i
+[oracle ~]$ su -
+[root ~]# cp /tmp/oracle8i.txt /etc/rc.d/init.d/oracle8i
+[root ~]# chown root.root /etc/rc.d/init.d/oracle8i
+[root ~]# chmod 755 /etc/rc.d/init.d/oracle8i
@@ -1586,7 +1586,7 @@
-root:~# /etc/rc.d/init.d/oracle8i stop
+[root ~]# /etc/rc.d/init.d/oracle8i stop
Oracle 8i auto start/stop
Shutting Oracle8i:
Oracle Server Manager Release 3.1.7.0.0 - Production
@@ -1607,7 +1607,7 @@
Server Manager complete.
Database "ora8" shut down.
-root:~# /etc/rc.d/init.d/oracle8i start
+[root ~]# /etc/rc.d/init.d/oracle8i start
Oracle 8i auto start/stop
Starting Oracle8i:
SQL*Plus: Release 8.1.7.0.0 - Production on Wed Mar 6 17:56:02 2002
@@ -1639,16 +1639,16 @@
Red Hat users:
-root:~# cd /etc/rc.d/init.d/
-root:~# chkconfig --add oracle8i
-root:~# chkconfig --list oracle8i
+[root ~]# cd /etc/rc.d/init.d/
+[root ~]# chkconfig --add oracle8i
+[root ~]# chkconfig --list oracle8i
; You should see:
oracle8i 0:off 1:off 2:off 3:on 4:on 5:on 6:offDebian users:
-root:~# update-rc.d oracle8i defaults
+[root ~]# update-rc.d oracle8i defaults
Adding system startup for /etc/init.d/oracle8i ...
/etc/rc0.d/K20oracle8i -> ../init.d/oracle8i
/etc/rc1.d/K20oracle8i -> ../init.d/oracle8i
@@ -1661,7 +1661,7 @@
SuSE users:
-root:~# cd /etc/rc.d/init.d
+[root ~]# cd /etc/rc.d/init.d
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i K20oracle8i
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/oracle8i S20oracle8i
root:/etc/rc.d/init.d# cp K20oracle8i rc0.d
@@ -1681,7 +1681,7 @@
root:/etc/rc.d/init.d# rm K20oracle8i
root:/etc/rc.d/init.d# rm S20oracle8i
root:/etc/rc.d/init.d# cd
-root:~# SuSEconfig
+[root ~]# SuSEconfig
Started the SuSE-Configuration Tool.
Running in full featured mode.
Reading /etc/rc.config and updating the system...
@@ -1739,14 +1739,14 @@
-root:~# su - oracle
-oracle:~$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
-oracle:~$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
-oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
-oracle:~$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
-oracle:~$ exit
-root:~# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
-root:~# cd /etc/rc.d/init.d
+[root ~]# su - oracle
+[oracle ~]$ cp /tmp/startlsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
+[oracle ~]$ cp /tmp/stoplsnr.txt /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
+[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/startlsnr
+[oracle ~]$ chmod 755 /ora8/m01/app/oracle/product/8.1.7/bin/stoplsnr
+[oracle ~]$ exit
+[root ~]# cp /tmp/listener8i.txt /etc/rc.d/init.d/listener8i
+[root ~]# cd /etc/rc.d/init.d
root:/etc/rc.d/init.d# chmod 755 listener8i
@@ -1810,8 +1810,8 @@
-root:~# su - oracle
-oracle:~$ sqlplus system/alexisahunk@ora8
+[root ~]# su - oracle
+[oracle ~]$ sqlplus system/alexisahunk@ora8
SQL> select sysdate from dual;
@@ -1820,8 +1820,8 @@
2002-02-22
SQL> exit
-oracle:~$ exit
-root:~#
+[oracle ~]$ exit
+[root ~]#RedHat users:
@@ -1830,7 +1830,7 @@
listener8i script.
-root:~# cd /etc/rc.d/init.d/
+[root ~]# cd /etc/rc.d/init.d/
root:/etc/rc.d/init.d# chkconfig --add listener8i
root:/etc/rc.d/init.d# chkconfig --list listener8i
listener8i 0:off 1:off 2:off 3:on 4:on 5:on 6:off
@@ -1842,7 +1842,7 @@
listener8i script.
-root:~# update-rc.d listener8i defaults 21 19
+[root ~]# update-rc.d listener8i defaults 21 19
Adding system startup for /etc/init.d/listener8i ...
/etc/rc0.d/K19listener8i -> ../init.d/listener8i
/etc/rc1.d/K19listener8i -> ../init.d/listener8i
@@ -1865,15 +1865,15 @@
-root:~# /sbin/shutdown -r -t 0 now
+[root ~]# /sbin/shutdown -r -t 0 now
Log back in and ensure that Oracle started automatically.
-joeuser:~$ su - oracle
-oracle:~$ sqlplus system/alexisahunk@ora8
+[joeuser ~]$ su - oracle
+[oracle ~]$ sqlplus system/alexisahunk@ora8
SQL> exit
@@ -1937,7 +1937,7 @@
-joeuser:~$ svrmgrl
+[joeuser ~]$ svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> shutdown
@@ -1988,7 +1988,7 @@
-oracle:~$ sqlplus system/changeme
+[oracle ~]$ sqlplus system/changeme
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml 11 Dec 2003 21:39:49 -0000 1.10
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml 26 Jan 2004 15:39:44 -0000 1.11
@@ -23,20 +23,20 @@
The OpenACS tarball contains sample configuration files
for some of the packages listed below. In order to access those
files, unpack the tarball now.
- [root@yourserver root]# cd /tmp
-[root@yourserver tmp]# tar xzf &tarballpath;.tgz
+ [root root]# cd /tmp
+[root tmp]# tar xzf &tarballpath;.tgzcd /tmp
tar xzf &tarballpath;.tgzIf you are installing from a different method and just need the configuration files, you can instead get them from CVS:
-[root@yourserver root]# cd /tmp
-[root@yourserver tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
+[root root]# cd /tmp
+[root tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory
cvs server: Updating openacs-4/packages/acs-core-docs/www/files
U openacs-4/packages/acs-core-docs/www/files/README.TXT
(many lines omitted)
U openacs-4/packages/acs-core-docs/www/files/template-ini.ini
U openacs-4/packages/acs-core-docs/www/files/winnsd.txt
-[root@yourserver tmp]# mv openacs-4 &tarballpath;
+[root tmp]# mv openacs-4 &tarballpath;cd /tmp
cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
mv openacs-4 openacs-5.0.0a4
@@ -49,9 +49,9 @@
CVS is a source control system. Create and initialize a
directory for a local cvs repository.
- [root@yourserver tmp]# mkdir /cvsroot
-[root@yourserver tmp]# cvs -d /cvsroot init
-[root@yourserver tmp]#
+ [root tmp]# mkdir /cvsroot
+[root tmp]# cvs -d /cvsroot init
+[root tmp]#
mkdir /cvsroot
cvs -d /cvsroot init
@@ -68,9 +68,9 @@
fixes the backspace -> help mis-mapping that often occurs in
terminals.
- [root@yourserver tmp]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
+ [root tmp]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
cp: overwrite `/etc/skel/.emacs'? y
-[root@yourserver tmp]#
+[root tmp]# Debian users:apt-get install psgmlNote: The new nxml mode for emacs, when used in combination with psgml, provides a pretty good set of functionality that makes DocBook editing much less painless. In particular, nxml does syntax testing in real-time so that you can see syntax errors immediately instead of in the output of the xsltproc hours or days later. For debian, apt-get install nxml.
@@ -95,18 +95,18 @@
Red Hat 8
- [root@yourserver root]# mkdir -p /package
-[root@yourserver root]# chmod 1755 /package/
-[root@yourserver root]# cd /package/
-[root@yourserver package]# tar xzf /tmp/daemontools-0.76.tar.gz
-[root@yourserver package]# cd admin/daemontools-0.76/
-[root@yourserver daemontools-0.76]# package/install
+ [root root]# mkdir -p /package
+[root root]# chmod 1755 /package/
+[root root]# cd /package/
+[root package]# tar xzf /tmp/daemontools-0.76.tar.gz
+[root package]# cd admin/daemontools-0.76/
+[root daemontools-0.76]# package/install
Linking ./src/* into ./compile...
Creating /service...
Adding svscanboot to inittab...
init should start svscan now.
-[root@yourserver root]#
+[root root]#
mkdir -p /package
chmod 1755 /package
cd /package
@@ -120,12 +120,12 @@
/tmp, or download it.
- [root@yourserver root]# mkdir -p /package
-[root@yourserver root]# chmod 1755 /package/
-[root@yourserver root]# cd /package/
-[root@yourserver package]# tar xzf /tmp/daemontools-0.76.tar.gz
-[root@yourserver package]# cd admin
-[root@yourserver admin]# wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
+ [root root]# mkdir -p /package
+[root root]# chmod 1755 /package/
+[root root]# cd /package/
+[root package]# tar xzf /tmp/daemontools-0.76.tar.gz
+[root package]# cd admin
+[root admin]# wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
--14:19:24-- http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
=> `daemontools-0.76.errno.patch'
Resolving moni.csi.hu... done.
@@ -137,14 +137,14 @@
14:19:24 (346.68 KB/s) - `daemontools-0.76.errno.patch' saved [355/355]
-[root@yourserver admin]# cd daemontools-0.76
-[root@yourserver daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch
-[root@yourserver daemontools-0.76]# package/install
+[root admin]# cd daemontools-0.76
+[root daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch
+[root daemontools-0.76]# package/install
Linking ./src/* into ./compile...(many lines omitted)
Creating /service...
Adding svscanboot to inittab...
init should start svscan now.
-[root@yourserver root]#
+[root root]#
mkdir -p /package
chmod 1755 /package
cd /package
@@ -157,24 +157,24 @@
Debian
- root:~# apt-get install daemontools-installer
-root:~# build-daemontools
+ [root ~]# apt-get install daemontools-installer
+[root ~]# build-daemontoolsVerify that svscan is running. If it is, you should see
these two processes running:
- [root@yourserver root]# ps -auxw | grep service
+ [root root]# ps -auxw | grep service
root 13294 0.0 0.1 1352 272 ? S 09:51 0:00 svscan /service
root 13295 0.0 0.0 1304 208 ? S 09:51 0:00 readproctitle service errors: .......................................
-[root@yourserver root]#
+[root root]#Install a script to grant non-root users permission to
control daemontools services.
- [root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
-[root@yourserver root]# chmod 755 /usr/local/bin/svgroup
+ [root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
+[root root]# chmod 755 /usr/local/bin/svgroupcp /tmp/&tarballpath;/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
chmod 755 /usr/local/bin/svgroup
@@ -195,9 +195,9 @@
This program handles incoming tcp connections.
Download ucspi and install it.
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
-[root@yourserver src]# tar xzf ucspi-tcp-0.88.tar.gz
+ [root root]# cd /usr/local/src
+[root src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
+[root src]# tar xzf ucspi-tcp-0.88.tar.gzcd /usr/local/src
wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
tar xzf ucspi-tcp-0.88.tar.gz
@@ -207,26 +207,26 @@
patch -p1 <../ucspi-tcp-0.88.errno.patch
cd ..All platforms continue:
-[root@yourserver src]# cd ucspi-tcp-0.88
-[root@yourserver ucspi-tcp-0.88]# make
+[root src]# cd ucspi-tcp-0.88
+[root ucspi-tcp-0.88]# make
( cat warn-auto.sh; \
echo 'main="$1"; shift'; \(many lines omitted)
./compile instcheck.c
./load instcheck hier.o auto_home.o unix.a byte.a
-[root@yourserver ucspi-tcp-0.88]# make setup check
+[root ucspi-tcp-0.88]# make setup check
./install
./instcheck
-[root@yourserver ucspi-tcp-0.88]#
+[root ucspi-tcp-0.88]#
cd ucspi-tcp-0.88
make
make setup checkVerify that ucspi-tcp was installed successfully by
running the tcpserver program which is part of ucspi-tcp:
- [root@yourserver ucspi-tcp-0.88]# tcpserver
+ [root ucspi-tcp-0.88]# tcpserver
tcpserver: usage: tcpserver [ -1UXpPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid
] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program
-[root@yourserver ucspi-tcp-0.88]#
+[root ucspi-tcp-0.88]#
qmail
@@ -243,8 +243,8 @@
it's an attempt to relay mail, and rejects it. So these two commands
set up an exception so that any mail sent from 127.0.0.1 is allowed to
send outgoing mail.
- [root@yourserver ucspi-tcp-0.88]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
-[root@yourserver ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
+ [root ucspi-tcp-0.88]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
+[root ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtpcp /tmp/&tarballpath;/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
@@ -259,9 +259,9 @@
Download qmail,
set up the standard supporting users and build the binaries:
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
-[root@yourserver src]# tar xzf netqmail-1.04.tar.gz
+ [root root]# cd /usr/local/src
+[root src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
+[root src]# tar xzf netqmail-1.04.tar.gz
--15:04:11-- http://www.qmail.org/netqmail-1.04.tar.gz
=> `netqmail-1.04.tar.gz'
Resolving www.qmail.org... done.
@@ -273,18 +273,18 @@
15:04:21 (24.04 KB/s) - `netqmail-1.04.tar.gz' saved [242310/242310]
-[root@yourserver src]# mkdir /var/qmail
-[root@yourserver src]# groupadd nofiles
-[root@yourserver src]# useradd -g nofiles -d /var/qmail/alias alias
-[root@yourserver src]# useradd -g nofiles -d /var/qmail qmaild
-[root@yourserver src]# useradd -g nofiles -d /var/qmail qmaill
-[root@yourserver src]# useradd -g nofiles -d /var/qmail qmailp
-[root@yourserver src]# groupadd qmail
-[root@yourserver src]# useradd -g qmail -d /var/qmail qmailq
-[root@yourserver src]# useradd -g qmail -d /var/qmail qmailr
-[root@yourserver src]# useradd -g qmail -d /var/qmail qmails
-[root@yourserver src]# cd netqmail-1.04
-[root@yourserver netqmail-1.04]# ./collate.sh
+[root src]# mkdir /var/qmail
+[root src]# groupadd nofiles
+[root src]# useradd -g nofiles -d /var/qmail/alias alias
+[root src]# useradd -g nofiles -d /var/qmail qmaild
+[root src]# useradd -g nofiles -d /var/qmail qmaill
+[root src]# useradd -g nofiles -d /var/qmail qmailp
+[root src]# groupadd qmail
+[root src]# useradd -g qmail -d /var/qmail qmailq
+[root src]# useradd -g qmail -d /var/qmail qmailr
+[root src]# useradd -g qmail -d /var/qmail qmails
+[root src]# cd netqmail-1.04
+[root netqmail-1.04]# ./collate.sh
You should see 7 lines of text below. If you see anything
else, then something might be wrong.
@@ -295,8 +295,8 @@
[5] Renaming qmail-1.03 to netqmail-1.04...
[6] Continue installing qmail using the instructions found at:
[7] http://www.lifewithqmail.org/lwq.html#installation
-[root@yourserver netqmail-1.04]# cd netqmail-1.04
-[root@yourserver netqmail-1.04]# make setup check
+[root netqmail-1.04]# cd netqmail-1.04
+[root netqmail-1.04]# make setup check
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \(many lines omitted)
./install
@@ -323,13 +323,13 @@
sendmailremoving
- [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
-[root@yourserver qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
-[root@yourserver qmail-1.03]#
+ [root qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
+[root qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
+[root qmail-1.03]#
rm -f /usr/bin/sendmail /usr/sbin/sendmail
ln -s /var/qmail/bin/sendmail /usr/sbin/sendmailConfigure qmail - specifically, run the config script to set up files in /var/qmail/control specifying the computer's identity and which addresses it should accept mail for. This command will automatically set up qmail correctly if you have correctly set a valid host nome. If not, you'll want to read /var/qmail/doc/INSTALL.ctl to find out how to configure qmail.
- [root@yourserver qmail-1.03]# ./config-fast yourserver.test
+ [root qmail-1.03]# ./config-fast yourserver.test
Your fully qualified host name is yourserver.test.
Putting yourserver.test into control/me...
Putting yourserver.test into control/defaultdomain...
@@ -338,14 +338,14 @@
Putting yourserver.test into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to yourserver.test.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
-[root@yourserver qmail-1.03]#
+[root qmail-1.03]#
./config-fast yourserver.testAll incoming mail that isn't for a specific user is handled by the alias user. This includes all root mail. These commands prepare the alias user to receive mail.
- [root@yourserver qmail-1.03]# cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
-[root@yourserver alias]# chmod 644 ~alias/.qmail*
-[root@yourserver alias]# /var/qmail/bin/maildirmake ~alias/Maildir/
-[root@yourserver alias]# chown -R alias.nofiles /var/qmail/alias/Maildir
-[root@yourserver alias]#
+ [root qmail-1.03]# cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
+[root alias]# chmod 644 ~alias/.qmail*
+[root alias]# /var/qmail/bin/maildirmake ~alias/Maildir/
+[root alias]# chown -R alias.nofiles /var/qmail/alias/Maildir
+[root alias]#
cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
chmod 644 ~alias/.qmail*
/var/qmail/bin/maildirmake ~alias/Maildir/
@@ -356,41 +356,41 @@
Configure qmail to use the Maildir delivery format
(instead of mbox), and install a version of the qmail startup script modified to use Maildir.
- [root@yourserver alias]# echo "./Maildir" > /var/qmail/bin/.qmail
-[root@yourserver alias]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
-[root@yourserver alias]# chmod 755 /var/qmail/rc
-[root@yourserver alias]#
+ [root alias]# echo "./Maildir" > /var/qmail/bin/.qmail
+[root alias]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
+[root alias]# chmod 755 /var/qmail/rc
+[root alias]#
echo "./Maildir" > /var/qmail/bin/.qmail
cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
chmod 755 /var/qmail/rc
Set up the skeleton directory so that new users will
be configured for qmail.
- [root@yourserver root]# /var/qmail/bin/maildirmake /etc/skel/Maildir
-[root@yourserver root]# echo "./Maildir/" > /etc/skel/.qmail
-[root@yourserver root]#
+ [root root]# /var/qmail/bin/maildirmake /etc/skel/Maildir
+[root root]# echo "./Maildir/" > /etc/skel/.qmail
+[root root]#
/var/qmail/bin/maildirmake /etc/skel/Maildir
echo "./Maildir/" > /etc/skel/.qmailAs recommended, we will run qmail with daemontools
control files. Create daemontools control directories, set up a daemontools control script, copy the supervise control files, and set permissions. The last line links the control directories to /service, which will cause supervise to detect them and execute the run files, causing qmail to start.
- [root@yourserver root]# mkdir -p /var/qmail/supervise/qmail-send/log
-[root@yourserver root]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
-[root@yourserver root]# mkdir /var/log/qmail
-[root@yourserver root]# chown qmaill /var/log/qmail
-[root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
-[root@yourserver root]# chmod 755 /var/qmail/bin/qmailctl
-[root@yourserver root]# ln -s /var/qmail/bin/qmailctl /usr/bin
-[root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run
-[root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
-[root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
-[root@yourserver root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
-[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-send/run
-[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-send/log/run
-[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
-[root@yourserver root]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
-[root@yourserver root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
-[root@yourserver root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
+ [root root]# mkdir -p /var/qmail/supervise/qmail-send/log
+[root root]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
+[root root]# mkdir /var/log/qmail
+[root root]# chown qmaill /var/log/qmail
+[root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
+[root root]# chmod 755 /var/qmail/bin/qmailctl
+[root root]# ln -s /var/qmail/bin/qmailctl /usr/bin
+[root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run
+[root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
+[root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
+[root root]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
+[root root]# chmod 755 /var/qmail/supervise/qmail-send/run
+[root root]# chmod 755 /var/qmail/supervise/qmail-send/log/run
+[root root]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
+[root root]# chmod 755 /var/qmail/supervise/qmail-smtpd/log/run
+[root root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
+[root root]# ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /servicemkdir -p /var/qmail/supervise/qmail-send/log
mkdir -p /var/qmail/supervise/qmail-smtpd/log
mkdir /var/log/qmail
@@ -409,14 +409,14 @@
ln -s /var/qmail/supervise/qmail-send /var/qmail/supervise/qmail-smtpd /service
Wait ten seconds or so, and then verify that that the four qmail processes are running. If uptimes don't rise above 1 second, this may indicate broken scripts that are continuously restarting. In that case, start debugging by checking permissions.
- [root@yourserver root]# qmailctl stat
+ [root root]# qmailctl stat
/service/qmail-send: up (pid 32700) 430 seconds
/service/qmail-send/log: up (pid 32701) 430 seconds
/service/qmail-smtpd: up (pid 32704) 430 seconds
/service/qmail-smtpd/log: up (pid 32705) 430 seconds
messages in queue: 0
messages in queue but not yet preprocessed: 0
-[root@yourserver root]#
+[root root]#Further verify by sending and receiving email. Incoming mail for root is stored in /var/qmail/alias/Maildir.
@@ -425,19 +425,19 @@
Install Analog web file analyzerDownload the Analog source tarball in
/tmp. Unpack, compile, and install analog.
- [root@yourserver aolserver]# cd /usr/local/src
-[root@yourserver src]# tar xzf /tmp/analog-5.32.tar.gz
-[root@yourserver src]# cd analog-5.32
-[root@yourserver analog-5.32]# make
+ [root aolserver]# cd /usr/local/src
+[root src]# tar xzf /tmp/analog-5.32.tar.gz
+[root src]# cd analog-5.32
+[root analog-5.32]# make
cd src && make
make[1]: Entering directory `/usr/local/src/analog-5.32/src'
(many lines omitted)
***IMPORTANT: You must read the licence before using analog
***
make[1]: Leaving directory `/usr/local/src/analog-5.32/src'
-[root@yourserver analog-5.32]# cd ..
-[root@yourserver src]# mv analog-5.32 /usr/share/
-[root@yourserver src]#
+[root analog-5.32]# cd ..
+[root src]# mv analog-5.32 /usr/share/
+[root src]#
cd /usr/local/src
tar xzf /tmp/analog-5.32.tar.gz
cd analog-5.32
@@ -456,6 +456,9 @@
Install Full Text Search
+
+ By Joel Aufrecht and Malte Sussdorff
+ Install OpenFTS module
@@ -469,53 +472,53 @@
Install Tsearch. This is a PostgreSQL module that
OpenFTS requires.
- [root@yourserver root]# su - postgres
-[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.4/contrib/tsearch/
-[postgres@yourserver tsearch]$ make
+ [root root]# su - postgres
+[postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4/contrib/tsearch/
+[postgres tsearch]$ make
sed 's,MODULE_PATHNAME,$libdir/tsearch,g' tsearch.sql.in >tsearch.sql
/usr/bin/flex -8 -Ptsearch_yy -o'parser.c' parser.l(many lines omitted)
rm -f libtsearch.so
ln -s libtsearch.so.0.0 libtsearch.so
-[postgres@yourserver tsearch]$ make install
+[postgres tsearch]$ make install
mkdir /usr/local/pgsql/share/contrib
mkdir /usr/local/pgsql/doc/contrib
(2 lines omitted)
/bin/sh ../../config/install-sh -c -m 755 libtsearch.so.0.0 /usr/local/pgsql/lib/tsearch.so
-[postgres@yourserver tsearch]$ exit
+[postgres tsearch]$ exit
logout
-[root@yourserver root]#
+[root root]#
su - postgres
-cd /usr/local/src/postgresql-7.2.4/contrib/tsearch
+cd /usr/local/src/postgresql-7.3.4/contrib/tsearch
make
make install
exitUnpack the OpenFTS tarball and compile and install
the driver.
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
-[root@yourserver src]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
-[root@yourserver Search-OpenFTS-tcl-0.3.2]# ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
+ [root root]# cd /usr/local/src
+[root src]# tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
+[root src]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
+[root Search-OpenFTS-tcl-0.3.2]# ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
checking prefix... /usr/local
checking for gcc... gcc
(many lines omitted)
configure: creating ./config.status
config.status: creating Makefile.global
-[root@yourserver Search-OpenFTS-tcl-0.3.2]# make
+[root Search-OpenFTS-tcl-0.3.2]# make
(cd parser; make all)
make[1]: Entering directory `/usr/local/src/Search-OpenFTS-tcl-0.3.2/parser'
(many lines omitted)
packages provided were {Lingua::Stem::Snowball 0.3.2}
processed fts_base_snowball.tcl
-[root@yourserver Search-OpenFTS-tcl-0.3.2]# cd aolserver
-[root@yourserver aolserver]# make
+[root Search-OpenFTS-tcl-0.3.2]# cd aolserver
+[root aolserver]# make
gcc -c -fPIC -DPACKAGE=\"OPENFTS\" -DVERSION=\"0.3.2\" -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STR
(many lines omitted)
n_stem.o italian_stem.o norwegian_stem.o portuguese_stem.o russian_stem.o nsfts.o -o nsfts.so
-[root@yourserver aolserver]# cp nsfts.so /usr/local/aolserver/bin/
-[root@yourserver aolserver]#
+[root aolserver]# cp nsfts.so /usr/local/aolserver/bin/
+[root aolserver]#
cd /usr/local/src
tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
@@ -528,24 +531,24 @@
Build some supplemental modules.
- [root@yourserver aolserver]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
-[root@yourserver Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.4/contrib
-[root@yourserver Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts
-[root@yourserver pgsql_contrib_openfts]# make
+ [root aolserver]# cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
+[root Search-OpenFTS-tcl-0.3.2]# cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.3.4/contrib
+[root Search-OpenFTS-tcl-0.3.2]# cd /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts
+[root pgsql_contrib_openfts]# make
sed 's,MODULE_PATHNAME,$libdir/openfts,g' openfts.sql.in >openfts.sql
gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -fpic -I. -I../../src/include -c -o openfts.o openfts.c
gcc -shared -o openfts.so openfts.o
rm openfts.o
-[root@yourserver pgsql_contrib_openfts]# su postgres
-[postgres@yourserver pgsql_contrib_openfts]$ make install
+[root pgsql_contrib_openfts]# su postgres
+[postgres pgsql_contrib_openfts]$ make install
/bin/sh ../../config/install-sh -c -m 644 openfts.sql /usr/local/pgsql/share/contrib
/bin/sh ../../config/install-sh -c -m 755 openfts.so /usr/local/pgsql/lib
/bin/sh ../../config/install-sh -c -m 644 ./README.openfts /usr/local/pgsql/doc/contrib
-[postgres@yourserver pgsql_contrib_openfts]$ exit
-[root@yourserver pgsql_contrib_openfts]#
+[postgres pgsql_contrib_openfts]$ exit
+[root pgsql_contrib_openfts]#
cd /usr/local/src/Search-OpenFTS-tcl-0.3.2
-cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.4/contrib
-cd /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts
+cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.3.4/contrib
+cd /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts
make
su postgres
make install
@@ -565,18 +568,18 @@
to work, you must also install the PostgreSQL
OpenFTS module and prerequisites.)
- [service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql
+ [service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
BEGIN
CREATE
(many lines omitted)
INSERT 0 1
COMMIT
-[service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts/openfts.sql
+[service0 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
CREATE
CREATE
-[service0@yourserver service0]$
-/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql
-/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/pgsql_contrib_openfts/openfts.sql
+[service0 service0]$
+/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql
+/usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql
@@ -589,26 +592,35 @@
Install Full Text Search Engine
- Click Package Manager on the right side of the default home page. If prompted, log in with the account and password you entered during install.
+ Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.Click on the Install
-packages link.
+software link.
- On the next screen, after it loads, click on Uncheck all boxes, then click the checkbox next to OpenFTS Driver 4.2. Then click Next.
-
- Click Install Packages
-
+ Click on the Install
+new service link.
+
+
+ Click on the Install link next to OpenFTS Driver.
+
+
Restart the service.
-[service0@yourserver service0]$ svc -t /service/service0
-[service0@yourserver service0]$
+[service0 service0]$ svc -t /service/service0
+[service0 service0]$Wait a minute, then browse back to the home page.
- Click on Site Map on the top right side of the screen.
+ Click on Admin on the top of the screen.
+
+ Click on Main Site Administration in the "Subsite Administration" section.
+
+
+ Click on Site Map in the "Advanced Features" section.
+ Mount the OpenFTS Full Text Search Engine in the site map.
@@ -648,8 +660,8 @@
Restart the service.
- [service0@yourserver service0]$ svc -t /service/service0
-[service0@yourserver service0]$
+ [service0 service0]$ svc -t /service/service0
+[service0 service0]$Wait a minute, then click on Main Site at the top of the page.
@@ -662,10 +674,8 @@
Add the FTS Engine service contract
- Click on the Main
-Site.
- Click on the ACS
-Service Contract link near the bottom of the home page.
+ Click on the DevAdmin.
+ Click on the Service Contract link. On the FtsEngineDriver
line, click
Install.
@@ -674,25 +684,70 @@
Restart the service.
- [service0@yourserver service0]$ svc -t /service/service0
-[service0@yourserver service0]$
+ [service0 service0]$ svc -t /service/service0
+[service0 service0]$
-
- Test FTS. (INCOMPLETE). Add a package that supports search,like "note," add some content, and search for it.
-
+
+ Enable Full Text Search in packages
+ Enabling Full Text Search in packages at the moment is not trivial. It involves a couple of steps, which I will illustrate taking lars-blogger as an example package
+
+
+ Install the package.
+
+
+ Click Admin on the top of the default home page. If prompted, log in with the account and password you entered during install.
+
+
+ Click on the Install
+ software link.
+
+
+ Click on the Install
+ new application link.
+
+
+ Click on the Install link next to Weblogger.
+
+
+ Install all required packages as well (always say okay until you shall restart the server)
+
+
+
+
+
+ Load the service contracts datamodell and enable the service contract
+ [service0 service0]$ cd packages/lars-blogger/sql/postgresql
+[service0 postgresql]$ psql service0 -f lars-blogger-sc-create.sql
+Note: Usually this script is called package_name-sc-create.sql
+
+
+ Restart the service.
+ [service0 postgresql]$ svc -t /service/service0
+ [service0 postgresl]$
+
+
+ If you are lucky, Full Text Search is enabled now, if not consult http://openacs.org/forums/message-view?message_id=154759. This link also contains some hints on how to make sure it is enabled.
+ Install nsopenssl
+
+ By Joel Aufrecht and Malte Sussdorff
+
+
This AOLserver module is required if you want people to connect to your site via
https. These commands compile nsopenssl and install it,
along with a tcl helper script to handle https connections.
You will also need ssl certificates. Because those should
be different for each server service, you won't need those instructions until
- later. You will need the
+
+ Install on AOLserver3
+ You will need the unpacked Aolserver tarball in
/usr/local/src/aolserver and
the this
thread for details on compiling nsopenssl.)
- [root@yourserver bin]# cd /usr/local/src/aolserver
-[root@yourserver aolserver]# wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
-[root@yourserver aolserver]# tar xzf nsopenssl-2.1.tar.gz
-[root@yourserver aolserver]# cd nsopenssl-2.1
-[root@yourserver nsopenssl-2.1]# make OPENSSL=/usr/local/ssl
+ [root bin]# cd /usr/local/src/aolserver
+[root aolserver]# wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
+[root aolserver]# tar xzf nsopenssl-2.1.tar.gz
+[root aolserver]# cd nsopenssl-2.1
+[root nsopenssl-2.1]# make OPENSSL=/usr/local/ssl
gcc -I/usr/local/ssl/include -I../aolserver/include -D_REENTRANT=1 -DNDEBUG=1 -g -fPIC -Wall -Wno-unused -mcpu=i686 -DHAVE_CMMSG=1 -DUSE_FIONREAD=1 -DHAVE_COND_EINTR=1 -c -o nsopenssl.o nsopenssl.c
(many lines omitted)
gcc -shared -nostartfiles -o nsopenssl.so nsopenssl.o config.o init.o ssl.o thread.o tclcmds.o -L/usr/local/ssl/lib -lssl -lcrypto
-[root@yourserver nsopenssl-2.1]# cp nsopenssl.so /usr/local/aolserver/bin
-[root@yourserver nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/
-[root@yourserver nsopenssl-2.1]#
+[root nsopenssl-2.1]# cp nsopenssl.so /usr/local/aolserver/bin
+[root nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/
+[root nsopenssl-2.1]#
cd /usr/local/src/aolserver
wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
tar xzf nsopenssl-2.1.tar.gz
@@ -730,6 +785,41 @@
make OPENSSL=/usr/lib/ssl
cp nsopenssl.so /usr/local/aolserver/bin
cp https.tcl /usr/local/aolserver/modules/tcl/
+
+
+ Install on AOLserver4
+ You will need the AOLserver4 source in /usr/local/src/aolserver/aolserver and OpenSSL installed in /usr/local/ssl (or at least symlinked there).
+
+ [root bin]# cd /usr/local/src/aolserver
+[root aolserver]# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver login
+[root aolserver]# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsopenssl
+[root aolserver]# cd nsopenssl
+[root nsopenssl]# make OPENSSL=/usr/local/ssl
+gcc -I/usr/local/ssl/include (many items omitted) -c -o sslcontext.o sslcontext.c
+(many lines omitted)
+[root nsopenssl-2.1]# make install OPENSSL=/usr/local/ssl INST=/usr/local/aolserver
+[root nsopenssl-2.1]#
+cd /usr/local/src/aolserver
+cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver login
+cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/aolserver co nsopenssl
+cd nsopenssl
+make OPENSSL=/usr/local/ssl
+make install OPENSSL=/usr/local/ssl INST=/usr/local/aolserver
+If you have problems starting your server with nsopenssl.so due to missing libssl.so.0.9.7 (or lower), you have to create symlinks
+
+[root nsopenssl]# cd /usr/local/aolserver/lib
+[root lib]# ln -s /usr/local/ssl/lib/libssl.so.0.9.7 libssl.so.0.9.7
+[root lib]# ln -s /usr/local/ssl/lib/libcrypto.so.0.9.7 libcrypto.so.0.9.7
+[root lib]#
+cd /usr/local/aolserver/lib
+ln -s /usr/local/ssl/lib/libssl.so.0.9.7 libssl.so.0.9.7
+ln -s /usr/local/ssl/lib/libcrypto.so.0.9.7 libcrypto.so.0.9.7
+
+
+
+ To enable SSL support in your server, make sure your config.tcl file has a section on "OpenSSL 3 with AOLserver4". If your ports for SSL are priviledged (below 1024), you will have to start AOLserver with prebinds for both your HTTP and your HTTPS port (usually by adding -b your_ip:your_http_port,your_ip:your_https_port to the nsd call).
+
+
@@ -743,7 +833,40 @@
ln -s /usr/local/tclwebtest-0.3 /usr/local/tclwebtest
ln -s /usr/local/tclwebtest/tclwebtest /usr/local/bin
-
+
+
+ Install PHP for use in AOLserver
+
+ By Malte Sussdorff
+
+
+ To be able to use PHP software with AOLserver (and OpenACS), you have to install PHP with AOLserver support. Get the latest version from www.php.net. For convenience we get version 4.3.4 from a mirror
+ [root root]# cd /usr/local/src
+[root src]# wget http://de3.php.net/distributions/php-4.3.4.tar.gz
+[root src]# tar xfz php-4.3.4.tar.gz
+[root src]# cd php-4.3.4
+[root php-4.3.4]# cd php-4.3.4
+[root php-4.3.4]# ./configure --with-aolserver=/usr/local/aolserver/ --with-pgsql=/usr/local/pg74 --without-mysql
+[root php-4.3.4]# make install
+
+ Once installed you can enable this by configuring your config file. Make sure your config file supports php (it should have a php section with it). Furthermore add index.php as the last element to your directoryfile directive.
+
+
+
+ By Malte Sussdorff
+
+
+ Install Squirrelmail for use as a webmail system for OpenACS
+ This section is work in progress. It will detail how you can install Squirrelmail as a webmail frontend for OpenACS, thereby neglecting the need to have a seperate webmail package within OpenACS
+ [service0 service0]# cd www
+[service0 www]# wget http://cesnet.dl.sourceforge.net/sourceforge/squirrelmail/squirrelmail-1.4.2.tar.gz
+[service0 www]# tar xfz squirrelmail-1.4.2.tar.gz
+[service0 www]# mv squirrelmail-1.4.2 mail
+[service0 www]# cd mail/config
+[service0 www]# ./conf.pl
+
+ Now you are about to configure Squirrelmail. The configuration heavily depends on your setup, so no instructions are given here.
+
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml 11 Dec 2003 21:39:49 -0000 1.18
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/overview.xml 26 Jan 2004 15:39:44 -0000 1.19
@@ -208,18 +208,18 @@
This is text that you will
see and type in a command shell, including text you may have to
change. It is followed by a list of just the commands,
- which you can copy and paste.
+ which you can copy and paste. The command prompt varies by system; in the examples we use the form[service0 aolserver]$, where service0 is the current user and aolserver is the current directory. The root prompt is shown ending in # and all other prompts in $.
-[root@localhost root]# su - nsadmin
-[nsadmin@localhost aolserver]$ svc -d /service/server1
-[nsadmin@localhost aolserver]$ dropdb server1
+[root root]# su - service0
+[service0 aolserver]$ svc -d /service/service0
+[service0 aolserver]$ dropdb service0
DROP DATABASE
-[nsadmin@localhost aolserver]$ createdb server1
+[service0 aolserver]$ createdb service0
CREATE DATABASE
-su - nsadmin
-svc -d /service/server1
-dropdb server1
-createdb server1
+su - service0
+svc -d /service/service0
+dropdb service0
+createdb service0
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 11 Dec 2003 21:39:49 -0000 1.16
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 26 Jan 2004 15:39:44 -0000 1.17
@@ -14,11 +14,16 @@
Skip this section if you will run only Oracle.
- OpenACS &version; will run with PostgreSQL 7.2.x, 7.3.2,
- 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL.
+ OpenACS &version; will run with PostgreSQL 7.2.x, 7.3.2, 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL. PostgreSQL 7.4 has been verified.
+
+ Mac OS X
+ If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.2.x or 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.
+
+
+ Debian
@@ -41,21 +46,23 @@
environment (more
information):
- [root@yourserver root]# ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
-[root@yourserver root]# ln -s /var/lib/pgsql /usr/local/pgsql
-[root@yourserver root]# ln -s /etc/init.d/postgresql /etc/init.d/postgres
-[root@yourserver root]# service postgresql start
+ [root root]# ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
+[root root]# ln -s /var/lib/pgsql /usr/local/pgsql
+[root root]# ln -s /etc/init.d/postgresql /etc/init.d/postgres
+[root root]# ln -s /usr/bin /usr/local/pgsql/bin
+[root root]# service postgresql start
Initializing database:
[ OK ]
Starting postgresql service: [ OK ]
-[root@yourserver root]# echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
-[root@yourserver root]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
-[root@yourserver root]# groupadd web
-[root@yourserver root]# su - postgres
+[root root]# echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
+[root root]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
+[root root]# groupadd web
+[root root]# su - postgres
-bash-2.05b$
ln -s /usr/lib/pgsql/ /var/lib/pgsql/lib
ln -s /var/lib/pgsql /usr/local/pgsql
+ln -s /usr/bin /usr/local/pgsql/bin
service postgresql start
echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile
echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile
@@ -72,9 +79,9 @@
/tmp/postgresql-7.3.4.tar.gz,
get it.
- [root@yourserver root]# cd /usr/local/src
-[root@yourserver src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
-[root@yourserver src]#
+ [root root]# cd /usr/local/src
+[root src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
+[root src]#
cd /usr/local/src
tar xzf /tmp/postgresql-7.3.4.tar.gz
@@ -88,37 +95,52 @@
directly as that user, we'll leave the password blank.
- [root@yourserver src]# groupadd web
-[root@yourserver src]# useradd -g web -d /usr/local/pgsql postgres
-[root@yourserver src]# mkdir -p /usr/local/pgsql
-[root@yourserver src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4
-[root@yourserver src]# chmod 750 /usr/local/pgsql
-[root@yourserver src]#
+ [root src]# groupadd web
+[root src]# useradd -g web -d /usr/local/pgsql postgres
+[root src]# mkdir -p /usr/local/pgsql
+[root src]# chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4
+[root src]# chmod 750 /usr/local/pgsql
+[root src]#
groupadd web
useradd -g web -d /usr/local/pgsql postgres
mkdir -p /usr/local/pgsql
chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4
chmod 750 /usr/local/pgsql
-
+
+
+ Mac OS X: Do instead:
+ sudo niutil -create / /groups/web
+sudo niutil - list / /groups
+ The second command returns a list of groups. The last entry should include the gid of the group web, which you will need in the next sequence:
+ sudo niutil -create / /users/postgres
+sudo niutil -createprop / /users/postgres gid web's gid_number
+sudo niutil -createprop / /users/postgres home /usr/local/pgsql
+sudo niutil -createprop / /users/postgres shell /bin/bash
+mkdir -p /usr/local/pgsql
+chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4
+chmod 750 /usr/local/pgsql
+
+
+
Set up postgres's environment variablesThey are necessary for the executable to find its supporting
- libraries. For convenience, we'll simply append the necessary
- lines to the postgres shell config file.
+ libraries. Put the following lines into the postgres user's environment.
- [root@yourserver src]# echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
-[root@yourserver src]# echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
-echo "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/lib" >> ~postgres/.bashrc
-echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bashrc
+ [root src]# su - postgres
+[postgres ~] emacs ~postgres/.bashrc
+ Paste these lines into .bashrc:
+export PATH=$PATH:/usr/local/pgsql/bin
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pgsql/libTest this by logging in as
postgres and checking the
paths; you should see /usr/local/pgsql/bin
- [root@yourserver src]# su - postgres
-[postgres@yourserver pgsql]$ env | grep PATH
+ [root src]# su - postgres
+[postgres pgsql]$ env | grep PATH
LD_LIBRARY_PATH=:/usr/local/pgsql/lib
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/usr/local/pgsql/bin:/usr/local/pgsql/bin
-[postgres@yourserver pgsql]$ exit
+[postgres pgsql]$ exit
@@ -131,21 +153,21 @@
UnicodeUnicodein PostgreSQL support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.
- [root@yourserver src]# su - postgres
-[postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.3.4
-[postgres@yourserver postgresql-7.3.4]$ ./configure
+ [root src]# su - postgres
+[postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4
+[postgres postgresql-7.3.4]$ ./configure
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
(many lines omitted>
linking ./src/makefiles/Makefile.linux to src/Makefile.port
linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
-[postgres@yourserver postgresql-7.3.4]$ make all
+[postgres postgresql-7.3.4]$ make all
make -C doc all
make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc'
(many lines omitted)
make[1]: Leaving directory `/usr/local/src/postgresql-7.3.4/src'
All of PostgreSQL successfully made. Ready to install.
-[postgres@yourserver postgresql-7.3.4]$ make install
+[postgres postgresql-7.3.4]$ make install
make -C doc install
make[1]: Entering directory `/usr/local/src/postgresql-7.3.4/doc'
(many lines omitted)
@@ -166,15 +188,15 @@
PostgreSQL.
- [postgres@yourserver tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
+ [postgres tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
(17 lines omitted)
or
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
-[postgres@yourserver tsearch]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
+[postgres tsearch]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
postmaster successfully started
-[postgres@yourserver tsearch]$
+[postgres tsearch]$
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
@@ -191,15 +213,15 @@
databases are created. We can verify that it was created
with the createlang command in list mode.
- [postgres@yourserver pgsql]$ createlang plpgsql template1
-[postgres@yourserver pgsql]$ createlang -l template1
+ [postgres pgsql]$ createlang plpgsql template1
+[postgres pgsql]$ createlang -l template1
Procedural languages
Name | Trusted?
---------+----------
plpgsql | t
(1 row)
-[postgres@yourserver pgsql]$
+[postgres pgsql]$
createlang plpgsql template1
createlang -l template1
@@ -209,9 +231,9 @@
Create a database and try some simple commands. The output should be as shown.
- [postgres@yourserver pgsql]$ createdb mytestdb
+ [postgres pgsql]$ createdb mytestdb
CREATE DATABASE
-[postgres@yourserver pgsql]$ psql mytestdb
+[postgres pgsql]$ psql mytestdb
Welcome to psql, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
@@ -235,12 +257,12 @@
(1 row)
mytestdb=# \q
-[postgres@yourserver pgsql]$ dropdb mytestdb
+[postgres pgsql]$ dropdb mytestdb
DROP DATABASE
-[postgres@yourserver pgsql]$ exit
+[postgres pgsql]$ exit
logout
-[root@yourserver src]#
+[root src]#Set PostgreSQL to start on boot. First, we copy the
@@ -255,24 +277,24 @@
Red Hat RPM:The init script is already installed; just turn it on for the appropriate run levels.
- [root@yourserver root]# chkconfig --level 345 postgresql on
-[root@yourserver root]#
+ [root root]# chkconfig --level 345 postgresql on
+[root root]# Red Hat from source:
- [root@yourserver src]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
-[root@yourserver src]# chown root.root /etc/rc.d/init.d/postgresql
-[root@yourserver src]# chmod 755 /etc/rc.d/init.d/postgresql
-[root@yourserver src]#
+ [root src]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
+[root src]# chown root.root /etc/rc.d/init.d/postgresql
+[root src]# chmod 755 /etc/rc.d/init.d/postgresql
+[root src]#
cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
chown root.root /etc/rc.d/init.d/postgresql
chmod 755 /etc/rc.d/init.d/postgresqlTest the script.
- [root@yourserver root]# service postgresql stop
+ [root root]# service postgresql stop
Stopping PostgreSQL: ok
-[root@yourserver root]#
+[root root]# If PostgreSQL successfully stopped, then use the following
command to make sure that the script is run appropriately at boot
@@ -281,38 +303,38 @@
- [root@yourserver root]# chkconfig --add postgresql
-[root@yourserver root]# chkconfig --level 345 postgresql on
-[root@yourserver root]# chkconfig --list postgresql
+ [root root]# chkconfig --add postgresql
+[root root]# chkconfig --level 345 postgresql on
+[root root]# chkconfig --list postgresql
postgresql 0:off 1:off 2:on 3:on 4:on 5:on 6:off
-[root@yourserver root]# service postgresql start
+[root root]# service postgresql start
Starting PostgreSQL: ok
-[root@yourserver root]#
+[root root]#
chkconfig --add postgresql
chkconfig --level 345 postgresql on
chkconfig --list postgresql
service postgresql startDebian:
- root:~# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
-root:~# chown root.root /etc/init.d/postgresql
-root:~# chmod 755 /etc/init.d/postgresql
-root:~#
+ [root ~]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
+[root ~]# chown root.root /etc/init.d/postgresql
+[root ~]# chmod 755 /etc/init.d/postgresql
+[root ~]#
cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
chown root.root /etc/init.d/postgresql
chmod 755 /etc/init.d/postgresqlTest the script
- root:~# /etc/init.d/postgresql stop
+ [root ~]# /etc/init.d/postgresql stop
Stopping PostgreSQL: ok
-root:~#
+[root ~]# If PostgreSQL successfully stopped, then use the following
command to make sure that the script is run
appropriately at boot and shutdown.
-root:~# update-rc.d postgresql defaults
+[root ~]# update-rc.d postgresql defaults
Adding system startup for /etc/init.d/postgresql ...
/etc/rc0.d/K20postgresql -> ../init.d/postgresql
/etc/rc1.d/K20postgresql -> ../init.d/postgresql
@@ -321,9 +343,9 @@
/etc/rc3.d/S20postgresql -> ../init.d/postgresql
/etc/rc4.d/S20postgresql -> ../init.d/postgresql
/etc/rc5.d/S20postgresql -> ../init.d/postgresql
-root:~# /etc/init.d/postgresql start
+[root ~]# /etc/init.d/postgresql start
Starting PostgreSQL: ok
-root:~#
+[root ~]#SuSE:
@@ -342,16 +364,16 @@
- root:~# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
-root:~# chown root.root /etc/rc.d/init.d/postgresql
-root:~# chmod 755 /etc/rc.d/init.d/postgresql
+ [root ~]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
+[root ~]# chown root.root /etc/rc.d/init.d/postgresql
+[root ~]# chmod 755 /etc/rc.d/init.d/postgresql
Test the script.
- root:~# /etc/rc.d/init.d/postgresql stop
+ [root ~]# /etc/rc.d/init.d/postgresql stop
Stopping PostgreSQL: ok
@@ -362,7 +384,7 @@
- root:~# cd /etc/rc.d/init.d
+ [root ~]# cd /etc/rc.d/init.d
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql K20postgresql
root:/etc/rc.d/init.d# ln -s /etc/rc.d/init.d/postgresql S20postgresql
root:/etc/rc.d/init.d# cp K20postgresql rc2.d
@@ -388,6 +410,18 @@
Starting PostgreSQL: ok
root:~ #
+
+ Mac OS X:
+
+
+ Install the startup script:
+ cd /Library/StartupItems/
+tar xfz /var/lib/aolserver/service0/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz
+
+
+
+
+
@@ -410,8 +444,8 @@
Change the kernel parameter for maximum shared memory
segment size to 128Mb:
- [root@yourserver root]# echo 134217728 >/proc/sys/kernel/shmmax
-[root@yourserver root]#
+ [root root]# echo 134217728 >/proc/sys/kernel/shmmax
+[root root]#Make that change permanent by editing
/etc/sysctl.conf to
add these lines at the end:
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/recovery.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/recovery.xml,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/recovery.xml 11 Dec 2003 21:39:49 -0000 1.7
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/recovery.xml 26 Jan 2004 15:39:44 -0000 1.8
@@ -5,11 +5,20 @@
%myvars;
]>
- Backup and Recovery
-
- By Don Baccus with additions
+ Backup and Recovery
+
+ By Don Baccus with additions
by Joel Aufrecht
+ We will cover some basic backup and recovery strategies. These are intended to
+ be robust but simple enough to set up. For a large scale production site you would
+ probably need to create your own backup strategies (in particular full dumps from
+ oracle, while easy to set up, are far from the best solution).
+
+
+ There are three basic things which need to be backed up, the database data, the server
+ source tree, and the acs-content-repository (which is in the server source tree).
+
Backup Strategy
@@ -57,25 +66,26 @@
OpenACS installations comprise files and database contents.
If you follow the reference install and put all files,
including configuration files, in
- /var/lib/aolserver/service0/,
+ /var/lib/aolserver/service0/,
and back up the database nightly to a file in
- /var/lib/aolserver/service0/database-backup,
+ /var/lib/aolserver/service0/database-backup,
then you can apply standard file-based backup strategies to
- /var/lib/aolserver/service0
+ /var/lib/aolserver/service0Manual backup and recoveryThis section describes how to make a one-time backup and
- restore of the files and database. This is useful for rolling back to
- known-good versions of a service, such as at initial
+ restore of the files and database. This is useful for rolling
+ back to known-good versions of a service, such as at initial
installation and just before an upgrade. First, you back up the
database to a file within the file tree. Then, you back up the
file tree. All of the information needed to rebuild the site,
- including the AOLserver config files, is then in tree for
- regular file system backup.
+ including the AOLserver config files, is then in tree for regular
+ file system backup.
+
@@ -84,109 +94,104 @@
-
+ Oracle
Download the backup script. Save the file export-oracle.txt as
- /tmp/export-oracle.txt
+ /tmp/export-oracle.txt
Login as root. The following commands will install the export script:
-
- joeuser:~$ su -
- Password: ***********
- root:~# cp /tmp/export-oracle.txt /usr/sbin/export-oracle
- root:~# chmod 700 /usr/sbin/export-oracle
+ [joeuser ~]$ su -
+[root ~]# cp /tmp/export-oracle.txt /usr/sbin/export-oracle
+[root ~]# chmod 700 /usr/sbin/export-oracle
Setup the export directory; this is the directory where backups will
be stored. We recommend the directory
- /ora8/m02/oracle-exports.
+ /ora8/m02/oracle-exports.
-
- root:~# mkdir /ora8/m02/oracle-exports
- root:~# chown oracle.dba /ora8/m02/oracle-exports
- root:~# chmod 770 /ora8/m02/oracle-exports
+ [root ~]# mkdir /ora8/m02/oracle-exports
+[root ~]# chown oracle:dba /ora8/m02/oracle-exports
+[root ~]# chmod 770 /ora8/m02/oracle-exports
Now edit
- /usr/sbin/export-oracle and
+ /usr/sbin/export-oracle and
change the SERVICE_NAME and
DATABASE_PASSWORD fields to
their correct values. If you want to use a directory other than
- /ora8/m02/oracle-exports, you
+ /ora8/m02/oracle-exports, you
also need to change the
exportdir setting.
Test the export procedure by running the command:
-
- root:~# /usr/sbin/export-oracle
- mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory
+ [root ~]# /usr/sbin/export-oracle
+mv: /ora8/m02/oracle-exports/oraexport-service_name.dmp.gz: No such file or directory
- Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000
+Export: Release 8.1.6.1.0 - Production on Sun Jun 11 18:07:45 2000
- (c) Copyright 1999 Oracle Corporation. All rights reserved.
+(c) Copyright 1999 Oracle Corporation. All rights reserved.
-
- Connected to: Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
- With the Partitioning option
- JServer Release 8.1.6.0.0 - Production
- Export done in US7ASCII character set and US7ASCII NCHAR character set
- . exporting pre-schema procedural objects and actions
- . exporting foreign function library names for user SERVICE_NAME
- . exporting object type definitions for user SERVICE_NAME
- About to export SERVICE_NAME's objects ...
- . exporting database links
- . exporting sequence numbers
- . exporting cluster definitions
- . about to export SERVICE_NAME's tables via Conventional Path ...
- . exporting synonyms
- . exporting views
- . exporting stored procedures
- . exporting operators
- . exporting referential integrity constraints
- . exporting triggers
- . exporting indextypes
- . exporting bitmap, functional and extensible indexes
- . exporting posttables actions
- . exporting snapshots
- . exporting snapshot logs
- . exporting job queues
- . exporting refresh groups and children
- . exporting dimensions
- . exporting post-schema procedural objects and actions
- . exporting statistics
- Export terminated successfully without warnings.
-
+Connected to: Oracle8i Enterprise Edition Release 8.1.6.1.0 - Production
+With the Partitioning option
+JServer Release 8.1.6.0.0 - Production
+Export done in US7ASCII character set and US7ASCII NCHAR character set
+ . exporting pre-schema procedural objects and actions
+ . exporting foreign function library names for user SERVICE_NAME
+ . exporting object type definitions for user SERVICE_NAME
+ About to export SERVICE_NAME's objects ...
+ . exporting database links
+ . exporting sequence numbers
+ . exporting cluster definitions
+ . about to export SERVICE_NAME's tables via Conventional Path ...
+ . exporting synonyms
+ . exporting views
+ . exporting stored procedures
+ . exporting operators
+ . exporting referential integrity constraints
+ . exporting triggers
+ . exporting indextypes
+ . exporting bitmap, functional and extensible indexes
+ . exporting posttables actions
+ . exporting snapshots
+ . exporting snapshot logs
+ . exporting job queues
+ . exporting refresh groups and children
+ . exporting dimensions
+ . exporting post-schema procedural objects and actions
+ . exporting statistics
+Export terminated successfully without warnings.
+
-
+ PostgreSQLCreate a backup file and verify that it was created and has a reasonable size (several megabytes).
- [root@localhost root]# su - service0
- [service0@localhost service0]$ pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp service0
- [service0@localhost service0]$ ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
- -rw-rw-r-x 1 service0 service0 4005995 Feb 21 18:28 /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
- [service0@localhost service0]$ exit
- [root@localhost root]#
- su - service0
- pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp openacs-dev
- ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
- exit
+ [root root]# su - service0
+[service0 service0]$ pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp service0
+[service0 service0]$ ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
+-rw-rw-r-x 1 service0 service0 4005995 Feb 21 18:28 /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
+[service0 service0]$ exit
+[root root]#
+su - service0
+pg_dump -f /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp openacs-dev
+ls -al /var/lib/aolserver/service0/database-backup/before_upgrade_to_4.6.dmp
+exit
@@ -195,7 +200,7 @@
Back up the file systemBack up all of the files in the service, including the
database backup file but excluding the auto-generated
- supervise directory, which is
+ supervise directory, which is
unneccesary and has complicated permissions. In the tar command,
@@ -211,7 +216,7 @@
s preserves file sort order
- j compresses the output with bz2.
+ z compresses the output with gzip.The --exclude clauses skips some daemontools files that
@@ -226,37 +231,38 @@
The last clause,
- /var/lib/aolserver/service0/,
+ /var/lib/aolserver/service0/,
specifies the starting point for backup. Tar defaults to
recursive backup.
- [root@yourserver root]# su - service0
- [service0@yourserver service0]$ tar -cpsj --exclude /var/lib/aolserver/service0/etc/daemontools/supervise --file /tmp/service0-backup.tar.bz2 /var/lib/aolserver/service0/
- tar: Removing leading `/' from member names
- [service0@yourserver service0]$
+ [root root]# su - service0
+[service0 service0]$ tar -cpsz --exclude /var/lib/aolserver/service0/etc/daemontools/supervise \
+ --file /tmp/service0-backup.tar.gz /var/lib/aolserver/service0/
+tar: Removing leading `/' from member names
+[service0 service0]$Suffer a catastrophic failure on your production system(We'll simulate this step)
- [root@yourserver root]# svc -d /service/service0
- [root@yourserver root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
- [root@yourserver root]# rm /service/service0
- rm: remove symbolic link `/service/service0'? y
- [root@yourserver root]# ps -auxw | grep service0
- root 1496 0.0 0.0 1312 252 ? S 16:58 0:00 supervise service0
- [root@yourserver root]# kill 1496
- [root@yourserver root]# ps -auxw | grep service0
- [root@yourserver root]# su - postgres
- [postgres@yourserver pgsql]$ dropdb service0
- DROP DATABASE
- [postgres@yourserver pgsql]$ dropuser service0
- DROP USER
- [postgres@yourserver pgsql]$ exit
- logout
- [root@yourserver root]#
+ [root root]# svc -d /service/service0
+[root root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
+[root root]# rm /service/service0
+rm: remove symbolic link `/service/service0'? y
+[root root]# ps -auxw | grep service0
+root 1496 0.0 0.0 1312 252 ? S 16:58 0:00 supervise service0
+[root root]# kill 1496
+[root root]# ps -auxw | grep service0
+[root root]# su - postgres
+[postgres pgsql]$ dropdb service0
+DROP DATABASE
+[postgres pgsql]$ dropuser service0
+DROP USER
+[postgres pgsql]$ exit
+logout
+[root root]#
@@ -273,13 +279,11 @@
Restore the OpenACS files and database backup file.
- [root@yourserver root]# su - service0
- [service0@yourserver service0]$ cd /var/lib/aolserver
- [service0@yourserver aolserver]$ tar xjf /tmp/service0-backup.tar.bz2
- [service0@yourserver aolserver]$ chmod -R 775 service0
- [service0@yourserver aolserver]$ chown -R service0.webservice0
-
-
+ [root root]# su - service0
+[service0 service0]$ cd /var/lib/aolserver
+[service0 aolserver]$ tar xzf /tmp/service0-backup.tar.gz
+[service0 aolserver]$ chmod -R 775 service0
+[service0 aolserver]$ chown -R service0.webservice0Restore the database
@@ -302,35 +306,37 @@
-
+ Postgres
-
-
- Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. To compensate, we pre-creating some critical items first, which leads to some harmless errors.
- [root@yourserver root]# su - postgres
- [postgres@yourserver pgsql]$ createuser service0
- Shall the new user be allowed to create databases? (y/n) y
- Shall the new user be allowed to create more new users? (y/n) y
- CREATE USER
- [service0@yourserver web]$ createdb service0
- CREATE DATABASE
- [service0@yourserver web]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
- (many lines omitted)
- [service0@yourserver web]$ psql service0 < /var/lib/aolserver/service0/database-backup/database-backup.dmp
- (many lines omitted)
- [service0@yourserver web]$ exit
- [postgres@yourserver pgsql]$ exit
- logout
-
+ If the database user does not already exist, create it.
+
+ [root root]# su - postgres
+[postgres ~]$ createuser service0
+Shall the new user be allowed to create databases? (y/n) y
+Shall the new user be allowed to create more new users? (y/n) y
+CREATE USER
+[postgres ~]$ exit
+
+ Because of a bug in Postgres backup-recovery, database objects are not guaranteed to be created in the right order. In practice, running the OpenACS initialization script is always sufficient to create any out-of-order database objects. Next, restore the database from the dump file. The restoration will show some error messages at the beginning for objects that were pre-created from the OpenACS initialization script, which can be ignored.
+
+[root root]# su - service0
+[service0 ~]$ createdb service0
+CREATE DATABASE
+[service0 ~]$ psql -f /var/lib/aolserver/service0/packages/acs-kernel/sql/postgresql/postgresql.sql service0
+(many lines omitted)
+[service0 ~]$ psql service0 < /var/lib/aolserver/service0/database-backup/database-backup.dmp
+(many lines omitted)
+[service0 ~]$ exit
+[postgres ~]$ exit
+logoutActivate the service
- [root@yourserver root]# ln -s /var/lib/aolserver/service0/etc/daemontools /service/service0
- [root@yourserver root]# sleep 10
- [root@yourserver root]# svgroup web /service/service0
- [root@yourserver root]#
+ [root root]# ln -s /var/lib/aolserver/service0/etc/daemontools /service/service0
+[root root]# sleep 10
+[root root]# svgroup web /service/service0
@@ -339,13 +345,13 @@
Automated Backup (OPTIONAL)
- The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/service0/database-backup and then backs up all of /var/lib/aolserver/service0 to a single zip file, and then copies that zip file to another computer.
+ The recommended backup strategy for a production sit is to use an automated script which first backs up the database to a file in /var/lib/aolserver/service0/database-backup and then backs up all of /var/lib/aolserver/service0 to a single zip file, and then copies that zip file to another computer.Make sure that the manual backup process described above works.
- Customize the default backup script. Edit /var/lib/aolserver/service0/etc/backup.sh with your specific parameters.
+ Customize the default backup script. Edit /var/lib/aolserver/service0/etc/backup.sh with your specific parameters.
@@ -363,39 +369,39 @@
Using CVS for backup-recoveryCVS-only backup is often appropriate for development sites. If you are already using CVS and your data is not important, you probably don't
- need to do anything to back up your files. Just make
- sure that your current work is checked into the system.
- You can then roll back based on date - note the
- current system time, down to the minute. For maximum
- safety, you can apply a tag to your current
- files. You will still need to back up your database.
- Note that, if you did the CVS options in this document, the /var/lib/aolserver/service0/etc directory is not included in cvs and you may want to add it.
- [root@localhost root]# su - service0
- [service0@localhost service0]$ cd /var/lib/aolserver/service0
- [service0@localhost service0]$ cvs commit -m "last-minute commits before upgrade to 4.6"
- cvs commit: Examining .
- cvs commit: Examining bin
- (many lines omitted)
- [service0@localhost service0]$ cvs tag before_upgrade_to_4_6
- cvs server: Tagging bin
- T bin/acs-4-0-publish.sh
- T bin/ad-context-server.pl
- (many lines omitted)
- [service0@localhost service0]$ exit
- [root@localhost root]#
- su - service0
- cd /var/lib/aolserver/service0
- cvs commit -m "last-minute commits before upgrade to 4.6"
- cvs tag before_upgrade_to_4_6
- exit
+ need to do anything to back up your files. Just make
+ sure that your current work is checked into the system.
+ You can then roll back based on date - note the
+ current system time, down to the minute. For maximum
+ safety, you can apply a tag to your current
+ files. You will still need to back up your database.
+ Note that, if you did the CVS options in this document, the /var/lib/aolserver/service0/etc directory is not included in cvs and you may want to add it.
+ [root root]# su - service0
+[service0 service0]$ cd /var/lib/aolserver/service0
+[service0 service0]$ cvs commit -m "last-minute commits before upgrade to 4.6"
+cvs commit: Examining .
+cvs commit: Examining bin
+(many lines omitted)
+[service0 service0]$ cvs tag before_upgrade_to_4_6
+cvs server: Tagging bin
+T bin/acs-4-0-publish.sh
+T bin/ad-context-server.pl
+(many lines omitted)
+[service0 service0]$ exit
+[root root]#
+su - service0
+cd /var/lib/aolserver/service0
+cvs commit -m "last-minute commits before upgrade to 4.6"
+cvs tag before_upgrade_to_4_6
+exitTo restore files from a cvs tag such as the one used above:
- [root@localhost root]# su - service0
- [service0@localhost service0]$ cd /var/lib/aolserver/service0
- [service0@localhost service0]$ cvs up -r current
- [service0@localhost service0]$ exit
- su - service0
- cd /var/lib/aolserver/service0
- cvs up -r current
+ [root root]# su - service0
+[service0 service0]$ cd /var/lib/aolserver/service0
+[service0 service0]$ cvs up -r current
+[service0 service0]$ exit
+su - service0
+cd /var/lib/aolserver/service0
+cvs up -r current
- ($Id$)
-
\ No newline at end of file
+ ($Id$)
+
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/red-hat.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/red-hat.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/red-hat.xml 11 Dec 2003 21:39:49 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/red-hat.xml 26 Jan 2004 15:39:44 -0000 1.7
@@ -238,7 +238,7 @@
prompt, log in:
yourserver login: root
Password:
-[root@yourserver root]#
+[root root]#Install any security patches. For example, insert your CD with
@@ -305,11 +305,11 @@
is better, it's a pain in the ass to deal with and nobody's
had any trouble leaving PostgreSQL the way it is.)
-[root@yourserver root]# service pcmcia stop
-[root@yourserver root]# service netfs stop
-[root@yourserver root]# chkconfig --del pcmcia
-[root@yourserver root]# chkconfig --del netfs
-[root@yourserver root]#
+[root root]# service pcmcia stop
+[root root]# service netfs stop
+[root root]# chkconfig --del pcmcia
+[root root]# chkconfig --del netfs
+[root root]#
service pcmcia stop
service netfs stop
chkconfig --del pcmcia
@@ -332,9 +332,9 @@
Warning: Permanently added 'yourserver.test (1.2.3.4)' (DSA) to the list of known hosts.
Password:
Last login: Mon Mar 3 21:15:27 2003 from host-12-01.dsl-sea.seanet.com
-[remadmin@yourserver remadmin]$ su -
+[remadmin remadmin]$ su -
Password:
-[root@yourserver root]#
+[root root]#If you didn't burn a CD of patches and use it, can still
@@ -345,8 +345,8 @@
Red Hat 8.0 system kernel (2.4.18-14, which you can check
with uname -a) has several security problems. Download the new kernel, install it, and reboot.
-[root@yourserver root]# cd /tmp
-[root@yourserver tmp]# wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
+[root root]# cd /tmp
+[root tmp]# wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
--20:39:00-- http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
=> `kernel-2.4.18-27.7.x.i686.rpm'
Resolving updates.redhat.com... done.
@@ -362,12 +362,12 @@
warning: kernel-2.4.18-27.7.x.i686.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:kernel ########################################### [100%]
-[root@yourserver tmp]# reboot
+[root tmp]# reboot
Broadcast message from root (pts/0) (Sat May 3 20:46:39 2003):
The system is going down for reboot NOW!
-[root@yourserver tmp]#
+[root tmp]#
cd /tmp
wget http://updates.redhat.com/7.1/en/os/i686/kernel-2.4.18-27.7.x.i686.rpm
rpm -Uvh kernel-2.4.18-27.7.x.i686.rpm
Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/upgrade.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/upgrade.xml,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-core-docs/www/xml/install-guide/upgrade.xml 11 Dec 2003 21:39:49 -0000 1.7
+++ openacs-4/packages/acs-core-docs/www/xml/install-guide/upgrade.xml 26 Jan 2004 15:39:45 -0000 1.8
@@ -1,17 +1,17 @@
%myvars;
]>
-
- Upgrading
+
+ Upgradingby Joel Aufrecht
-
+ Overview
- Starting with Version 4.5, all OpenACS core packages support
+ Starting with Version 4.5, all OpenACS core packages support
automatic upgrade. That means that, if you have OpenACS 4.5
or better, you should always be able to upgrade all of your core
packages automatically. If you haven't changed anything, no
@@ -22,296 +22,412 @@
in a new tarball include database upgrade scripts. To start the
upgrade, replace your existing files with the new files and then browse to the APM, which will detect the new packages and offer to run the appropriate database upgrade scripts. After restarting the server again, the upgrade is
complete.
-
+
Assumptions in this section
-
-
-
-
- name of OpenACS user
- nsadmin
-
-
- OpenACS server name
- openacs-dev
-
-
- Root of OpenACS file tree
- /web/openacs-dev
-
-
- Database backup directory
- /backup/openacs/
-
-
-
-
-
-
-
- Upgrading 4.6.3 to 5.0
- Current working notes in Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results.
-
-
-
- Upgrading 4.5 to 4.6
-
- upgrade
- OpenACS 4.5 to 4.6
+
+
+
+ name of OpenACS user
+ service0
+
+
+ OpenACS server name
+ service0
+
+
+ Root of OpenACS file tree
+ /var/lib/aolserver/service0
+
+
+ Database backup directory
+ /var/lib/aolserver/service0/database-backup
+
+
+
+
+
+
+ Upgrading OpenACS
+
+ Upgrading 4.5 to 4.6.x
+
+ upgrade
+ OpenACS 4.5 to 4.6.xLinux/Unix
-
-The required platform for OpenACS 4.6 is the same as
- 4.5, with the excepion of OpenFTS. You now need OpenFTS 0.3.2, not 0.2.
- OpenACS 4.6 does not support PostgreSQL 7.3.
-
- A computer with OpenACS 4.5.
-
- OpenACS 4.6 tarball
-
- Required for Full Text Search on PostgreSQL: OpenFTS 0.3.2
-
-
- Upgrade Sequence
-
-
-
- Make a Backup
- Back up the database and file system (see ).
-
-
-
-
- OPTIONAL: Upgrade OpenFTS
- OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible -
- completing this step will not break a working OpenFTS Engine from 4.5.
-
-
-
-
- Uninstall the old OpenFTS Engine
-
- Browse to http://yourserver/openfts.
-
-
- Click Administration.
-
- Click Drop OpenFTS Engine
-
-
-
-
- Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)
- cd /usr/local/src/
-tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
-chown -R root.root Search-OpenFTS-tcl-0.3.2/
-cd Search-OpenFTS-tcl-0.3.2/
-./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
-cd aolserver/
-make
-
+
+ The required platform for OpenACS 4.6 is the same as
+ 4.5, with the exception of OpenFTS. OpenACS 4.6 and later require OpenFTS 0.3.2 for full text search on PostGreSQL. If you have OpenFTS 0.2, you'll need to upgrade.
+
+ A computer with OpenACS 4.5.
+
+ OpenACS 4.6 tarball or CVS checkout/export.
+
+ Required for Full Text Search on PostgreSQL: OpenFTS 0.3.2
+
+
+
+
+
+ Make a Backup
+ Back up the database and file system (see ).
+
+
+
+
+ OPTIONAL: Upgrade OpenFTS
+
+
+
+
+
+ Stop the server
+
+ [root root]# svc -d /service/service0
+
+
+
+ Upgrade the file system
+
+
+
+
+
+ Start the server
+
+ [root root]# svc -u /service/service0
+
+
+
+ Use APM to upgrade the database
+
+
+
+
+ Browse to the package manager, http://yourserver/acs-admin/apm.
+
+
+ Click Install packages.
+
+
+ Select the packages you want to install. This should
+ be everything that says
+ upgrade, plus any new
+ packages you want. It's safest to upgrade the kernel by
+ itself, and then come back and upgrade the rest of the
+ desired packages in a second pass.
+
+
+ On the next screen, click Install Packages
+
+
+ When prompted, restart the server:
+ [root root]# restart-aolserver service0
+
+
+ Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.
+
+
+ Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is &version;.
+
+
+
+
+
+ Rollback
+ If anything goes wrong, roll back to the backup snapshot.
+
+
+
+
+
+ Upgrading OpenACS 4.6.3 to 5.0
+
+
+
+ Oracle
+ Not yet documented. It should be possible to upgrade via the APM just as when upgrading to 4.6.3.
+
+
+
+
+ PostGreSQL
-Back up the old fts driver as a precaution and install the newly
-compiled one
-mv /usr/local/aolserver/bin/nsfts.so /usr/local/aolserver/bin/nsfts-0.2.so
-cp nsfts.so /usr/local/aolserver/bin
-
- Build and install the postgres code
-cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
-cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts
-make
-su - postgres
-cd tsearch/
-make
-make install
-exit
- In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.
- [root@localhost root]# su - nsadmin
-[nsadmin@localhost dev]$ psql openacs-dev -f /usr/local/pgsql/share/contrib/openfts.sql
-CREATE
-CREATE
-[nsadmin@localhost dev]$ psql openacs-dev -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
-BEGIN
-CREATE
-(~30 more lines)
-[nsadmin@localhost dev]$ exit
-[root@localhost root]#
-su - nsadmin
-psql openacs-dev -f /usr/local/pgsql/share/contrib/openfts.sql
-psql openacs-dev -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
-exit
-
-
-
+ You must use PostGreSQL 7.3.x or newer, or Oracle, to upgrade OpenACS beyond 4.6.3. (OpenACS 5.0 requires PostGreSQL 7.3; OpenACS versions prior to 4.6.3 do not support PostGreSQL 7.3; only OpenACS 4.6.3 supports both 7.2 and 7.3. Upgrade PostGreSQL to 7.3)
+
+
+
+
+ Back up the database and file system.
+
+
+ Upgrade the kernel manually:
+ [root root]# su - service0
+[service0 aolserver]$ cd /var/lib/aolserver/ service0/packages/acs-kernel/sql/postgresql/upgrade
+
+ Manually execute each of the upgrade scripts in sequence, either from within psql or from the command line with commands such as psql -f upgrade-4.6.3-4.6.4.sql service0. Run the scripts in this order (order is tentative, not verified):
+
+ psql -f upgrade-4.6.3-4.6.4.sql service0
+psql -f upgrade-4.6.4-4.6.5.sql service0
+psql -f upgrade-4.6.5-4.6.6.sql service0
+psql -f upgrade-4.7d-4.7.2d.sql service0
+psql -f upgrade-4.7.2d-5.0d.sql service0
+psql -f upgrade-5.0d-5.0d2.sql service0
+psql -f upgrade-5.0d2-5.0d3.sql service0
+psql -f upgrade-5.0d6-5.0d7.sql service0
+psql -f upgrade-5.0d7-5.0d9.sql service0
+psql -f upgrade-5.0d11-5.0d12.sql service0
+psql -f upgrade-5.0.0a4-5.0.0a5.sql service0
+psql -f upgrade-5.0.0b1-5.0.0b2.sql service0
+psql -f upgrade-5.0.0b2-5.0.0b3.sql service0
+psql -f upgrade-5.0.0b3-5.0.0b4.sql service0
+
+
+ Load acs-authentication data model.
+ psql -f /var/lib/aolserver/service0/openacs-5/packages/acs-authentication/sql/postgresql/acs-authentication-create.sql service0
+
+
+ Load acs-lang data model.
+ psql -f /var/lib/aolserver/service0/packages/acs-lang/sql/postgresql/acs-lang-create.sql service0
+
+
+ Create a file which will be executed on startup which takes care of a few issues with authentication and internationalization: create service0/tcl/zzz-postload.tcl containing:
+ if {![apm_package_installed_p acs-lang]} {
+apm_package_install -enable -mount_path acs-lang [acs_root_dir]/packages/acs-lang/acs-lang.info
+lang::catalog::import -locales [list "en_US"]
+}
+
+if {![apm_package_installed_p acs-authentication]} {
+apm_package_install -enable [acs_root_dir]/packages/acs-authentication/acs-authentication.info
+apm_parameter_register "UsePasswordWidgetForUsername" \
+"Should we hide what the user types in the username
+field, the way we do with the password field? Set
+this to 1 if you are using sensitive information
+such as social security number for username." \
+acs-kernel 0 number \
+security 1 1
+parameter::set_value -package_id [ad_acs_kernel_id] -parameter UsePasswordWidgetForUsername -value 0
+}
+
+
+ If you can login, visit /acs-admin/apm and upgrade acs-kernel and acs-service-contract and uncheck the data model scripts. Restart. If everything is still working, make another backup of the database.
+
+
+
+ Upgrade other packages via the APM
+
+
+
+ See also this forum post: Forum OpenACS Development: 4.6.3 upgrade to 5-HEAD: final results.
+
+
+
+
+
+ Upgrading the OpenACS files
+ OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.
+ Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.
+
-
- Stop the server
-
- [root@localhost root]# svc -d /service/openacs-dev
-
-
- Upgrade the file tree
- If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.
+ Upgrading files for a site which is not in a CVS repository
+ Unpack the tarball into a new directory and copy its contents on top of your working directory.
-
-
-
- Upgrading files without CVS
- Unpack the tarball into a new directory and copy its contents on top of your working directory.
-
- [root@localhost root]# su - nsadmin
-[nsadmin@localhost aolserver]$ cd /web
-[nsadmin@localhost web]$ tar xzf /tmp/openacs-4-6.tgz
-[nsadmin@localhost web]$ cp -r openacs-4-6/* openacs-4
-[nsadmin@localhost openacs-upgrade]$ exit
-[root@localhost root]#
-su - nsadmin
-cd /web
-tar xzf /tmp/openacs-4-6.tgz
-cp -r openacs-4-6/* openacs-4
-exit
-
-
-
- Upgrading files with CVS
-
-
-
-
- Unpack the new files into a working directory.
- [root@localhost root]# su - nsadmin
-[nsadmin@localhost aolserver]$ cd /tmp
-[nsadmin@localhost tmp]$ tar xzv openacs-4-6.tgz
-[nsadmin@localhost tmp]$ cd openacs-4.6
-
- Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.
- [nsadmin@localhost openacs-4.6]$ cvs import -m "upgrade to OpenACS 4.6" openacs
-OpenACS openacs-4-6
- Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.
-[nsadmin@localhost openacs-4.6]$ cd /web
-[nsadmin@localhost tmp]$ mkdir openacs-upgrade
-[nsadmin@localhost tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
-(CVS feedback here)
-su - nsadmin
-cd /tmp
-tar xzv openacs-4-6.tgz
-cd openacs-4.6
-cvs import -m "upgrade to OpenACS 4.6" openacs OpenACS openacs-4-6
-cd /tmp
-mkdir openacs-upgrade
-cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
-
-
-
- The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.
-
-
- Once you've fixed any conflicts, commit the new code
- to your local tree.
- [nsadmin@localhost tmp]$ cd openacs-upgrade
-[nsadmin@localhost openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
-cd openacs-upgrade
-cvs commit -m "Upgraded to 4.6"
-
-
- Update your working tree with the new
- files. The CVS flags ensure that new directories are created and pruned directories destroyed.
-
-[nsadmin@localhost openacs-upgrade]$ cd /web/openacs-dev
-[nsadmin@localhost openacs-dev]$ cvs up -Pd
-(CVS feedback)
-[nsadmin@localhost openacs-dev]$ exit
-[root@localhost root]#
-cd /web/openacs-dev
-cvs up -Pd
-exit
-
-
-
-
+ [root root]# su - service0
+ [service0 aolserver]$ cd /var/lib/aolserver
+ [service0 web]$ tar xzf /tmp/openacs-4-6.tgz
+ [service0 web]$ cp -r openacs-4-6/* openacs-4
+ [service0 openacs-upgrade]$ exit
+ [root root]#
+ su - service0
+ cd /var/lib/aolserver
+ tar xzf /tmp/openacs-4-6.tgz
+ cp -r openacs-4-6/* openacs-4
+ exit
- Start the server
+ Upgrading files for a site which is in a CVS repository
- [root@localhost root]# svc -u /service/openacs-dev
-
-
-
- Use APM to upgrade the database
-
-
- Browse to the package manager, http://yourserver/acs-admin/apm.
+ Unpack the new files into a working directory.
+ [root root]# su - service0
+ [service0 aolserver]$ cd /tmp
+ [service0 tmp]$ tar xzf openacs-4-6.tgz
+ [service0 tmp]$ cd openacs-4.6
+ Import the new files into your cvs repository; where they match existing files, they will become the new version of the file.
+ [service0 openacs-4.6]$ cvs import -m "upgrade to OpenACS 4.6" openacs
+ OpenACS openacs-4-6
+ Create a new directory as temporary working space to reconcile conflicts between the new files and your current work. The example uses the cvs keyword yesterday, making the assumption that you haven't checked in new code to your local tree in the last day.
+ [service0 openacs-4.6]$ cd /var/lib/aolserver
+ [service0 tmp]$ mkdir openacs-upgrade
+ [service0 tmp]$ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
+ (CVS feedback here)
+ su - service0
+ cd /tmp
+ tar xzv openacs-4-6.tgz
+ cd openacs-4.6
+ cvs import -m "upgrade to OpenACS 4.6" openacs OpenACS openacs-4-6
+ cd /tmp
+ mkdir openacs-upgrade
+ cvs checkout -d openacs-upgrade -jOpenACS:yesterday -jOpenACS openacs > cvs.txt 2>&1
- Click Install packages.
+ The file /tmp/openacs-upgrade/cvs.txt contains the results of the upgrade. If you changed files that are part of the OpenACS tarball and those changes conflict with the 4.5-4.6 upgrade, you'll have to manually reconcile them. Use the emacs command M-x sort-lines and then, for each line that starts with a C, open that file and manually resolve the conflict by deleting the excess lines. When you're finished, or if there aren't any conflicts, save and exit.
- Select the packages you want to install. This should
- be everything that says
- upgrade, plus any new
- packages you want. It's safest to upgrade the kernel by
- itself, and then come back and upgrade the rest of the
- desired packages in a second pass.
+ Once you've fixed any conflicts, commit the new code
+ to your local tree.
+ [service0 tmp]$ cd openacs-upgrade
+ [service0 openacs-upgrade]$ cvs commit -m "Upgraded to 4.6"
+ cd openacs-upgrade
+ cvs commit -m "Upgraded to 4.6"
- On the next screen, click Install Packages
+ Update your working tree with the new files. The CVS flags ensure that new directories are created and pruned directories destroyed.
+ [service0 openacs-upgrade]$ cd /var/lib/aolserver/service0
+ [service0 service0]$ cvs up -Pd
+ (CVS feedback)
+ [service0 service0]$ exit
+ [root root]#
+ cd /var/lib/aolserver/service0
+ cvs up -Pd
+ exit
-
- When prompted, restart the server:
- [root@localhost root]# restart-aolserver openacs-dev
-
-
- Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.
-
-
- Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is &version;.
-
-
-
- OPTIONAL: Install the new OpenFTS Engine.
- If you want to upgrade the OpenFTS Engine, do these
- steps. (You must have already upgraded the OpenFTS driver to
- 0.3.2.)
-
-
-
- Browse to http://yourserver/admin/site-map
-
-
- On the openfts line, click on set parameters.
-
-
- Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/
-
-
- Click Set Parameters
-
-
- [root@localhost root]# restart-aolserver openacs-dev
-
-
- Browse to http://yourserver/openfts
-
- Click Administration.
-
- Click Initialize OpenFTS Engine
-
-
-
-
-
- Rollback
- If anything goes wrong, roll back to the backup snapshot.
-
-
-
- ($Id$)
-
-
+
+
+
+ Upgrading Platform components
+
+ Upgrading OpenFTS from 0.2 to 0.3.2
+ OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.
+
+
+ Uninstall the old OpenFTS Engine from the service0 database.
+
+ Browse to http://yourserver/openfts.
+
+
+ Click Administration.
+
+ Click Drop OpenFTS Engine
+
+
+
+
+ Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)
+ cd /usr/local/src/
+ tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
+ chown -R root.root Search-OpenFTS-tcl-0.3.2/
+ cd Search-OpenFTS-tcl-0.3.2/
+ ./configure --with-aolserver-src=/usr/local/src/aolserver/aolserver --with-tcl=/usr/lib/
+ cd aolserver/
+ make
+
+
+ Back up the old fts driver as a precaution and install the newly
+ compiled one
+ mv /usr/local/aolserver/bin/nsfts.so /usr/local/aolserver/bin/nsfts-0.2.so
+ cp nsfts.so /usr/local/aolserver/bin
+
+ Build and install the OpenFTS code for PostGresSQL
+ cd /usr/local/src/Search-OpenFTS-tcl-0.3.2/
+ cp -r pgsql_contrib_openfts /usr/local/src/postgresql-7.2.3/contrib /usr/local/src/postgresql-7.2.3/contrib/pgsql_contrib_openfts
+ make
+ su - postgres
+ cd tsearch/
+ make
+ make install
+ exit
+ In order for the OpenACS 4.6 OpenFTS Engine to use the OpenFTS 0.3.2 driver, we need some commands added to the database.
+ [root root]# su - service0
+ [service0 dev]$ psql service0 -f /usr/local/pgsql/share/contrib/openfts.sql
+ CREATE
+ CREATE
+ [service0 dev]$ psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
+ BEGIN
+ CREATE
+ (~30 more lines)
+ [service0 dev]$ exit
+ [root root]#
+ su - service0
+ psql service0 -f /usr/local/pgsql/share/contrib/openfts.sql
+ psql service0 -f /usr/local/src/postgresql-7.2.3/contrib/tsearch/tsearch.sql
+ exit
+
+
+
+ OPTIONAL: Install the new OpenFTS Engine.
+ If you want to upgrade the OpenFTS Engine, do these
+ steps. (You must have already upgraded the OpenFTS driver to
+ 0.3.2.)
+
+
+
+ Browse to http://yourserver/admin/site-map
+
+
+ On the openfts line, click on set parameters.
+
+
+ Change the value of openfts_tcl_src_path from /usr/local/src/Search-OpenFTS-tcl-0.2/ to /usr/local/src/Search-OpenFTS-tcl-0.3.2/
+
+
+ Click Set Parameters
+
+
+ [root root]# restart-aolserver service0
+
+
+ Browse to http://yourserver/openfts
+
+ Click Administration.
+
+ Click Initialize OpenFTS Engine
+
+
+
+
+
+
+ Upgrading from PostGreSQL 7.2 to 7.3
+ An OpenACS database created in PostGreSQL 7.2 will not work correctly in PostGreSQL 7.3. This is because 7.2 truncates function names to 31 characters, but 7.3 does not. This does not cause problems in 7.2, because truncation occurs both at function creation and at function calling, so they still match. But if you use a database created in 7.2 in 7.3, the function names in the database remain truncated but the function calls are not, and so they don't match. Also some functions use casting commands that no longer work in 7.3 and these functions must be recreated.
+
+ To upgrade an OpenACS site from PostGreSQL 7.2 to 7.3, first upgrade the kernel to 4.6.3. Then, dump the database, run the upgrade script /var/lib/aolserver/service0/bin/pg_7.2to7.3_upgrade_helper.pl on the dump file, and reply the dump. See Forum OpenACS Q&A: PG 7.2->7.3 upgrade gotcha?. Example:
+
+
+ Back up the database as per .
+
+
+ Run the upgrade script on the backup file.
+ [root root]# su - service0
+ [service0 service0]# cd /var/lib/aolserver/service0/bin
+ [service0 bin]$ ./pg_7.2to7.3_upgrade_helper.pl \
+ ../database-backup/nightly.dmp \
+ ../database-backup/upgrade-7.3.dmp \
+ /var/lib/aolserver/service0
+ ==================================================================
+ looking for function acs_object__check_object_ancest in oacs
+ grep result: /var/lib/aolserver/aufrecht-dev/packages/acs-kernel/sql/postgresql/acs-objects-create.sql:create function acs_object__check_object_ancestors (integer,integer,integer)
+ replacing acs_object__check_object_ancest with acs_object__check_object_ancestors
+ (many lines omitted)
+ [service0 bin]$
+
+
+
+ Use perl to replace timestamp with timestamptz in the dump file.
+ find . -type f -name "*sql" | xargs perl -p -i.tmp -e "s/timestamp with time zone/timestamptz/g"
+ find . -type f -name "*sql" | xargs perl -p -i.tmp -e "s/\\wtimestamp[^t]/ timestamptz/g"
+
+
+ Restore the database from dump as per the recovery instructions.
+
+
+
+
+
+
Index: openacs-4/packages/acs-core-docs/www/xml/kernel/apm-design.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/apm-design.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/kernel/apm-design.xml 11 Dec 2003 21:39:49 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/kernel/apm-design.xml 26 Jan 2004 15:39:45 -0000 1.7
@@ -29,16 +29,16 @@
Tcl API
-
+
apm-procs.tcl
-
+
apm-install-procs.tcl (Supports installation of packages)
-
+
20-apm-load-procs.tcl (Bootstraps APM for server startup)
-
+
apm-admin-procs.tcl (Supports APM UI)
@@ -208,9 +208,6 @@
-
- OpenACS without APM vs. with APM
-
Index: openacs-4/packages/acs-core-docs/www/xml/kernel/groups-design.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/groups-design.xml,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-core-docs/www/xml/kernel/groups-design.xml 11 Dec 2003 21:39:50 -0000 1.5
+++ openacs-4/packages/acs-core-docs/www/xml/kernel/groups-design.xml 26 Jan 2004 15:39:45 -0000 1.6
@@ -697,18 +697,17 @@
Revision History
-
-
-
+
Document Revision #Action Taken, NotesWhen?By Whom?
-
+
+
0.1Creation
Index: openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml 11 Dec 2003 21:39:50 -0000 1.6
+++ openacs-4/packages/acs-core-docs/www/xml/kernel/rp-design.xml 26 Jan 2004 15:39:45 -0000 1.7
@@ -22,17 +22,17 @@
-
-/packages/acs-kernel/tcl/request-processor-procs.tcl
+
+/packages/acs-tcl/tcl/request-processor-procs.tcl
-
-/packages/acs-kernel/tcl/request-processor-init.tcl
+
+/packages/acs-tcl/tcl/request-processor-init.tcl
-
-/packages/acs-kernel/tcl/site-nodes-procs.tcl
+
+/packages/acs-tcl/tcl/site-nodes-procs.tcl
-
-/packages/acs-kernel/tcl/site-nodes-init.tcl
+
+/packages/acs-tcl/tcl/site-nodes-init.tcl
/packages/acs-kernel/sql/site-nodes-create.sql
Index: openacs-4/packages/acs-kernel/acs-kernel.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/acs-kernel.info,v
diff -u -r1.52 -r1.53
--- openacs-4/packages/acs-kernel/acs-kernel.info 6 Jan 2004 15:54:43 -0000 1.52
+++ openacs-4/packages/acs-kernel/acs-kernel.info 26 Jan 2004 15:39:45 -0000 1.53
@@ -7,14 +7,14 @@
tt
-
+ Don BaccusRoutines and data models providing the foundation for OpenACS-based Web services.
- 2003-11-07
+ 2004-01-21OpenACSThe OpenACS kernel contains the core datamodel create and drop scripts for such things as objects, groups, partiies and the supporting PL/SQL and PL/pgSQL procedures.
-
+
Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql 1 Nov 2003 12:27:19 -0000 1.9
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d2-5.0d3.sql 26 Jan 2004 15:39:45 -0000 1.10
@@ -6,6 +6,709 @@
-- @cvs-id $Id$
--
+
+-- Change delete (reserved word in Oracle) to del
+
+create or replace package acs_object
+as
+
+ function new (
+ object_id in acs_objects.object_id%TYPE default null,
+ object_type in acs_objects.object_type%TYPE
+ default 'acs_object',
+ creation_date in acs_objects.creation_date%TYPE
+ default sysdate,
+ creation_user in acs_objects.creation_user%TYPE
+ default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return acs_objects.object_id%TYPE;
+
+ procedure del (
+ object_id in acs_objects.object_id%TYPE
+ );
+
+ function name (
+ object_id in acs_objects.object_id%TYPE
+ ) return varchar2;
+
+ -- The acs_object_types.name_method for "acs_object"
+ --
+ function default_name (
+ object_id in acs_objects.object_id%TYPE
+ ) return varchar2;
+
+ -- Determine where the attribute is stored and what sql needs to be
+ -- in the where clause to retreive it
+ -- Used in get_attribute and set_attribute
+ procedure get_attribute_storage (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE,
+ v_column out varchar2,
+ v_table_name out varchar2,
+ v_key_sql out varchar2
+ );
+
+ -- Get/set the value of an object attribute, as long as
+ -- the type can be cast to varchar2
+ function get_attribute (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE
+ ) return varchar2;
+
+ procedure set_attribute (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE,
+ value_in in varchar2
+ );
+
+ function check_representation (
+ object_id in acs_objects.object_id%TYPE
+ ) return char;
+
+ procedure update_last_modified (
+ object_id in acs_objects.object_id%TYPE,
+ modifying_user in acs_objects.modifying_user%TYPE,
+ modifying_ip in acs_objects.modifying_ip%TYPE,
+ last_modified in acs_objects.last_modified%TYPE default sysdate
+ );
+
+end acs_object;
+/
+show errors
+
+
+create or replace package body acs_object
+as
+
+ procedure initialize_attributes (
+ object_id in acs_objects.object_id%TYPE
+ )
+ is
+ v_object_type acs_objects.object_type%TYPE;
+ begin
+ -- XXX This should be fixed to initialize supertypes properly.
+
+ -- Initialize dynamic attributes
+ insert into acs_attribute_values
+ (object_id, attribute_id, attr_value)
+ select
+ initialize_attributes.object_id, a.attribute_id, a.default_value
+ from acs_attributes a, acs_objects o
+ where a.object_type = o.object_type
+ and o.object_id = initialize_attributes.object_id
+ and a.storage = 'generic'
+ and a.static_p = 'f';
+
+ -- Retreive type for static attributes
+ select object_type into v_object_type from acs_objects
+ where object_id = initialize_attributes.object_id;
+
+ -- Initialize static attributes
+ begin
+ insert into acs_static_attr_values
+ (object_type, attribute_id, attr_value)
+ select
+ v_object_type, a.attribute_id, a.default_value
+ from acs_attributes a, acs_objects o
+ where a.object_type = o.object_type
+ and o.object_id = initialize_attributes.object_id
+ and a.storage = 'generic'
+ and a.static_p = 't'
+ and not exists (select 1 from acs_static_attr_values
+ where object_type = a.object_type);
+ exception when no_data_found then null;
+ end;
+
+ end initialize_attributes;
+
+ function new (
+ object_id in acs_objects.object_id%TYPE default null,
+ object_type in acs_objects.object_type%TYPE
+ default 'acs_object',
+ creation_date in acs_objects.creation_date%TYPE
+ default sysdate,
+ creation_user in acs_objects.creation_user%TYPE
+ default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ )
+ return acs_objects.object_id%TYPE
+ is
+ v_object_id acs_objects.object_id%TYPE;
+ begin
+ if object_id is null then
+ select acs_object_id_seq.nextval
+ into v_object_id
+ from dual;
+ else
+ v_object_id := object_id;
+ end if;
+
+ insert into acs_objects
+ (object_id, object_type, context_id,
+ creation_date, creation_user, creation_ip)
+ values
+ (v_object_id, object_type, context_id,
+ creation_date, creation_user, creation_ip);
+
+ acs_object.initialize_attributes(v_object_id);
+
+ return v_object_id;
+ end new;
+
+ procedure del (
+ object_id in acs_objects.object_id%TYPE
+ )
+ is
+ v_exists_p char;
+ begin
+
+ -- Delete dynamic/generic attributes
+ delete from acs_attribute_values where object_id = acs_object.del.object_id;
+
+ -- Delete directly assigned permissions
+ --
+ -- JCD: We do this as an execute rather than just a direct query since
+ -- the acs_permissions table is not created when this file is
+ -- sourced. We need to clean up the creates and once that is done
+ -- we can turn this into a simple delete statement.
+ --
+ execute immediate 'delete from acs_permissions where object_id = :object_id'
+ using in object_id;
+
+ for object_type
+ in (select table_name, id_column
+ from acs_object_types
+ start with object_type = (select object_type
+ from acs_objects o
+ where o.object_id = acs_object.del.object_id)
+ connect by object_type = prior supertype)
+ loop
+ -- Delete from the table if it exists.
+ select decode(count(*),0,'f','t') into v_exists_p
+ from user_tables
+ where table_name = upper(object_type.table_name);
+
+ if v_exists_p = 't' then
+ execute immediate 'delete from ' || object_type.table_name ||
+ ' where ' || object_type.id_column || ' = :object_id'
+ using in object_id;
+ end if;
+
+ end loop;
+
+ end del;
+
+ function name (
+ object_id in acs_objects.object_id%TYPE
+ )
+ return varchar2
+ is
+ object_name varchar2(500);
+ v_object_id integer := object_id;
+ begin
+ -- Find the name function for this object, which is stored in the
+ -- name_method column of acs_object_types. Starting with this
+ -- object's actual type, traverse the type hierarchy upwards until
+ -- a non-null name_method value is found.
+ --
+ for object_type
+ in (select name_method
+ from acs_object_types
+ start with object_type = (select object_type
+ from acs_objects o
+ where o.object_id = name.object_id)
+ connect by object_type = prior supertype)
+ loop
+ if object_type.name_method is not null then
+
+ -- Execute the first name_method we find (since we're traversing
+ -- up the type hierarchy from the object's exact type) using
+ -- Native Dynamic SQL, to ascertain the name of this object.
+ --
+ --execute immediate 'select ' || object_type.name_method || '(:1) from dual'
+ execute immediate 'begin :1 := ' || object_type.name_method || '(:2); end;'
+ using out object_name, in object_id;
+ --into object_name
+
+ exit;
+ end if;
+ end loop;
+
+ return object_name;
+ end name;
+
+ function default_name (
+ object_id in acs_objects.object_id%TYPE
+ ) return varchar2
+ is
+ object_type_pretty_name acs_object_types.pretty_name%TYPE;
+ begin
+ select ot.pretty_name
+ into object_type_pretty_name
+ from acs_objects o, acs_object_types ot
+ where o.object_id = default_name.object_id
+ and o.object_type = ot.object_type;
+
+ return object_type_pretty_name || ' ' || object_id;
+ end default_name;
+
+ procedure get_attribute_storage (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE,
+ v_column out varchar2,
+ v_table_name out varchar2,
+ v_key_sql out varchar2
+ )
+ is
+ v_object_type acs_attributes.object_type%TYPE;
+ v_static acs_attributes.static_p%TYPE := null;
+ v_attr_id acs_attributes.attribute_id%TYPE := null;
+ v_storage acs_attributes.storage%TYPE := null;
+ v_attr_name acs_attributes.attribute_name%TYPE := null;
+ v_id_column varchar2(200) := null;
+ v_sql varchar2(4000) := null;
+ v_return varchar2(4000) := null;
+
+ -- Fetch the most inherited attribute
+ cursor c_attribute is
+ select
+ a.attribute_id, a.static_p, a.storage, a.table_name, a.attribute_name,
+ a.object_type, a.column_name, t.id_column
+ from
+ acs_attributes a,
+ (select
+ object_type, id_column
+ from
+ acs_object_types
+ connect by
+ object_type = prior supertype
+ start with
+ object_type = (select object_type from acs_objects
+ where object_id = object_id_in)
+ ) t
+ where
+ a.attribute_name = attribute_name_in
+ and
+ a.object_type = t.object_type;
+
+ begin
+
+ -- Determine the attribute parameters
+ open c_attribute;
+ fetch c_attribute into
+ v_attr_id, v_static, v_storage, v_table_name, v_attr_name,
+ v_object_type, v_column, v_id_column;
+ if c_attribute%NOTFOUND then
+ close c_attribute;
+ raise_application_error (-20000,
+ 'No such attribute ' || v_object_type || '::' || attribute_name_in ||
+ ' in acs_object.get_attribute_storage.');
+ end if;
+ close c_attribute;
+
+ -- This should really be done in a trigger on acs_attributes,
+ -- instead of generating it each time in this function
+
+ -- If there is no specific table name for this attribute,
+ -- figure it out based on the object type
+ if v_table_name is null then
+
+ -- Determine the appropriate table name
+ if v_storage = 'generic' then
+ -- Generic attribute: table name/column are hardcoded
+
+ v_column := 'attr_value';
+
+ if v_static = 'f' then
+ v_table_name := 'acs_attribute_values';
+ v_key_sql := '(object_id = ' || object_id_in || ' and ' ||
+ 'attribute_id = ' || v_attr_id || ')';
+ else
+ v_table_name := 'acs_static_attr_values';
+ v_key_sql := '(object_type = ''' || v_object_type || ''' and ' ||
+ 'attribute_id = ' || v_attr_id || ')';
+ end if;
+
+ else
+ -- Specific attribute: table name/column need to be retreived
+
+ if v_static = 'f' then
+ select
+ table_name, id_column
+ into
+ v_table_name, v_id_column
+ from
+ acs_object_types
+ where
+ object_type = v_object_type;
+ else
+ raise_application_error(-20000,
+ 'No table name specified for storage specific static attribute ' ||
+ v_object_type || '::' || attribute_name_in ||
+ ' in acs_object.get_attribute_storage.');
+ end if;
+
+ end if;
+ else
+ -- There is a custom table name for this attribute.
+ -- Get the id column out of the acs_object_tables
+ -- Raise an error if not found
+ select id_column into v_id_column from acs_object_type_tables
+ where object_type = v_object_type
+ and table_name = v_table_name;
+
+ end if;
+
+ if v_column is null then
+
+ if v_storage = 'generic' then
+ v_column := 'attr_value';
+ else
+ v_column := v_attr_name;
+ end if;
+
+ end if;
+
+ if v_key_sql is null then
+ if v_static = 'f' then
+ v_key_sql := v_id_column || ' = ' || object_id_in ;
+ else
+ v_key_sql := v_id_column || ' = ''' || v_object_type || '''';
+ end if;
+ end if;
+
+ exception when no_data_found then
+ if c_attribute%ISOPEN then
+ close c_attribute;
+ end if;
+ raise_application_error(-20000, 'No data found for attribute ' ||
+ v_object_type || '::' || attribute_name_in ||
+ ' in acs_object.get_attribute_storage');
+
+ end get_attribute_storage;
+
+ -- Get/set the value of an object attribute, as long as
+ -- the type can be cast to varchar2
+ function get_attribute (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE
+ ) return varchar2
+ is
+ v_table_name varchar2(200);
+ v_column varchar2(200);
+ v_key_sql varchar2(4000);
+ v_return varchar2(4000);
+ begin
+
+ get_attribute_storage(object_id_in, attribute_name_in,
+ v_column, v_table_name, v_key_sql);
+
+ begin
+ execute immediate 'select '
+ || v_column || ' from ' || v_table_name || ' where ' || v_key_sql
+ into
+ v_return;
+ exception when no_data_found then
+ return null;
+ end;
+
+ return v_return;
+ end get_attribute;
+
+ procedure set_attribute (
+ object_id_in in acs_objects.object_id%TYPE,
+ attribute_name_in in acs_attributes.attribute_name%TYPE,
+ value_in in varchar2
+ )
+ is
+ v_table_name varchar2(200);
+ v_column varchar2(200);
+ v_key_sql varchar2(4000);
+ v_return varchar2(4000);
+ v_dummy integer;
+ begin
+
+ get_attribute_storage(object_id_in, attribute_name_in,
+ v_column, v_table_name, v_key_sql);
+
+ execute immediate 'update '
+ || v_table_name || ' set ' || v_column || ' = :value where ' || v_key_sql
+ using value_in;
+
+ end set_attribute;
+
+ function check_context_index (
+ object_id in acs_objects.object_id%TYPE,
+ ancestor_id in acs_objects.object_id%TYPE,
+ n_generations in integer
+ ) return char
+ is
+ n_rows integer;
+ n_gens integer;
+ begin
+ -- Verify that this row exists in the index.
+ select decode(count(*),0,0,1) into n_rows
+ from acs_object_context_index
+ where object_id = check_context_index.object_id
+ and ancestor_id = check_context_index.ancestor_id;
+
+ if n_rows = 1 then
+ -- Verify that the count is correct.
+ select n_generations into n_gens
+ from acs_object_context_index
+ where object_id = check_context_index.object_id
+ and ancestor_id = check_context_index.ancestor_id;
+
+ if n_gens != n_generations then
+ acs_log.error('acs_object.check_representation', 'Ancestor ' ||
+ ancestor_id || ' of object ' || object_id ||
+ ' reports being generation ' || n_gens ||
+ ' when it is actually generation ' || n_generations ||
+ '.');
+ return 'f';
+ else
+ return 't';
+ end if;
+ else
+ acs_log.error('acs_object.check_representation', 'Ancestor ' ||
+ ancestor_id || ' of object ' || object_id ||
+ ' is missing an entry in acs_object_context_index.');
+ return 'f';
+ end if;
+ end;
+
+ function check_object_ancestors (
+ object_id in acs_objects.object_id%TYPE,
+ ancestor_id in acs_objects.object_id%TYPE,
+ n_generations in integer
+ ) return char
+ is
+ context_id acs_objects.context_id%TYPE;
+ security_inherit_p acs_objects.security_inherit_p%TYPE;
+ n_rows integer;
+ n_gens integer;
+ result char(1);
+ begin
+ -- OBJECT_ID is the object we are verifying
+ -- ANCESTOR_ID is the current ancestor we are tracking
+ -- N_GENERATIONS is how far ancestor_id is from object_id
+
+ -- Note that this function is only supposed to verify that the
+ -- index contains each ancestor for OBJECT_ID. It doesn''t
+ -- guarantee that there aren''t extraneous rows or that
+ -- OBJECT_ID''s children are contained in the index. That is
+ -- verified by seperate functions.
+
+ result := 't';
+
+ -- Grab the context and security_inherit_p flag of the current
+ -- ancestor''s parent.
+ select context_id, security_inherit_p into context_id, security_inherit_p
+ from acs_objects
+ where object_id = check_object_ancestors.ancestor_id;
+
+ if ancestor_id = 0 then
+ if context_id is null then
+ result := 't';
+ else
+ -- This can be a constraint, can''t it?
+ acs_log.error('acs_object.check_representation',
+ 'Object 0 doesn''t have a null context_id');
+ result := 'f';
+ end if;
+ else
+ if context_id is null or security_inherit_p = 'f' then
+ context_id := 0;
+ end if;
+
+ if check_context_index(object_id, ancestor_id, n_generations) = 'f' then
+ result := 'f';
+ end if;
+
+ if check_object_ancestors(object_id, context_id,
+ n_generations + 1) = 'f' then
+ result := 'f';
+ end if;
+ end if;
+
+ return result;
+ end;
+
+ function check_object_descendants (
+ object_id in acs_objects.object_id%TYPE,
+ descendant_id in acs_objects.object_id%TYPE,
+ n_generations in integer
+ ) return char
+ is
+ result char(1);
+ begin
+ -- OBJECT_ID is the object we are verifying.
+ -- DESCENDANT_ID is the current descendant we are tracking.
+ -- N_GENERATIONS is how far the current DESCENDANT_ID is from
+ -- OBJECT_ID.
+
+ -- This function will verfy that each actualy descendant of
+ -- OBJECT_ID has a row in the index table. It does not check that
+ -- there aren't extraneous rows or that the ancestors of OBJECT_ID
+ -- are maintained correctly.
+
+ result := 't';
+
+ -- First verify that OBJECT_ID and DESCENDANT_ID are actually in
+ -- the index.
+ if check_context_index(descendant_id, object_id, n_generations) = 'f' then
+ result := 'f';
+ end if;
+
+ -- For every child that reports inheriting from OBJECT_ID we need to call
+ -- ourselves recursively.
+ for obj in (select *
+ from acs_objects
+ where context_id = descendant_id
+ and security_inherit_p = 't') loop
+ if check_object_descendants(object_id, obj.object_id,
+ n_generations + 1) = 'f' then
+ result := 'f';
+ end if;
+ end loop;
+
+ return result;
+ end;
+
+ function check_path (
+ object_id in acs_objects.object_id%TYPE,
+ ancestor_id in acs_objects.object_id%TYPE
+ ) return char
+ is
+ context_id acs_objects.context_id%TYPE;
+ security_inherit_p acs_objects.security_inherit_p%TYPE;
+ begin
+ if object_id = ancestor_id then
+ return 't';
+ end if;
+
+ select context_id, security_inherit_p into context_id, security_inherit_p
+ from acs_objects
+ where object_id = check_path.object_id;
+
+ if context_id is null or security_inherit_p = 'f' then
+ context_id := 0;
+ end if;
+
+ return check_path(context_id, ancestor_id);
+ end;
+
+ function check_representation (
+ object_id in acs_objects.object_id%TYPE
+ ) return char
+ is
+ result char(1);
+ object_type acs_objects.object_type%TYPE;
+ n_rows integer;
+ begin
+ result := 't';
+ acs_log.notice('acs_object.check_representation',
+ 'Running acs_object.check_representation on object_id = ' ||
+ object_id || '.');
+
+ -- If this fails then there isn''t even an object associated with
+ -- this id. I'm going to let that error propogate as an exception.
+ select object_type into object_type
+ from acs_objects
+ where object_id = check_representation.object_id;
+
+ acs_log.notice('acs_object.check_representation',
+ 'OBJECT STORAGE INTEGRITY TEST');
+
+ -- Let's look through every primary storage table associated with
+ -- this object type and all of its supertypes and make sure there
+ -- is a row with OBJECT_ID as theh primary key.
+ for t in (select t.object_type, t.table_name, t.id_column
+ from acs_object_type_supertype_map m, acs_object_types t
+ where m.ancestor_type = t.object_type
+ and m.object_type = check_representation.object_type
+ union
+ select object_type, table_name, id_column
+ from acs_object_types
+ where object_type = check_representation.object_type) loop
+ execute immediate 'select decode(count(*),0,0,1) from ' || t.table_name ||
+ ' where ' || t.id_column || ' = ' || object_id
+ into n_rows;
+
+ if n_rows = 0 then
+ result := 'f';
+ acs_log.error('acs_object.check_representation',
+ 'Table ' || t.table_name || ' (primary storage for ' ||
+ t.object_type || ') doesn''t have a row for object ' ||
+ object_id || ' of type ' || object_type || '.');
+ end if;
+ end loop;
+
+ acs_log.notice('acs_object.check_representation',
+ 'OBJECT CONTEXT INTEGRITY TEST');
+
+ -- Do a bunch of dirt simple sanity checks.
+
+ -- First let's check that all of our ancestors appear in
+ -- acs_object_context_index with the correct generation listed.
+ if check_object_ancestors(object_id, object_id, 0) = 'f' then
+ result := 'f';
+ end if;
+
+ -- Now let's check that all of our descendants appear in
+ -- acs_object_context_index with the correct generation listed.
+ if check_object_descendants(object_id, object_id, 0) = 'f' then
+ result := 'f';
+ end if;
+
+ -- Ok, we know that the index contains every entry that it is
+ -- supposed to have. Now let's make sure it doesn't contain any
+ -- extraneous entries.
+ for row in (select *
+ from acs_object_context_index
+ where object_id = check_representation.object_id
+ or ancestor_id = check_representation.object_id) loop
+ if check_path(row.object_id, row.ancestor_id) = 'f' then
+ acs_log.error('acs_object.check_representation',
+ 'acs_object_context_index contains an extraneous row: ' ||
+ 'object_id = ' || row.object_id || ', ancestor_id = ' ||
+ row.ancestor_id || ', n_generations = ' ||
+ row.n_generations || '.');
+ result := 'f';
+ end if;
+ end loop;
+
+ acs_log.notice('acs_object.check_representation',
+ 'Done running acs_object.check_representation ' ||
+ 'on object_id = ' || object_id || '.');
+ return result;
+ end check_representation;
+
+ procedure update_last_modified (
+ object_id in acs_objects.object_id%TYPE,
+ modifying_user in acs_objects.modifying_user%TYPE,
+ modifying_ip in acs_objects.modifying_ip%TYPE,
+ last_modified in acs_objects.last_modified%TYPE default sysdate
+ )
+ is
+ v_parent_id acs_objects.context_id%TYPE;
+ begin
+ update acs_objects
+ set acs_objects.last_modified = acs_object.update_last_modified.last_modified, acs_objects.modifying_user = acs_object.update_last_modified.modifying_user, acs_objects.modifying_ip = acs_object.update_last_modified.modifying_ip
+ where acs_objects.object_id in (select ao.object_id
+ from acs_objects ao
+ connect by prior ao.context_id = ao.object_id
+ start with ao.object_id = acs_object.update_last_modified.object_id)
+ and acs_objects.context_id is not null
+ and acs_objects.object_id != 0;
+ end update_last_modified;
+
+end acs_object;
+/
+show errors
+
-- ****** New authentication datamodel
create table auth_authorities (
@@ -202,7 +905,6 @@
is
begin
acs_object.del(delete_authority_id);
-
return 0;
end del;
Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d7-5.0d9.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d7-5.0d9.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d7-5.0d9.sql 24 Sep 2003 17:25:05 -0000 1.2
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d7-5.0d9.sql 26 Jan 2004 15:39:45 -0000 1.3
@@ -37,7 +37,7 @@
default 'f'
) return apm_package_versions.version_id%TYPE;
- procedure delete (
+ procedure del (
version_id in apm_packages.package_id%TYPE
);
@@ -181,23 +181,23 @@
return v_version_id;
end new;
- procedure delete (
+ procedure del (
version_id in apm_packages.package_id%TYPE
)
is
begin
delete from apm_package_owners
- where version_id = apm_package_version.delete.version_id;
+ where version_id = apm_package_version.del.version_id;
delete from apm_package_dependencies
- where version_id = apm_package_version.delete.version_id;
+ where version_id = apm_package_version.del.version_id;
delete from apm_package_versions
- where version_id = apm_package_version.delete.version_id;
+ where version_id = apm_package_version.del.version_id;
- acs_object.delete(apm_package_version.delete.version_id);
+ acs_object.del(apm_package_version.del.version_id);
- end delete;
+ end del;
procedure enable (
version_id in apm_package_versions.version_id%TYPE
@@ -567,6 +567,758 @@
/
show errors
+
+
+
+
+
+
+create or replace package body apm_package_version
+as
+ function new (
+ version_id in apm_package_versions.version_id%TYPE
+ default null,
+ package_key in apm_package_versions.package_key%TYPE,
+ version_name in apm_package_versions.version_name%TYPE
+ default null,
+ version_uri in apm_package_versions.version_uri%TYPE,
+ summary in apm_package_versions.summary%TYPE,
+ description_format in apm_package_versions.description_format%TYPE,
+ description in apm_package_versions.description%TYPE,
+ release_date in apm_package_versions.release_date%TYPE,
+ vendor in apm_package_versions.vendor%TYPE,
+ vendor_uri in apm_package_versions.vendor_uri%TYPE,
+ auto_mount in apm_package_versions.auto_mount%TYPE,
+ installed_p in apm_package_versions.installed_p%TYPE
+ default 'f',
+ data_model_loaded_p in apm_package_versions.data_model_loaded_p%TYPE
+ default 'f'
+ ) return apm_package_versions.version_id%TYPE
+ is
+ v_version_id apm_package_versions.version_id%TYPE;
+ begin
+ if version_id is null then
+ select acs_object_id_seq.nextval
+ into v_version_id
+ from dual;
+ else
+ v_version_id := version_id;
+ end if;
+ v_version_id := acs_object.new(
+ object_id => v_version_id,
+ object_type => 'apm_package_version'
+ );
+ insert into apm_package_versions
+ (version_id, package_key, version_name, version_uri, summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount, installed_p, data_model_loaded_p)
+ values
+ (v_version_id, package_key, version_name, version_uri,
+ summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount,
+ installed_p, data_model_loaded_p);
+ return v_version_id;
+ end new;
+
+ procedure del (
+ version_id in apm_packages.package_id%TYPE
+ )
+ is
+ begin
+ delete from apm_package_owners
+ where version_id = apm_package_version.del.version_id;
+
+ delete from apm_package_dependencies
+ where version_id = apm_package_version.del.version_id;
+
+ delete from apm_package_versions
+ where version_id = apm_package_version.del.version_id;
+
+ acs_object.del(apm_package_version.del.version_id);
+
+ end del;
+
+ procedure enable (
+ version_id in apm_package_versions.version_id%TYPE
+ )
+ is
+ begin
+ update apm_package_versions set enabled_p = 't'
+ where version_id = enable.version_id;
+ end enable;
+
+ procedure disable (
+ version_id in apm_package_versions.version_id%TYPE
+ )
+ is
+ begin
+ update apm_package_versions
+ set enabled_p = 'f'
+ where version_id = disable.version_id;
+ end disable;
+
+ function copy(
+ version_id in apm_package_versions.version_id%TYPE,
+ new_version_id in apm_package_versions.version_id%TYPE default null,
+ new_version_name in apm_package_versions.version_name%TYPE,
+ new_version_uri in apm_package_versions.version_uri%TYPE
+ ) return apm_package_versions.version_id%TYPE
+ is
+ v_version_id integer;
+ begin
+ v_version_id := acs_object.new(
+ object_id => new_version_id,
+ object_type => 'apm_package_version'
+ );
+
+ insert into apm_package_versions(version_id, package_key, version_name,
+ version_uri, summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount)
+ select v_version_id, package_key, copy.new_version_name,
+ copy.new_version_uri, summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount
+ from apm_package_versions
+ where version_id = copy.version_id;
+
+ insert into apm_package_dependencies(dependency_id, version_id, dependency_type, service_uri, service_version)
+ select acs_object_id_seq.nextval, v_version_id, dependency_type, service_uri, service_version
+ from apm_package_dependencies
+ where version_id = copy.version_id;
+
+ insert into apm_package_callbacks (version_id, type, proc)
+ select v_version_id, type, proc
+ from apm_package_callbacks
+ where version_id = copy.version_id;
+
+ insert into apm_package_owners(version_id, owner_uri, owner_name, sort_key)
+ select v_version_id, owner_uri, owner_name, sort_key
+ from apm_package_owners
+ where version_id = copy.version_id;
+
+ return v_version_id;
+ end copy;
+
+ function edit (
+ new_version_id in apm_package_versions.version_id%TYPE
+ default null,
+ version_id in apm_package_versions.version_id%TYPE,
+ version_name in apm_package_versions.version_name%TYPE
+ default null,
+ version_uri in apm_package_versions.version_uri%TYPE,
+ summary in apm_package_versions.summary%TYPE,
+ description_format in apm_package_versions.description_format%TYPE,
+ description in apm_package_versions.description%TYPE,
+ release_date in apm_package_versions.release_date%TYPE,
+ vendor in apm_package_versions.vendor%TYPE,
+ vendor_uri in apm_package_versions.vendor_uri%TYPE,
+ auto_mount in apm_package_versions.auto_mount%TYPE,
+ installed_p in apm_package_versions.installed_p%TYPE
+ default 'f',
+ data_model_loaded_p in apm_package_versions.data_model_loaded_p%TYPE
+ default 'f'
+ ) return apm_package_versions.version_id%TYPE
+ is
+ v_version_id apm_package_versions.version_id%TYPE;
+ version_unchanged_p integer;
+ begin
+ -- Determine if version has changed.
+ select decode(count(*),0,0,1) into version_unchanged_p
+ from apm_package_versions
+ where version_id = edit.version_id
+ and version_name = edit.version_name;
+ if version_unchanged_p <> 1 then
+ v_version_id := copy(
+ version_id => edit.version_id,
+ new_version_id => edit.new_version_id,
+ new_version_name => edit.version_name,
+ new_version_uri => edit.version_uri
+ );
+ else
+ v_version_id := edit.version_id;
+ end if;
+
+ update apm_package_versions
+ set version_uri = edit.version_uri,
+ summary = edit.summary,
+ description_format = edit.description_format,
+ description = edit.description,
+ release_date = trunc(sysdate),
+ vendor = edit.vendor,
+ vendor_uri = edit.vendor_uri,
+ auto_mount = edit.auto_mount,
+ installed_p = edit.installed_p,
+ data_model_loaded_p = edit.data_model_loaded_p
+ where version_id = v_version_id;
+ return v_version_id;
+ end edit;
+
+-- Add an interface provided by this version.
+ function add_interface(
+ interface_id in apm_package_dependencies.dependency_id%TYPE
+ default null,
+ version_id in apm_package_versions.version_id%TYPE,
+ interface_uri in apm_package_dependencies.service_uri%TYPE,
+ interface_version in apm_package_dependencies.service_version%TYPE
+ ) return apm_package_dependencies.dependency_id%TYPE
+ is
+ v_dep_id apm_package_dependencies.dependency_id%TYPE;
+ begin
+ if add_interface.interface_id is null then
+ select acs_object_id_seq.nextval into v_dep_id from dual;
+ else
+ v_dep_id := add_interface.interface_id;
+ end if;
+
+ insert into apm_package_dependencies
+ (dependency_id, version_id, dependency_type, service_uri, service_version)
+ values
+ (v_dep_id, add_interface.version_id, 'provides', add_interface.interface_uri,
+ add_interface.interface_version);
+ return v_dep_id;
+ end add_interface;
+
+ procedure remove_interface(
+ interface_id in apm_package_dependencies.dependency_id%TYPE
+ )
+ is
+ begin
+ delete from apm_package_dependencies
+ where dependency_id = remove_interface.interface_id;
+ end remove_interface;
+
+ procedure remove_interface(
+ interface_uri in apm_package_dependencies.service_uri%TYPE,
+ interface_version in apm_package_dependencies.service_version%TYPE,
+ version_id in apm_package_versions.version_id%TYPE
+ )
+ is
+ v_dep_id apm_package_dependencies.dependency_id%TYPE;
+ begin
+ select dependency_id into v_dep_id from apm_package_dependencies
+ where service_uri = remove_interface.interface_uri
+ and interface_version = remove_interface.interface_version;
+ remove_interface(v_dep_id);
+ end remove_interface;
+
+ -- Add a requirement for this version. A requirement is some interface that this
+ -- version depends on.
+ function add_dependency(
+ dependency_id in apm_package_dependencies.dependency_id%TYPE
+ default null,
+ version_id in apm_package_versions.version_id%TYPE,
+ dependency_uri in apm_package_dependencies.service_uri%TYPE,
+ dependency_version in apm_package_dependencies.service_version%TYPE
+ ) return apm_package_dependencies.dependency_id%TYPE
+ is
+ v_dep_id apm_package_dependencies.dependency_id%TYPE;
+ begin
+ if add_dependency.dependency_id is null then
+ select acs_object_id_seq.nextval into v_dep_id from dual;
+ else
+ v_dep_id := add_dependency.dependency_id;
+ end if;
+
+ insert into apm_package_dependencies
+ (dependency_id, version_id, dependency_type, service_uri, service_version)
+ values
+ (v_dep_id, add_dependency.version_id, 'requires', add_dependency.dependency_uri,
+ add_dependency.dependency_version);
+ return v_dep_id;
+ end add_dependency;
+
+ procedure remove_dependency(
+ dependency_id in apm_package_dependencies.dependency_id%TYPE
+ )
+ is
+ begin
+ delete from apm_package_dependencies
+ where dependency_id = remove_dependency.dependency_id;
+ end remove_dependency;
+
+
+ procedure remove_dependency(
+ dependency_uri in apm_package_dependencies.service_uri%TYPE,
+ dependency_version in apm_package_dependencies.service_version%TYPE,
+ version_id in apm_package_versions.version_id%TYPE
+ )
+ is
+ v_dep_id apm_package_dependencies.dependency_id%TYPE;
+ begin
+ select dependency_id into v_dep_id from apm_package_dependencies
+ where service_uri = remove_dependency.dependency_uri
+ and service_version = remove_dependency.dependency_version;
+ remove_dependency(v_dep_id);
+ end remove_dependency;
+
+ function sortable_version_name (
+ version_name in apm_package_versions.version_name%TYPE
+ ) return varchar2
+ is
+ a_fields integer;
+ a_start integer;
+ a_end integer;
+ a_order varchar2(1000);
+ a_char char(1);
+ a_seen_letter char(1) := 'f';
+ begin
+ a_fields := 0;
+ a_start := 1;
+ loop
+ a_end := a_start;
+
+ -- keep incrementing a_end until we run into a non-number
+ while substr(version_name, a_end, 1) >= '0' and substr(version_name, a_end, 1) <= '9' loop
+ a_end := a_end + 1;
+ end loop;
+ if a_end = a_start then
+ return -1;
+ -- raise_application_error(-20000, 'Expected number at position ' || a_start);
+ end if;
+ if a_end - a_start > 4 then
+ return -1;
+ -- raise_application_error(-20000, 'Numbers within versions can only be up to 4 digits long');
+ end if;
+
+ -- zero-pad and append the number
+ a_order := a_order || substr('0000', 1, 4 - (a_end - a_start)) ||
+ substr(version_name, a_start, a_end - a_start) || '.';
+ a_fields := a_fields + 1;
+ if a_end > length(version_name) then
+ -- end of string - we're outta here
+ if a_seen_letter = 'f' then
+ -- append the "final" suffix if there haven't been any letters
+ -- so far (i.e., not development/alpha/beta)
+ a_order := a_order || lpad(' ',(7 - a_fields)*5,'0000.') || ' 3F.';
+ end if;
+ return a_order;
+ end if;
+
+ -- what's the next character? if a period, just skip it
+ a_char := substr(version_name, a_end, 1);
+ if a_char = '.' then
+ null;
+ else
+ -- if the next character was a letter, append the appropriate characters
+ if a_char = 'd' then
+ a_order := a_order || lpad(' ',(7 - a_fields)*5,'0000.') || ' 0D.';
+ elsif a_char = 'a' then
+ a_order := a_order || lpad(' ',(7 - a_fields)*5,'0000.') || ' 1A.';
+ elsif a_char = 'b' then
+ a_order := a_order || lpad(' ',(7 - a_fields)*5,'0000.') || ' 2B.';
+ end if;
+
+ -- can't have something like 3.3a1b2 - just one letter allowed!
+ if a_seen_letter = 't' then
+ return -1;
+ -- raise_application_error(-20000, 'Not allowed to have two letters in version name '''
+ -- || version_name || '''');
+ end if;
+ a_seen_letter := 't';
+
+ -- end of string - we're done!
+ if a_end = length(version_name) then
+ return a_order;
+ end if;
+ end if;
+ a_start := a_end + 1;
+ end loop;
+ end sortable_version_name;
+
+ function version_name_greater(
+ version_name_one in apm_package_versions.version_name%TYPE,
+ version_name_two in apm_package_versions.version_name%TYPE
+ ) return integer is
+ a_order_a varchar2(1000);
+ a_order_b varchar2(1000);
+ begin
+ a_order_a := sortable_version_name(version_name_one);
+ a_order_b := sortable_version_name(version_name_two);
+ if a_order_a < a_order_b then
+ return -1;
+ elsif a_order_a > a_order_b then
+ return 1;
+ end if;
+ return 0;
+ end version_name_greater;
+
+ function upgrade_p(
+ path in varchar2,
+ initial_version_name in apm_package_versions.version_name%TYPE,
+ final_version_name in apm_package_versions.version_name%TYPE
+ ) return integer
+ is
+ v_pos1 integer;
+ v_pos2 integer;
+ v_path varchar2(1500);
+ v_version_from apm_package_versions.version_name%TYPE;
+ v_version_to apm_package_versions.version_name%TYPE;
+ begin
+
+ -- Set v_path to the tail of the path (the file name).
+ v_path := substr(upgrade_p.path, instr(upgrade_p.path, '/', -1) + 1);
+
+ -- Remove the extension, if it's .sql.
+ v_pos1 := instr(v_path, '.', -1);
+ if v_pos1 > 0 and substr(v_path, v_pos1) = '.sql' then
+ v_path := substr(v_path, 1, v_pos1 - 1);
+ end if;
+
+ -- Figure out the from/to version numbers for the individual file.
+ v_pos1 := instr(v_path, '-', -1, 2);
+ v_pos2 := instr(v_path, '-', -1);
+ if v_pos1 = 0 or v_pos2 = 0 then
+ -- There aren't two hyphens in the file name. Bail.
+ return 0;
+ end if;
+
+ v_version_from := substr(v_path, v_pos1 + 1, v_pos2 - v_pos1 - 1);
+ v_version_to := substr(v_path, v_pos2 + 1);
+
+ if version_name_greater(upgrade_p.initial_version_name, v_version_from) <= 0 and
+ version_name_greater(upgrade_p.final_version_name, v_version_to) >= 0 then
+ return 1;
+ end if;
+
+ return 0;
+ exception when others then
+ -- Invalid version number.
+ return 0;
+ end upgrade_p;
+
+ procedure upgrade(
+ version_id in apm_package_versions.version_id%TYPE
+ )
+ is
+ begin
+ update apm_package_versions
+ set enabled_p = 'f',
+ installed_p = 'f'
+ where package_key = (select package_key from apm_package_versions
+ where version_id = upgrade.version_id);
+ update apm_package_versions
+ set enabled_p = 't',
+ installed_p = 't'
+ where version_id = upgrade.version_id;
+
+ end upgrade;
+
+end apm_package_version;
+/
+show errors
+
+create or replace package body apm_package_type
+as
+ procedure create_type(
+ package_key in apm_package_types.package_key%TYPE,
+ pretty_name in acs_object_types.pretty_name%TYPE,
+ pretty_plural in acs_object_types.pretty_plural%TYPE,
+ package_uri in apm_package_types.package_uri%TYPE,
+ package_type in apm_package_types.package_type%TYPE,
+ initial_install_p in apm_package_types.initial_install_p%TYPE,
+ singleton_p in apm_package_types.singleton_p%TYPE,
+ spec_file_path in apm_package_types.spec_file_path%TYPE default null,
+ spec_file_mtime in apm_package_types.spec_file_mtime%TYPE default null
+ )
+ is
+ begin
+ insert into apm_package_types
+ (package_key, pretty_name, pretty_plural, package_uri, package_type,
+ spec_file_path, spec_file_mtime, initial_install_p, singleton_p)
+ values
+ (create_type.package_key, create_type.pretty_name, create_type.pretty_plural,
+ create_type.package_uri, create_type.package_type, create_type.spec_file_path,
+ create_type.spec_file_mtime, create_type.initial_install_p, create_type.singleton_p);
+ end create_type;
+
+ function update_type(
+ package_key in apm_package_types.package_key%TYPE,
+ pretty_name in acs_object_types.pretty_name%TYPE
+ default null,
+ pretty_plural in acs_object_types.pretty_plural%TYPE
+ default null,
+ package_uri in apm_package_types.package_uri%TYPE
+ default null,
+ package_type in apm_package_types.package_type%TYPE
+ default null,
+ initial_install_p in apm_package_types.initial_install_p%TYPE
+ default null,
+ singleton_p in apm_package_types.singleton_p%TYPE
+ default null,
+ spec_file_path in apm_package_types.spec_file_path%TYPE
+ default null,
+ spec_file_mtime in apm_package_types.spec_file_mtime%TYPE
+ default null
+ ) return apm_package_types.package_type%TYPE
+ is
+ begin
+ UPDATE apm_package_types SET
+ pretty_name = nvl(update_type.pretty_name, pretty_name),
+ pretty_plural = nvl(update_type.pretty_plural, pretty_plural),
+ package_uri = nvl(update_type.package_uri, package_uri),
+ package_type = nvl(update_type.package_type, package_type),
+ spec_file_path = nvl(update_type.spec_file_path, spec_file_path),
+ spec_file_mtime = nvl(update_type.spec_file_mtime, spec_file_mtime),
+ initial_install_p = nvl(update_type.initial_install_p, initial_install_p),
+ singleton_p = nvl(update_type.singleton_p, singleton_p)
+ where package_key = update_type.package_key;
+ return update_type.package_key;
+ end update_type;
+
+ procedure drop_type (
+ package_key in apm_package_types.package_key%TYPE,
+ cascade_p in char default 'f'
+ )
+ is
+ cursor all_package_ids is
+ select package_id
+ from apm_packages
+ where package_key = drop_type.package_key;
+
+ cursor all_parameters is
+ select parameter_id from apm_parameters
+ where package_key = drop_type.package_key;
+
+ cursor all_versions is
+ select version_id from apm_package_versions
+ where package_key = drop_type.package_key;
+ begin
+ if cascade_p = 't' then
+ for cur_val in all_package_ids
+ loop
+ apm_package.del(
+ package_id => cur_val.package_id
+ );
+ end loop;
+ -- Unregister all parameters.
+ for cur_val in all_parameters
+ loop
+ apm.unregister_parameter(parameter_id => cur_val.parameter_id);
+ end loop;
+
+ -- Unregister all versions
+ for cur_val in all_versions
+ loop
+ apm_package_version.del(version_id => cur_val.version_id);
+ end loop;
+ end if;
+ delete from apm_package_types
+ where package_key = drop_type.package_key;
+ end drop_type;
+
+ function num_parameters (
+ package_key in apm_package_types.package_key%TYPE
+ ) return integer
+ is
+ v_count integer;
+ begin
+ select count(*) into v_count
+ from apm_parameters
+ where package_key = num_parameters.package_key;
+ return v_count;
+ end num_parameters;
+
+end apm_package_type;
+
+
+/
+show errors
+
+create or replace package apm_parameter_value
+as
+ function new (
+ value_id in apm_parameter_values.value_id%TYPE default null,
+ package_id in apm_packages.package_id%TYPE,
+ parameter_id in apm_parameter_values.parameter_id%TYPE,
+ attr_value in apm_parameter_values.attr_value%TYPE
+ ) return apm_parameter_values.value_id%TYPE;
+
+ procedure del (
+ value_id in apm_parameter_values.value_id%TYPE default null
+ );
+ end apm_parameter_value;
+/
+show errors
+
+create or replace package apm_application
+as
+
+function new (
+ application_id in acs_objects.object_id%TYPE default null,
+ instance_name in apm_packages.instance_name%TYPE
+ default null,
+ package_key in apm_package_types.package_key%TYPE,
+ object_type in acs_objects.object_type%TYPE
+ default 'apm_application',
+ creation_date in acs_objects.creation_date%TYPE default sysdate,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return acs_objects.object_id%TYPE;
+
+ procedure del (
+ application_id in acs_objects.object_id%TYPE
+ );
+
+end;
+/
+
+create or replace package body apm_parameter_value
+as
+ function new (
+ value_id in apm_parameter_values.value_id%TYPE default null,
+ package_id in apm_packages.package_id%TYPE,
+ parameter_id in apm_parameter_values.parameter_id%TYPE,
+ attr_value in apm_parameter_values.attr_value%TYPE
+ ) return apm_parameter_values.value_id%TYPE
+ is
+ v_value_id apm_parameter_values.value_id%TYPE;
+ begin
+ v_value_id := acs_object.new(
+ object_id => value_id,
+ object_type => 'apm_parameter_value'
+ );
+ insert into apm_parameter_values
+ (value_id, package_id, parameter_id, attr_value)
+ values
+ (v_value_id, apm_parameter_value.new.package_id,
+ apm_parameter_value.new.parameter_id,
+ apm_parameter_value.new.attr_value);
+ return v_value_id;
+ end new;
+
+ procedure del (
+ value_id in apm_parameter_values.value_id%TYPE default null
+ )
+ is
+ begin
+ delete from apm_parameter_values
+ where value_id = apm_parameter_value.del.value_id;
+ acs_object.del(value_id);
+ end del;
+
+ end apm_parameter_value;
+/
+show errors;
+
+create or replace package body apm_application
+as
+
+ function new (
+ application_id in acs_objects.object_id%TYPE default null,
+ instance_name in apm_packages.instance_name%TYPE
+ default null,
+ package_key in apm_package_types.package_key%TYPE,
+ object_type in acs_objects.object_type%TYPE
+ default 'apm_application',
+ creation_date in acs_objects.creation_date%TYPE default sysdate,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return acs_objects.object_id%TYPE
+ is
+ v_application_id integer;
+ begin
+ v_application_id := apm_package.new (
+ package_id => application_id,
+ instance_name => instance_name,
+ package_key => package_key,
+ object_type => object_type,
+ creation_date => creation_date,
+ creation_user => creation_user,
+ creation_ip => creation_ip,
+ context_id => context_id
+ );
+ return v_application_id;
+ end new;
+
+ procedure del (
+ application_id in acs_objects.object_id%TYPE
+ )
+ is
+ begin
+ delete from apm_applications
+ where application_id = apm_application.del.application_id;
+ apm_package.del(
+ package_id => application_id);
+ end del;
+
+end;
+/
+show errors
+
+
+create or replace package apm_service
+as
+
+ function new (
+ service_id in acs_objects.object_id%TYPE default null,
+ instance_name in apm_packages.instance_name%TYPE
+ default null,
+ package_key in apm_package_types.package_key%TYPE,
+ object_type in acs_objects.object_type%TYPE default 'apm_service',
+ creation_date in acs_objects.creation_date%TYPE default sysdate,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return acs_objects.object_id%TYPE;
+
+ procedure del (
+ service_id in acs_objects.object_id%TYPE
+ );
+
+end;
+/
+show errors
+
+
+create or replace package body apm_service
+as
+
+ function new (
+ service_id in acs_objects.object_id%TYPE default null,
+ instance_name in apm_packages.instance_name%TYPE
+ default null,
+ package_key in apm_package_types.package_key%TYPE,
+ object_type in acs_objects.object_type%TYPE default 'apm_service',
+ creation_date in acs_objects.creation_date%TYPE default sysdate,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return acs_objects.object_id%TYPE
+ is
+ v_service_id integer;
+ begin
+ v_service_id := apm_package.new (
+ package_id => service_id,
+ instance_name => instance_name,
+ package_key => package_key,
+ object_type => object_type,
+ creation_date => creation_date,
+ creation_user => creation_user,
+ creation_ip => creation_ip,
+ context_id => context_id
+ );
+ return v_service_id;
+ end new;
+
+ procedure del (
+ service_id in acs_objects.object_id%TYPE
+ )
+ is
+ begin
+ delete from apm_services
+ where service_id = apm_service.del.service_id;
+ apm_package.del(
+ package_id => service_id
+ );
+ end del;
+
+end;
+/
+show errors
+
+
+
+
create or replace package apm_package
as
@@ -588,7 +1340,7 @@
default null
) return apm_packages.package_id%TYPE;
- procedure delete (
+ procedure del (
package_id in apm_packages.package_id%TYPE
);
@@ -620,6 +1372,216 @@
/
show errors
+
+create or replace package site_node
+as
+
+ -- Create a new site node. If you set directory_p to be 'f' then you
+ -- cannot create nodes that have this node as their parent.
+
+ function new (
+ node_id in site_nodes.node_id%TYPE default null,
+ parent_id in site_nodes.node_id%TYPE default null,
+ name in site_nodes.name%TYPE,
+ object_id in site_nodes.object_id%TYPE default null,
+ directory_p in site_nodes.directory_p%TYPE,
+ pattern_p in site_nodes.pattern_p%TYPE default 'f',
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return site_nodes.node_id%TYPE;
+
+ -- Delete a site node.
+
+ procedure del (
+ node_id in site_nodes.node_id%TYPE
+ );
+
+ -- Return the node_id of a url. If the url begins with '/' then the
+ -- parent_id must be null. This will raise the no_data_found
+ -- exception if there is no mathing node in the site_nodes table.
+ -- This will match directories even if no trailing slash is included
+ -- in the url.
+
+ function node_id (
+ url in varchar2,
+ parent_id in site_nodes.node_id%TYPE default null
+ ) return site_nodes.node_id%TYPE;
+
+ -- Return the url of a node_id.
+
+ function url (
+ node_id in site_nodes.node_id%TYPE
+ ) return varchar2;
+
+end;
+/
+show errors
+
+create or replace package body site_node
+as
+
+ function new (
+ node_id in site_nodes.node_id%TYPE default null,
+ parent_id in site_nodes.node_id%TYPE default null,
+ name in site_nodes.name%TYPE,
+ object_id in site_nodes.object_id%TYPE default null,
+ directory_p in site_nodes.directory_p%TYPE,
+ pattern_p in site_nodes.pattern_p%TYPE default 'f',
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return site_nodes.node_id%TYPE
+ is
+ v_node_id site_nodes.node_id%TYPE;
+ v_directory_p site_nodes.directory_p%TYPE;
+ begin
+ if parent_id is not null then
+ select directory_p into v_directory_p
+ from site_nodes
+ where node_id = new.parent_id;
+
+ if v_directory_p = 'f' then
+ raise_application_error (
+ -20000,
+ 'Node ' || parent_id || ' is not a directory'
+ );
+ end if;
+ end if;
+
+ v_node_id := acs_object.new (
+ object_id => node_id,
+ object_type => 'site_node',
+ creation_user => creation_user,
+ creation_ip => creation_ip
+ );
+
+ insert into site_nodes
+ (node_id, parent_id, name, object_id, directory_p, pattern_p)
+ values
+ (v_node_id, new.parent_id, new.name, new.object_id,
+ new.directory_p, new.pattern_p);
+
+ return v_node_id;
+ end;
+
+ procedure del (
+ node_id in site_nodes.node_id%TYPE
+ )
+ is
+ begin
+ delete from site_nodes
+ where node_id = site_node.del.node_id;
+
+ acs_object.del(node_id);
+ end;
+
+ function find_pattern (
+ node_id in site_nodes.node_id%TYPE
+ ) return site_nodes.node_id%TYPE
+ is
+ v_pattern_p site_nodes.pattern_p%TYPE;
+ v_parent_id site_nodes.node_id%TYPE;
+ begin
+ if node_id is null then
+ raise no_data_found;
+ end if;
+
+ select pattern_p, parent_id into v_pattern_p, v_parent_id
+ from site_nodes
+ where node_id = find_pattern.node_id;
+
+ if v_pattern_p = 't' then
+ return node_id;
+ else
+ return find_pattern(v_parent_id);
+ end if;
+ end;
+
+ function node_id (
+ url in varchar2,
+ parent_id in site_nodes.node_id%TYPE default null
+ ) return site_nodes.node_id%TYPE
+ is
+ v_pos integer;
+ v_first site_nodes.name%TYPE;
+ v_rest varchar2(4000);
+ v_node_id integer;
+ v_pattern_p site_nodes.pattern_p%TYPE;
+ v_url varchar2(4000);
+ v_directory_p site_nodes.directory_p%TYPE;
+ v_trailing_slash_p char(1);
+ begin
+ v_url := url;
+
+ if substr(v_url, length(v_url), 1) = '/' then
+ -- It ends with a / so it must be a directory.
+ v_trailing_slash_p := 't';
+ v_url := substr(v_url, 1, length(v_url) - 1);
+ end if;
+
+ v_pos := 1;
+
+ while v_pos <= length(v_url) and substr(v_url, v_pos, 1) != '/' loop
+ v_pos := v_pos + 1;
+ end loop;
+
+ if v_pos = length(v_url) then
+ v_first := v_url;
+ v_rest := null;
+ else
+ v_first := substr(v_url, 1, v_pos - 1);
+ v_rest := substr(v_url, v_pos + 1);
+ end if;
+
+ begin
+ -- Is there a better way to do these freaking null compares?
+ select node_id, directory_p into v_node_id, v_directory_p
+ from site_nodes
+ where nvl(parent_id, 3.14) = nvl(site_node.node_id.parent_id, 3.14)
+ and nvl(name, chr(10)) = nvl(v_first, chr(10));
+ exception
+ when no_data_found then
+ return find_pattern(parent_id);
+ end;
+
+ if v_rest is null then
+ if v_trailing_slash_p = 't' and v_directory_p = 'f' then
+ return find_pattern(parent_id);
+ else
+ return v_node_id;
+ end if;
+ else
+ return node_id(v_rest, v_node_id);
+ end if;
+ end;
+
+ function url (
+ node_id in site_nodes.node_id%TYPE
+ ) return varchar2
+ is
+ v_parent_id site_nodes.node_id%TYPE;
+ v_name site_nodes.name%TYPE;
+ v_directory_p site_nodes.directory_p%TYPE;
+ begin
+ if node_id is null then
+ return '';
+ end if;
+
+ select parent_id, name, directory_p into
+ v_parent_id, v_name, v_directory_p
+ from site_nodes
+ where node_id = url.node_id;
+
+ if v_directory_p = 't' then
+ return url(v_parent_id) || v_name || '/';
+ else
+ return url(v_parent_id) || v_name;
+ end if;
+ end;
+
+end;
+/
+
+
create or replace package body apm_package
as
procedure initialize_parameters (
@@ -725,33 +1687,33 @@
end if;
end new;
- procedure delete (
+ procedure del (
package_id in apm_packages.package_id%TYPE
)
is
cursor all_values is
select value_id from apm_parameter_values
- where package_id = apm_package.delete.package_id;
+ where package_id = apm_package.del.package_id;
cursor all_site_nodes is
select node_id from site_nodes
- where object_id = apm_package.delete.package_id;
+ where object_id = apm_package.del.package_id;
begin
-- Delete all parameters.
for cur_val in all_values loop
- apm_parameter_value.delete(value_id => cur_val.value_id);
+ apm_parameter_value.del(value_id => cur_val.value_id);
end loop;
- delete from apm_applications where application_id = apm_package.delete.package_id;
- delete from apm_services where service_id = apm_package.delete.package_id;
- delete from apm_packages where package_id = apm_package.delete.package_id;
+ delete from apm_applications where application_id = apm_package.del.package_id;
+ delete from apm_services where service_id = apm_package.del.package_id;
+ delete from apm_packages where package_id = apm_package.del.package_id;
-- Delete the site nodes for the objects.
for cur_val in all_site_nodes loop
- site_node.delete(cur_val.node_id);
+ site_node.del(cur_val.node_id);
end loop;
-- Delete the object.
- acs_object.delete (
+ acs_object.del (
object_id => package_id
);
- end delete;
+ end del;
function initial_install_p (
package_key in apm_packages.package_key%TYPE
@@ -860,3 +1822,5 @@
end apm_package;
/
show errors
+
+
Index: openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d9-5.0d13.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d9-5.0d13.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d9-5.0d13.sql 22 Oct 2003 13:51:51 -0000 1.2
+++ openacs-4/packages/acs-kernel/sql/oracle/upgrade/upgrade-5.0d9-5.0d13.sql 26 Jan 2004 15:39:45 -0000 1.3
@@ -3175,19 +3175,40 @@
/
show errors
---
--- packages/acs-kernel/sql/groups-body-create.sql
---
--- @author rhs@mit.edu
--- @creation-date 2000-08-22
--- @cvs-id $Id$
---
---------------------
--- PACKAGE BODIES --
---------------------
+create or replace package composition_rel
+as
+
+ function new (
+ rel_id in composition_rels.rel_id%TYPE default null,
+ rel_type in acs_rels.rel_type%TYPE default 'composition_rel',
+ object_id_one in acs_rels.object_id_one%TYPE,
+ object_id_two in acs_rels.object_id_two%TYPE,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return composition_rels.rel_id%TYPE;
+
+ procedure del (
+ rel_id in composition_rels.rel_id%TYPE
+ );
+
+ function check_path_exists_p (
+ component_id in groups.group_id%TYPE,
+ container_id in groups.group_id%TYPE
+ ) return char;
+
+ function check_representation (
+ rel_id in composition_rels.rel_id%TYPE
+ ) return char;
+
+end composition_rel;
+/
+show errors
+
+
+
create or replace package body composition_rel
as
@@ -3367,7 +3388,53 @@
+create or replace package membership_rel
+as
+ function new (
+ rel_id in membership_rels.rel_id%TYPE default null,
+ rel_type in acs_rels.rel_type%TYPE default 'membership_rel',
+ object_id_one in acs_rels.object_id_one%TYPE,
+ object_id_two in acs_rels.object_id_two%TYPE,
+ member_state in membership_rels.member_state%TYPE default 'approved',
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return membership_rels.rel_id%TYPE;
+
+ procedure ban (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ procedure approve (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ procedure reject (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ procedure unapprove (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ procedure deleted (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ procedure del (
+ rel_id in membership_rels.rel_id%TYPE
+ );
+
+ function check_representation (
+ rel_id in membership_rels.rel_id%TYPE
+ ) return char;
+
+end membership_rel;
+/
+show errors
+
+
+
create or replace package body membership_rel
as
@@ -3543,6 +3610,28 @@
+create or replace package admin_rel
+as
+
+ function new (
+ rel_id in admin_rels.rel_id%TYPE default null,
+ rel_type in acs_rels.rel_type%TYPE default 'admin_rel',
+ object_id_one in acs_rels.object_id_one%TYPE,
+ object_id_two in acs_rels.object_id_two%TYPE,
+ member_state in membership_rels.member_state%TYPE default 'approved',
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return admin_rels.rel_id%TYPE;
+
+ procedure del (
+ rel_id in admin_rels.rel_id%TYPE
+ );
+
+end admin_rel;
+/
+show errors
+
+
create or replace package body admin_rel
as
@@ -3590,6 +3679,46 @@
+create or replace package acs_group
+is
+ function new (
+ group_id in groups.group_id%TYPE default null,
+ object_type in acs_objects.object_type%TYPE
+ default 'group',
+ creation_date in acs_objects.creation_date%TYPE
+ default sysdate,
+ creation_user in acs_objects.creation_user%TYPE
+ default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ email in parties.email%TYPE default null,
+ url in parties.url%TYPE default null,
+ group_name in groups.group_name%TYPE,
+ join_policy in groups.join_policy%TYPE default null,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return groups.group_id%TYPE;
+
+ procedure del (
+ group_id in groups.group_id%TYPE
+ );
+
+ function name (
+ group_id in groups.group_id%TYPE
+ ) return varchar2;
+
+ function member_p (
+ party_id in parties.party_id%TYPE,
+ group_id in groups.group_id%TYPE,
+ cascade_membership char
+ ) return char;
+
+ function check_representation (
+ group_id in groups.group_id%TYPE
+ ) return char;
+
+end acs_group;
+/
+show errors
+
create or replace package body acs_group
is
function new (
@@ -3772,156 +3901,10 @@
/
show errors
---
--- packages/acs-kernel/sql/groups-create.sql
---
--- @author rhs@mit.edu
--- @creation-date 2000-08-22
--- @cvs-id $Id$
---
---------------
--- PACKAGES --
---------------
-create or replace package composition_rel
-as
- function new (
- rel_id in composition_rels.rel_id%TYPE default null,
- rel_type in acs_rels.rel_type%TYPE default 'composition_rel',
- object_id_one in acs_rels.object_id_one%TYPE,
- object_id_two in acs_rels.object_id_two%TYPE,
- creation_user in acs_objects.creation_user%TYPE default null,
- creation_ip in acs_objects.creation_ip%TYPE default null
- ) return composition_rels.rel_id%TYPE;
- procedure del (
- rel_id in composition_rels.rel_id%TYPE
- );
-
- function check_path_exists_p (
- component_id in groups.group_id%TYPE,
- container_id in groups.group_id%TYPE
- ) return char;
-
- function check_representation (
- rel_id in composition_rels.rel_id%TYPE
- ) return char;
-
-end composition_rel;
-/
-show errors
-
-
-create or replace package membership_rel
-as
-
- function new (
- rel_id in membership_rels.rel_id%TYPE default null,
- rel_type in acs_rels.rel_type%TYPE default 'membership_rel',
- object_id_one in acs_rels.object_id_one%TYPE,
- object_id_two in acs_rels.object_id_two%TYPE,
- member_state in membership_rels.member_state%TYPE default 'approved',
- creation_user in acs_objects.creation_user%TYPE default null,
- creation_ip in acs_objects.creation_ip%TYPE default null
- ) return membership_rels.rel_id%TYPE;
-
- procedure ban (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- procedure approve (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- procedure reject (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- procedure unapprove (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- procedure deleted (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- procedure del (
- rel_id in membership_rels.rel_id%TYPE
- );
-
- function check_representation (
- rel_id in membership_rels.rel_id%TYPE
- ) return char;
-
-end membership_rel;
-/
-show errors
-
-
-create or replace package admin_rel
-as
-
- function new (
- rel_id in admin_rels.rel_id%TYPE default null,
- rel_type in acs_rels.rel_type%TYPE default 'admin_rel',
- object_id_one in acs_rels.object_id_one%TYPE,
- object_id_two in acs_rels.object_id_two%TYPE,
- member_state in membership_rels.member_state%TYPE default 'approved',
- creation_user in acs_objects.creation_user%TYPE default null,
- creation_ip in acs_objects.creation_ip%TYPE default null
- ) return admin_rels.rel_id%TYPE;
-
- procedure del (
- rel_id in admin_rels.rel_id%TYPE
- );
-
-end admin_rel;
-/
-show errors
-
-
-create or replace package acs_group
-is
- function new (
- group_id in groups.group_id%TYPE default null,
- object_type in acs_objects.object_type%TYPE
- default 'group',
- creation_date in acs_objects.creation_date%TYPE
- default sysdate,
- creation_user in acs_objects.creation_user%TYPE
- default null,
- creation_ip in acs_objects.creation_ip%TYPE default null,
- email in parties.email%TYPE default null,
- url in parties.url%TYPE default null,
- group_name in groups.group_name%TYPE,
- join_policy in groups.join_policy%TYPE default null,
- context_id in acs_objects.context_id%TYPE default null
- ) return groups.group_id%TYPE;
-
- procedure del (
- group_id in groups.group_id%TYPE
- );
-
- function name (
- group_id in groups.group_id%TYPE
- ) return varchar2;
-
- function member_p (
- party_id in parties.party_id%TYPE,
- group_id in groups.group_id%TYPE,
- cascade_membership char
- ) return char;
-
- function check_representation (
- group_id in groups.group_id%TYPE
- ) return char;
-
-end acs_group;
-/
-show errors
-
-- Data model to keep a journal of all actions on objects.
--
--
@@ -4022,21 +4005,80 @@
/
show errors;
---
--- /packages/acs-kernel/sql/rel-constraints-create.sql
---
--- Add support for relational constraints based on relational segmentation.
---
--- @author Oumi Mehrotra (oumi@arsdigita.com)
--- @creation-date 2000-11-22
--- @cvs-id $Id$
--- Copyright (C) 1999-2000 ArsDigita Corporation
--- This is free software distributed under the terms of the GNU Public
--- License. Full text of the license is available from the GNU Project:
--- http://www.fsf.org/copyleft/gpl.html
+create or replace package rel_constraint
+as
+ function new (
+ --/** Creates a new relational constraint
+ --
+ -- @author Oumi Mehrotra (oumi@arsdigita.com)
+ -- @creation-date 12/2000
+ --
+ --*/
+ constraint_id in rel_constraints.constraint_id%TYPE default null,
+ constraint_type in acs_objects.object_type%TYPE default 'rel_constraint',
+ constraint_name in rel_constraints.constraint_name%TYPE,
+ rel_segment in rel_constraints.rel_segment%TYPE,
+ rel_side in rel_constraints.rel_side%TYPE default 'two',
+ required_rel_segment in rel_constraints.required_rel_segment%TYPE,
+ context_id in acs_objects.context_id%TYPE default null,
+ creation_user in acs_objects.creation_user%TYPE default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null
+ ) return rel_constraints.constraint_id%TYPE;
+
+ procedure del (
+ constraint_id in rel_constraints.constraint_id%TYPE
+ );
+
+ function get_constraint_id (
+ --/** Returns the constraint_id associated with the specified
+ -- rel_segment and required_rel_segment for the specified site.
+ --
+ -- @author Oumi Mehrotra (oumi@arsdigita.com)
+ -- @creation-date 12/2000
+ --
+ --*/
+ rel_segment in rel_constraints.rel_segment%TYPE,
+ rel_side in rel_constraints.rel_side%TYPE default 'two',
+ required_rel_segment in rel_constraints.required_rel_segment%TYPE
+ ) return rel_constraints.constraint_id%TYPE;
+
+ function violation (
+ --/** Checks to see if there a relational constraint is violated
+ -- by the precense of the specified relation. If not, returns
+ -- null. If so, returns an appropriate error string.
+ --
+ -- @author Oumi Mehrotra (oumi@arsdigita.com)
+ -- @creation-date 12/2000
+ --
+ -- @param rel_id The relation for which we want to find
+ -- any violations
+ --*/
+ rel_id in acs_rels.rel_id%TYPE
+ ) return varchar;
+
+
+ function violation_if_removed (
+ --/** Checks to see if removing the specified relation would violate
+ -- a relational constraint. If not, returns null. If so, returns
+ -- an appropriate error string.
+ --
+ -- @author Michael Bryzek (mbryzek@arsdigita.com)
+ -- @creation-date 1/2001
+ --
+ -- @param rel_id The relation that we are planning to remove
+ --*/
+ rel_id in acs_rels.rel_id%TYPE
+ ) return varchar;
+
+end;
+/
+show errors
+
+
+
create or replace package body rel_constraint
as
@@ -4178,108 +4220,89 @@
/
show errors
---
--- /packages/acs-kernel/sql/rel-constraints-create.sql
---
--- Add support for relational constraints based on relational segmentation.
---
--- @author Oumi Mehrotra (oumi@arsdigita.com)
--- @creation-date 2000-11-22
--- @cvs-id $Id$
--- Copyright (C) 1999-2000 ArsDigita Corporation
--- This is free software distributed under the terms of the GNU Public
--- License. Full text of the license is available from the GNU Project:
--- http://www.fsf.org/copyleft/gpl.html
---------------
--- PACKAGES --
---------------
+create or replace package rel_segment
+is
+ function new (
+ --/** Creates a new relational segment
+ --
+ -- @author Oumi Mehrotra (oumi@arsdigita.com)
+ -- @creation-date 12/2000
+ --
+ --*/
+ segment_id in rel_segments.segment_id%TYPE default null,
+ object_type in acs_objects.object_type%TYPE
+ default 'rel_segment',
+ creation_date in acs_objects.creation_date%TYPE
+ default sysdate,
+ creation_user in acs_objects.creation_user%TYPE
+ default null,
+ creation_ip in acs_objects.creation_ip%TYPE default null,
+ email in parties.email%TYPE default null,
+ url in parties.url%TYPE default null,
+ segment_name in rel_segments.segment_name%TYPE,
+ group_id in rel_segments.group_id%TYPE,
+ rel_type in rel_segments.rel_type%TYPE,
+ context_id in acs_objects.context_id%TYPE default null
+ ) return rel_segments.segment_id%TYPE;
-create or replace package rel_constraint
-as
-
- function new (
- --/** Creates a new relational constraint
+ procedure del (
+ --/** Deletes a relational segment
--
-- @author Oumi Mehrotra (oumi@arsdigita.com)
-- @creation-date 12/2000
--
--*/
- constraint_id in rel_constraints.constraint_id%TYPE default null,
- constraint_type in acs_objects.object_type%TYPE default 'rel_constraint',
- constraint_name in rel_constraints.constraint_name%TYPE,
- rel_segment in rel_constraints.rel_segment%TYPE,
- rel_side in rel_constraints.rel_side%TYPE default 'two',
- required_rel_segment in rel_constraints.required_rel_segment%TYPE,
- context_id in acs_objects.context_id%TYPE default null,
- creation_user in acs_objects.creation_user%TYPE default null,
- creation_ip in acs_objects.creation_ip%TYPE default null
- ) return rel_constraints.constraint_id%TYPE;
+ segment_id in rel_segments.segment_id%TYPE
+ );
- procedure del (
- constraint_id in rel_constraints.constraint_id%TYPE
- );
+ function name (
+ segment_id in rel_segments.segment_id%TYPE
+ ) return rel_segments.segment_name%TYPE;
- function get_constraint_id (
- --/** Returns the constraint_id associated with the specified
- -- rel_segment and required_rel_segment for the specified site.
- --
+ function get (
+ --/** EXPERIMENTAL / UNSTABLE -- use at your own risk
+ -- Get the id of a segment given a group_id and rel_type.
+ -- This depends on the uniqueness of group_id,rel_type. We
+ -- might remove the unique constraint in the future, in which
+ -- case we would also probably remove this function.
+ --
-- @author Oumi Mehrotra (oumi@arsdigita.com)
-- @creation-date 12/2000
- --
+ --
--*/
- rel_segment in rel_constraints.rel_segment%TYPE,
- rel_side in rel_constraints.rel_side%TYPE default 'two',
- required_rel_segment in rel_constraints.required_rel_segment%TYPE
- ) return rel_constraints.constraint_id%TYPE;
- function violation (
- --/** Checks to see if there a relational constraint is violated
- -- by the precense of the specified relation. If not, returns
- -- null. If so, returns an appropriate error string.
- --
+ group_id in rel_segments.group_id%TYPE,
+ rel_type in rel_segments.rel_type%TYPE
+ ) return rel_segments.segment_id%TYPE;
+
+ function get_or_new (
+ --/** EXPERIMENTAL / UNSTABLE -- use at your own risk
+ --
+ -- This function simplifies the use of segments a little by letting
+ -- you not have to worry about creating and initializing segments.
+ -- If the segment you're interested in exists, this function
+ -- returns its segment_id.
+ -- If the segment you're interested in doesn't exist, this function
+ -- does a pretty minimal amount of initialization for the segment
+ -- and returns a new segment_id.
+ --
-- @author Oumi Mehrotra (oumi@arsdigita.com)
-- @creation-date 12/2000
- --
- -- @param rel_id The relation for which we want to find
- -- any violations
+ --
--*/
- rel_id in acs_rels.rel_id%TYPE
- ) return varchar;
+ group_id in rel_segments.group_id%TYPE,
+ rel_type in rel_segments.rel_type%TYPE,
+ segment_name in rel_segments.segment_name%TYPE
+ default null
+ ) return rel_segments.segment_id%TYPE;
-
- function violation_if_removed (
- --/** Checks to see if removing the specified relation would violate
- -- a relational constraint. If not, returns null. If so, returns
- -- an appropriate error string.
- --
- -- @author Michael Bryzek (mbryzek@arsdigita.com)
- -- @creation-date 1/2001
- --
- -- @param rel_id The relation that we are planning to remove
- --*/
- rel_id in acs_rels.rel_id%TYPE
- ) return varchar;
-
-end;
+end rel_segment;
/
show errors
---
--- packages/acs-kernel/sql/rel-segments-create.sql
---
--- @author Oumi Mehrotra oumi@arsdigita.com
--- @creation-date 2000-11-22
--- @cvs-id $Id$
--- Copyright (C) 1999-2000 ArsDigita Corporation
--- This is free software distributed under the terms of the GNU Public
--- License. Full text of the license is available from the GNU Project:
--- http://www.fsf.org/copyleft/gpl.html
-------------------
--- PACKAGE BODY --
-------------------
create or replace package body rel_segment
is
@@ -4424,108 +4447,9 @@
/
show errors
---
--- packages/acs-kernel/sql/rel-segments-create.sql
---
--- @author Oumi Mehrotra oumi@arsdigita.com
--- @creation-date 2000-11-22
--- @cvs-id $Id$
--- Copyright (C) 1999-2000 ArsDigita Corporation
--- This is free software distributed under the terms of the GNU Public
--- License. Full text of the license is available from the GNU Project:
--- http://www.fsf.org/copyleft/gpl.html
--- WARNING!
--- Relational segments is a new and experimental concept. The API may
--- change in the future, particularly the functions marked "EXPERIMENTAL".
---
--- create pl/sql package rel_segment
-
-create or replace package rel_segment
-is
- function new (
- --/** Creates a new relational segment
- --
- -- @author Oumi Mehrotra (oumi@arsdigita.com)
- -- @creation-date 12/2000
- --
- --*/
- segment_id in rel_segments.segment_id%TYPE default null,
- object_type in acs_objects.object_type%TYPE
- default 'rel_segment',
- creation_date in acs_objects.creation_date%TYPE
- default sysdate,
- creation_user in acs_objects.creation_user%TYPE
- default null,
- creation_ip in acs_objects.creation_ip%TYPE default null,
- email in parties.email%TYPE default null,
- url in parties.url%TYPE default null,
- segment_name in rel_segments.segment_name%TYPE,
- group_id in rel_segments.group_id%TYPE,
- rel_type in rel_segments.rel_type%TYPE,
- context_id in acs_objects.context_id%TYPE default null
- ) return rel_segments.segment_id%TYPE;
-
- procedure del (
- --/** Deletes a relational segment
- --
- -- @author Oumi Mehrotra (oumi@arsdigita.com)
- -- @creation-date 12/2000
- --
- --*/
- segment_id in rel_segments.segment_id%TYPE
- );
-
- function name (
- segment_id in rel_segments.segment_id%TYPE
- ) return rel_segments.segment_name%TYPE;
-
- function get (
- --/** EXPERIMENTAL / UNSTABLE -- use at your own risk
- -- Get the id of a segment given a group_id and rel_type.
- -- This depends on the uniqueness of group_id,rel_type. We
- -- might remove the unique constraint in the future, in which
- -- case we would also probably remove this function.
- --
- -- @author Oumi Mehrotra (oumi@arsdigita.com)
- -- @creation-date 12/2000
- --
- --*/
-
- group_id in rel_segments.group_id%TYPE,
- rel_type in rel_segments.rel_type%TYPE
- ) return rel_segments.segment_id%TYPE;
-
- function get_or_new (
- --/** EXPERIMENTAL / UNSTABLE -- use at your own risk
- --
- -- This function simplifies the use of segments a little by letting
- -- you not have to worry about creating and initializing segments.
- -- If the segment you're interested in exists, this function
- -- returns its segment_id.
- -- If the segment you're interested in doesn't exist, this function
- -- does a pretty minimal amount of initialization for the segment
- -- and returns a new segment_id.
- --
- -- @author Oumi Mehrotra (oumi@arsdigita.com)
- -- @creation-date 12/2000
- --
- --*/
- group_id in rel_segments.group_id%TYPE,
- rel_type in rel_segments.rel_type%TYPE,
- segment_name in rel_segments.segment_name%TYPE
- default null
- ) return rel_segments.segment_id%TYPE;
-
-end rel_segment;
-/
-show errors
-
-
-
-
create or replace package party_approved_member is
procedure add_one(
Index: openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 11 Dec 2003 21:39:52 -0000 1.12
+++ openacs-4/packages/acs-kernel/sql/postgresql/acs-relationships-create.sql 26 Jan 2004 15:39:45 -0000 1.13
@@ -267,19 +267,22 @@
declare
drop_type__rel_type alias for $1;
drop_type__cascade_p alias for $2; -- default ''f''
+ v_cascade_p boolean;
begin
-- XXX do cascade_p.
-- JCD: cascade_p seems to be ignored in acs_o_type__drop_type anyway...
if drop_type__cascade_p is null then
- drop_type__cascade_p := ''f'';
+ v_cascade_p := ''f'';
+ else
+ v_cascade_p := drop_type__cascade_p;
end if;
delete from acs_rel_types
where rel_type = drop_type__rel_type;
PERFORM acs_object_type__drop_type(drop_type__rel_type,
- drop_type__cascade_p);
+ v_cascade_p);
return 0;
end;' language 'plpgsql';
Index: openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql,v
diff -u -r1.47 -r1.48
--- openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 11 Dec 2003 21:39:52 -0000 1.47
+++ openacs-4/packages/acs-kernel/sql/postgresql/apm-create.sql 26 Jan 2004 15:39:45 -0000 1.48
@@ -1746,13 +1746,14 @@
declare
highest_version__package_key alias for $1;
v_version_id apm_package_versions.version_id%TYPE;
+ v_max_version varchar;
begin
- select version_id into v_version_id
- from apm_package_version_info i
- where apm_package_version__sortable_version_name(version_name) =
- (select max(apm_package_version__sortable_version_name(v.version_name))
- from apm_package_version_info v where v.package_key = highest_version__package_key)
- and package_key = highest_version__package_key;
+ select max(apm_package_version__sortable_version_name(v.version_name)) into v_max_version
+ from apm_package_version_info v where v.package_key = highest_version__package_key;
+
+ select version_id into v_version_id from apm_package_version_info i
+ where apm_package_version__sortable_version_name(version_name) = v_max_version and i.package_key = highest_version__package_key;
+
if NOT FOUND then
return 0;
else
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.5-4.6.6.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.5-4.6.6.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.5-4.6.6.sql 30 Sep 2003 09:05:25 -0000 1.3
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-4.6.5-4.6.6.sql 26 Jan 2004 15:39:45 -0000 1.4
@@ -1,4 +1,4 @@
---
+--
-- @author Lars Pind (lars@collaboraid.biz)
-- @creation-date 2003-07-03
@@ -33,7 +33,7 @@
where role = ''admin'';
if v_role_exists_p = 0 then
- select acs_rel_type__create_role (''admin'', ''Administrator'', ''Administrators'');
+ PERFORM acs_rel_type__create_role (''admin'', ''Administrator'', ''Administrators'');
end if;
return 0;
@@ -125,4 +125,8 @@
end;' language 'plpgsql';
-
+-- Internationalize role "member"
+update acs_rel_roles
+set pretty_name = '#acs-kernel.member_role_pretty_name#',
+pretty_plural = '#acs-kernel.member_role_pretty_plural#'
+where role = 'member';
\ No newline at end of file
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0.0a1-5.0.0a2.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql 14 Jan 2004 17:35:48 -0000 1.3
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0.0b3-5.0.0b4.sql 26 Jan 2004 15:39:45 -0000 1.4
@@ -531,25 +531,26 @@
declare
drop_type__rel_type alias for $1;
drop_type__cascade_p alias for $2; -- default ''f''
+ v_cascade boolean;
begin
-- XXX do cascade_p.
-- JCD: cascade_p seems to be ignored in acs_o_type__drop_type anyway...
-
if drop_type__cascade_p is null then
- drop_type__cascade_p := ''f'';
+ v_cascade_p := ''f'';
+ else
+ v_cascade_p := drop_type__cascade_p;
end if;
delete from acs_rel_types
where rel_type = drop_type__rel_type;
PERFORM acs_object_type__drop_type(drop_type__rel_type,
- drop_type__cascade_p);
+ v_cascade_p);
return 0;
end;' language 'plpgsql';
-
create or replace function apm__unregister_package (varchar,boolean)
returns integer as '
declare
@@ -771,7 +772,8 @@
---- DRB: fixes bug 1144
-create or replace view registered_users
+drop view registered_users;
+create view registered_users
as
select p.email, p.url, pe.first_names, pe.last_name, u.*, mr.member_state
from parties p, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
@@ -786,7 +788,9 @@
and mr.member_state = 'approved'
and u.email_verified_p = 't';
-create or replace view cc_users
+
+drop view cc_users;
+create view cc_users
as
select o.*, pa.*, pe.*, u.*, mr.member_state, mr.rel_id
from acs_objects o, parties pa, persons pe, users u, group_member_map m, membership_rels mr, acs_magic_objects amo
@@ -800,3 +804,176 @@
and m.container_id = m.group_id
and m.rel_type = 'membership_rel';
+drop function acs__add_user(int4,varchar,timestamptz,int4,varchar,varchar,varchar,varchar,varchar,bpchar,bpchar,varchar,varchar,varchar,bool,varchar);
+
+create or replace function acs__add_user (
+ integer, -- user_id
+ varchar, -- object_type
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- cretion_ip
+ integer, -- authority_id; default 'local'
+ varchar, -- username
+ varchar, -- email
+ varchar, -- url
+ varchar, -- first_names
+ varchar, -- last_name
+ char, -- password
+ char, -- salt
+ varchar, -- screen_name
+ boolean, -- email_verified_p
+ varchar -- member_state
+)
+returns integer as '
+declare
+ p_user_id alias for $1; -- default null
+ p_object_type alias for $2; -- default ''user''
+ p_creation_date alias for $3; -- default now()
+ p_creation_user alias for $4; -- default null
+ p_creation_ip alias for $5; -- default null
+ p_authority_id alias for $6; -- defaults to local authority
+ p_username alias for $7; --
+ p_email alias for $8;
+ p_url alias for $9; -- default null
+ p_first_names alias for $10;
+ p_last_name alias for $11;
+ p_password alias for $12;
+ p_salt alias for $13;
+ p_screen_name alias for $14; -- default null
+ p_email_verified_p alias for $15; -- default ''t''
+ p_member_state alias for $16; -- default ''approved''
+ v_user_id users.user_id%TYPE;
+ v_rel_id membership_rels.rel_id%TYPE;
+begin
+ v_user_id := acs_user__new (
+ p_user_id,
+ p_object_type,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_authority_id,
+ p_username,
+ p_email,
+ p_url,
+ p_first_names,
+ p_last_name,
+ p_password,
+ p_salt,
+ p_screen_name,
+ p_email_verified_p,
+ null -- context_id
+ );
+
+ v_rel_id := membership_rel__new (
+ null,
+ ''membership_rel'',
+ acs__magic_object_id(''registered_users''),
+ v_user_id,
+ p_member_state,
+ null,
+ null);
+
+ PERFORM acs_permission__grant_permission (
+ v_user_id,
+ v_user_id,
+ ''read''
+ );
+
+ PERFORM acs_permission__grant_permission (
+ v_user_id,
+ v_user_id,
+ ''write''
+ );
+
+ return v_user_id;
+
+end;' language 'plpgsql';
+
+
+drop function acs_user__new(int4,varchar,timestamptz,int4,varchar,varchar,varchar,varchar,varchar,bpchar,bpchar,varchar,varchar,varchar,bool,int4);
+
+create or replace function acs_user__new (
+ integer, -- user_id
+ varchar, -- object_type
+ timestamptz, -- creation_date
+ integer, -- creation_user
+ varchar, -- creation_ip
+ integer, -- authority_id; default 'local'
+ varchar, -- username
+ varchar, -- email
+ varchar, -- url
+ varchar, -- first_names
+ varchar, -- last_name
+ char, -- password
+ char, -- salt
+ varchar, -- screen_name
+ boolean, -- email_verified_p
+ integer -- context_id
+)
+returns integer as '
+declare
+ p_user_id alias for $1; -- default null
+ p_object_type alias for $2; -- default ''user''
+ p_creation_date alias for $3; -- default now()
+ p_creation_user alias for $4; -- default null
+ p_creation_ip alias for $5; -- default null
+ p_authority_id alias for $6; -- defaults to local authority
+ p_username alias for $7; --
+ p_email alias for $8;
+ p_url alias for $9; -- default null
+ p_first_names alias for $10;
+ p_last_name alias for $11;
+ p_password alias for $12;
+ p_salt alias for $13;
+ p_screen_name alias for $14; -- default null
+ p_email_verified_p alias for $15; -- default ''t''
+ p_context_id alias for $16; -- default null
+ v_user_id users.user_id%TYPE;
+ v_authority_id auth_authorities.authority_id%TYPE;
+ v_person_exists varchar;
+begin
+ v_user_id := p_user_id;
+
+ select case when count(*) = 0 then ''f'' else ''t'' end into v_person_exists
+ from persons where person_id = v_user_id;
+
+ if v_person_exists = ''f'' then
+ v_user_id := person__new(
+ v_user_id,
+ p_object_type,
+ p_creation_date,
+ p_creation_user,
+ p_creation_ip,
+ p_email,
+ p_url,
+ p_first_names,
+ p_last_name,
+ p_context_id
+ );
+ else
+ update acs_objects set object_type = ''user'' where object_id = v_user_id;
+ end if;
+
+ -- default to local authority
+ if p_authority_id is null then
+ select authority_id
+ into v_authority_id
+ from auth_authorities
+ where short_name = ''local'';
+ else
+ v_authority_id := p_authority_id;
+ end if;
+
+ insert into users
+ (user_id, authority_id, username, password, salt, screen_name, email_verified_p)
+ values
+ (v_user_id, v_authority_id, p_username, p_password, p_salt, p_screen_name, p_email_verified_p);
+
+ insert into user_preferences
+ (user_id)
+ values
+ (v_user_id);
+
+ return v_user_id;
+
+end;' language 'plpgsql';
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql 17 Oct 2003 08:42:53 -0000 1.10
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d2-5.0d3.sql 26 Jan 2004 15:39:45 -0000 1.11
@@ -1,4 +1,4 @@
---
+--
-- Upgrade script from 5.0d2 to 5.0d3
--
-- @author Peter Marklund (peter@collaboraid.biz)
@@ -221,18 +221,19 @@
references auth_authorities(authority_id);
alter table users add username varchar(100);
-update users set username = '-';
-- set all current users' username to equal their email
-- and their authority to be the local authority
-- Exclude the unregistered visitor as he/she has a null email
-update users
+update users
set username = (select email from parties where party_id = user_id),
authority_id = (select authority_id from auth_authorities where short_name = 'local')
-and user_id <> 0;
+where user_id <> 0 and username is null;
--- Does not work with PG 7.2
--- alter table users alter column username set not null;
+update users set username = '-' where username is null;
+-- Does not work with PG 7.2, 5.0 only supports 7.3+ so set not null.
+alter table users alter column username set not null;
+
alter table users add constraint users_authority_username_un
unique (authority_id, username);
Index: openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d7-5.0d9.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d7-5.0d9.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d7-5.0d9.sql 30 Sep 2003 09:45:27 -0000 1.4
+++ openacs-4/packages/acs-kernel/sql/postgresql/upgrade/upgrade-5.0d7-5.0d9.sql 26 Jan 2004 15:39:45 -0000 1.5
@@ -5,13 +5,10 @@
-- *** Remove a column not needed
-- See http://openacs.org/bugtracker/openacs/bug?bug%5fnumber=555
-- Seems PG 7.2 doesn't support this
--- alter table apm_packages drop enabled_p;
+alter table apm_packages drop enabled_p;
--- *** Get rid of file-related data no longer used
-drop table apm_package_file_types;
-drop table apm_package_files;
-- View was dropped by previous drop
---drop view apm_file_info;
+drop view apm_file_info;
drop function apm_package_version__add_file (integer,integer,varchar,varchar, varchar);
drop function apm_package_version__remove_file (integer,varchar);
drop function apm_package__disable (integer);
@@ -63,3 +60,75 @@
-- return 0;
end;' language 'plpgsql';
+
+create or replace function apm_package_version__delete (integer)
+returns integer as '
+declare
+ delete__version_id alias for $1;
+begin
+ delete from apm_package_owners
+ where version_id = delete__version_id;
+
+ delete from apm_package_dependencies
+ where version_id = delete__version_id;
+
+ delete from apm_package_versions
+ where version_id = delete__version_id;
+
+ PERFORM acs_object__delete(delete__version_id);
+
+ return 0;
+end;' language 'plpgsql';
+
+create or replace function apm_package_version__copy (integer,integer,varchar,varchar,boolean)
+returns integer as '
+declare
+ copy__version_id alias for $1;
+ copy__new_version_id alias for $2; -- default null
+ copy__new_version_name alias for $3;
+ copy__new_version_uri alias for $4;
+ copy__copy_owners_p alias for $5;
+ v_version_id integer;
+begin
+ v_version_id := acs_object__new(
+ copy__new_version_id,
+ ''apm_package_version'',
+ now(),
+ null,
+ null,
+ null
+ );
+
+ insert into apm_package_versions(version_id, package_key, version_name,
+ version_uri, summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount)
+ select v_version_id, package_key, copy__new_version_name,
+ copy__new_version_uri, summary, description_format, description,
+ release_date, vendor, vendor_uri, auto_mount
+ from apm_package_versions
+ where version_id = copy__version_id;
+
+ insert into apm_package_dependencies(dependency_id, version_id, dependency_type, service_uri, service_version)
+ select nextval(''t_acs_object_id_seq''), v_version_id, dependency_type, service_uri, service_version
+ from apm_package_dependencies
+ where version_id = copy__version_id;
+
+ insert into apm_package_callbacks (version_id, type, proc)
+ select v_version_id, type, proc
+ from apm_package_callbacks
+ where version_id = copy__version_id;
+
+ if copy__copy_owners_p then
+ insert into apm_package_owners(version_id, owner_uri, owner_name, sort_key)
+ select v_version_id, owner_uri, owner_name, sort_key
+ from apm_package_owners
+ where version_id = copy__version_id;
+ end if;
+
+ return v_version_id;
+
+end;' language 'plpgsql';
+
+-- *** Get rid of file-related data no longer used
+drop table apm_package_file_types;
+drop table apm_package_files;
Index: openacs-4/packages/acs-lang/acs-lang.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/acs-lang.info,v
diff -u -r1.32 -r1.33
--- openacs-4/packages/acs-lang/acs-lang.info 11 Dec 2003 21:39:52 -0000 1.32
+++ openacs-4/packages/acs-lang/acs-lang.info 26 Jan 2004 15:39:45 -0000 1.33
@@ -7,17 +7,17 @@
tt
-
+ Peter MarklundOpenACS Internationalization Support.
- 2003-11-07
+ 2004-01-21CollaboraidInternationalization and localization support routines and admin UI for manipulating Locales,
request processor hooks, templating, accessing and managing the message catalog, and
locale-specific formatting functions for localizing dates, times, monetary amounts etc.
-
-
+
+
Index: openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql 3 Dec 2002 17:26:34 -0000 1.4
+++ openacs-4/packages/acs-lang/sql/oracle/message-catalog-drop.sql 26 Jan 2004 15:39:45 -0000 1.5
@@ -16,7 +16,9 @@
-- drop the lang stuff
drop table lang_translation_registry;
drop table lang_translate_columns;
+drop table lang_messages_audit;
drop table lang_messages;
+drop table lang_message_keys;
drop table lang_user_timezone;
-- This might fail if the data model includes other multilingual tables
Index: openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql 11 Dec 2003 21:39:53 -0000 1.11
+++ openacs-4/packages/acs-lang/sql/oracle/message-catalog.sql 26 Jan 2004 15:39:45 -0000 1.12
@@ -96,6 +96,8 @@
overwrite_user integer
constraint lang_messages_audit_ou_fk
references users (user_id),
+ constraint lang_messages_audit_pk
+ primary key (package_key, message_key, locale, overwrite_date),
constraint lang_messages_audit_fk
foreign key (message_key, package_key)
references lang_message_keys(message_key, package_key)
Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/acs-lang/sql/oracle/upgrade-5.0.0b4-5.0.0b5.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-lang/sql/oracle/upgrade/upgrade-5.0.0b4-5.0.0b5.sql'.
Fisheye: No comparison available. Pass `N' to diff?
Index: openacs-4/packages/acs-lang/sql/postgresql/message-catalog-drop.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/postgresql/message-catalog-drop.sql,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/acs-lang/sql/postgresql/message-catalog-drop.sql 3 Dec 2002 17:26:44 -0000 1.3
+++ openacs-4/packages/acs-lang/sql/postgresql/message-catalog-drop.sql 26 Jan 2004 15:39:45 -0000 1.4
@@ -16,7 +16,9 @@
-- drop the lang stuff
drop table lang_translation_registry;
drop table lang_translate_columns;
+drop table lang_messages_audit;
drop table lang_messages;
+drop table lang_message_keys;
drop table lang_user_timezone;
-- This might fail if the data model includes other multilingual tables
Index: openacs-4/packages/acs-lang/sql/postgresql/message-catalog.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/postgresql/message-catalog.sql,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-lang/sql/postgresql/message-catalog.sql 11 Dec 2003 21:39:53 -0000 1.14
+++ openacs-4/packages/acs-lang/sql/postgresql/message-catalog.sql 26 Jan 2004 15:39:45 -0000 1.15
@@ -93,6 +93,8 @@
overwrite_user integer
constraint lang_messages_audit_ou_fk
references users (user_id),
+ constraint lang_messages_audit_pk
+ primary key (package_key, message_key, locale, overwrite_date),
constraint lang_messages_audit_fk
foreign key (message_key, package_key)
references lang_message_keys(message_key, package_key)
Index: openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql 11 Dec 2003 21:39:53 -0000 1.2
+++ openacs-4/packages/acs-lang/sql/postgresql/upgrade/upgrade-5.0.0b4-5.0.0b5.sql 26 Jan 2004 15:39:45 -0000 1.3
@@ -3,8 +3,8 @@
--
-- @author Peter Marklund
--- The lang_messages_keys.upgrade_status column carry any information over the corresponding
--- en_US row in the lang_messages table and were not being kept in sync.
+-- Changes to lang_message_keys table
+-- Column not needed as en_US row in lang_messages table has same info
alter table lang_message_keys drop column upgrade_status;
-- Add new columns to the lang_messages table
@@ -25,3 +25,33 @@
constraint lang_messages_us_ck
check (upgrade_status in ('no_upgrade', 'added', 'deleted', 'updated'));
update lang_messages_audit set deleted_p = 'f', conflict_p = 'f', upgrade_status = 'no_upgrade';
+
+-- Missing this primary key made some queries below very slow
+alter table lang_messages_audit add constraint lang_messages_audit_pk primary key (package_key, message_key, locale, overwrite_date);
+
+-- Make sure sync_time is not null for the first message imported. If we don't
+-- do this we are missing a set of base messages to merge against on the next
+-- catalog import.
+-- Messages with only one revision
+
+-- Messages with only one revision
+-- This query is slow. Not sure how to speed it up.
+update lang_messages
+ set sync_time = current_timestamp
+ where not exists (select 1
+ from lang_messages_audit lma
+ where lma.package_key = lang_messages.package_key
+ and lma.message_key = lang_messages.message_key
+ and lma.locale = lang_messages.locale
+ );
+
+-- Messages with multiple revisions
+-- This query is slow as well.
+ update lang_messages_audit
+ set sync_time = current_timestamp
+ where overwrite_date = (select max(lma2.overwrite_date)
+ from lang_messages_audit lma2
+ where lma2.package_key = lang_messages_audit.package_key
+ and lma2.message_key = lang_messages_audit.message_key
+ and lma2.locale = lang_messages_audit.locale
+ );
Index: openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl,v
diff -u -r1.37 -r1.38
--- openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 11 Dec 2003 21:39:53 -0000 1.37
+++ openacs-4/packages/acs-lang/tcl/lang-catalog-procs.tcl 26 Jan 2004 15:39:45 -0000 1.38
@@ -331,14 +331,12 @@
file mkdir $catalog_dir
}
- # Create a backup file first if there isn't one already
+ # Create a backup file first if a file already exists
set backup_path "${file_path}.orig"
- if { [file exists $file_path] && ![file exists $backup_path] } {
- ns_log Notice "Backing up catalog file $file_path"
- file copy -- $file_path $backup_path
- } else {
- ns_log Notice "Not backing up $file_path as backup file already exists"
- }
+ if { [file exists $file_path] } {
+ ns_log Notice "Creating backup catalog file $backup_path"
+ file copy -force -- $file_path $backup_path
+ }
# Since the output charset, and thus the filename, may have changed since
# last time that we wrote the catalog file we remove old files with the same locale
@@ -949,9 +947,8 @@
if { [lsearch -exact {added updated deleted} $upgrade_status] != -1 } {
incr message_count($upgrade_status)
- } else {
- incr message_count(processed)
- }
+ }
+ incr message_count(processed)
} ;# End of message key loop
Index: openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl,v
diff -u -r1.40 -r1.41
--- openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 11 Dec 2003 21:39:53 -0000 1.40
+++ openacs-4/packages/acs-lang/tcl/lang-message-procs.tcl 26 Jan 2004 15:39:45 -0000 1.41
@@ -430,7 +430,7 @@
and message_key = :message_key
and locale = :locale
"
- db_dml edit_message_key $sql
+ db_dml edit_message $sql
}
}
Index: openacs-4/packages/acs-lang/www/admin/import-messages.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/import-messages.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-lang/www/admin/import-messages.tcl 11 Dec 2003 21:39:53 -0000 1.2
+++ openacs-4/packages/acs-lang/www/admin/import-messages.tcl 26 Jan 2004 15:39:45 -0000 1.3
@@ -15,10 +15,9 @@
ad_script_abort
}
-set locales [list $locale]
array set message_count [lang::catalog::import \
-package_key $package_key \
- -locales $locales]
+ -locales $locale]
set conflict_count [lang::message::conflict_count \
-package_key $package_key \
Index: openacs-4/packages/acs-lang/www/admin/message-conflicts.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-conflicts.adp,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-lang/www/admin/message-conflicts.adp 11 Dec 2003 21:39:53 -0000 1.2
+++ openacs-4/packages/acs-lang/www/admin/message-conflicts.adp 26 Jan 2004 15:39:45 -0000 1.3
@@ -1,5 +1,6 @@
@page_title@
+ @context;noquote@
This page lists conflicts resulting from message catalog imports that need manual resolution by a translator
Index: openacs-4/packages/acs-lang/www/admin/message-conflicts.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-conflicts.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-lang/www/admin/message-conflicts.tcl 11 Dec 2003 21:39:53 -0000 1.2
+++ openacs-4/packages/acs-lang/www/admin/message-conflicts.tcl 26 Jan 2004 15:39:45 -0000 1.3
@@ -6,9 +6,19 @@
} {
locale:optional
package_key:optional
+ upgrade_status:optional
}
+foreach optional_var {locale package_key} {
+ if { [info exists $optional_var] } {
+ if { [empty_string_p [set $optional_var]] } {
+ unset $optional_var
+ }
+ }
+}
+
set page_title "I18N Message Conflicts"
+set context [list $page_title]
list::create \
-name messages \
@@ -59,7 +69,15 @@
order by pretty_name
}]}
}
-
+ upgrade_status {
+ label "Status"
+ where_clause "upgrade_status = :upgrade_status"
+ values {[db_list_of_lists upgrade_statuses {
+ select distinct upgrade_status, upgrade_status
+ from lang_messages
+ where conflict_p = 't'
+ }]}
+ }
}
db_multirow -unclobber -extend { edit_url accept_url } messages select_messages "
Index: openacs-4/packages/acs-mail/acs-mail.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/acs-mail.info,v
diff -u -r1.15 -r1.16
--- openacs-4/packages/acs-mail/acs-mail.info 11 Dec 2003 21:39:54 -0000 1.15
+++ openacs-4/packages/acs-mail/acs-mail.info 26 Jan 2004 15:39:46 -0000 1.16
@@ -7,18 +7,18 @@
tt
-
+ Vinod KurupJohn PrevostGeneral messaging system, mark II
- 2003-11-07
+ 2004-01-21OpenACSProvides generic message services, with email sending. The acs-mail-lite package is the prefered
interface for new packages and it's anticipated that this package will ultimately be deprecated.
-
-
-
+
+
+
Index: openacs-4/packages/acs-messaging/acs-messaging.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/acs-messaging.info,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-messaging/acs-messaging.info 11 Dec 2003 21:39:54 -0000 1.11
+++ openacs-4/packages/acs-messaging/acs-messaging.info 26 Jan 2004 15:39:46 -0000 1.12
@@ -7,19 +7,19 @@
tt
-
+ Anukul KapoorJohn PrevostVinod KurupGeneral messaging for bboard and general comments.
- 2003-11-07
+ 2004-01-21OpenACSProvides generic message services, with email sending. acs-mail-lite and notifications are the
prefered packages for delivering this functionality and it is anticipated that this package will ultimately be deprecated.
-
-
-
+
+
+
Index: openacs-4/packages/acs-reference/acs-reference.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-reference/acs-reference.info,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-reference/acs-reference.info 11 Dec 2003 21:39:54 -0000 1.10
+++ openacs-4/packages/acs-reference/acs-reference.info 26 Jan 2004 15:39:46 -0000 1.11
@@ -7,10 +7,10 @@
tt
-
+ Jon GriffinTools and API for managing refrence data.
- 2003-11-07
+ 2004-01-21Mayuli Enterprises, LLCReference Data provides an API to support:
<ul>
@@ -19,8 +19,8 @@
<li> Monitoring the usage of reference data.
</ul>
-
-
+
+
Index: openacs-4/packages/acs-service-contract/acs-service-contract.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/acs-service-contract.info,v
diff -u -r1.19 -r1.20
--- openacs-4/packages/acs-service-contract/acs-service-contract.info 11 Dec 2003 21:39:54 -0000 1.19
+++ openacs-4/packages/acs-service-contract/acs-service-contract.info 26 Jan 2004 15:39:46 -0000 1.20
@@ -7,17 +7,17 @@
tt
-
+ OpenACSAPI and UI for service contracts
- 2003-11-07
+ 2004-01-21OpenACSService contracts defines an API for the creation of interfaces and discovery of interface implementations.
Examples are the contracts used for search which provide a means to get content on a given object and to translate an object_id to a
url or the contracts used by dotlrn and new-portals to allow packages to provide portalized panes.
-
-
+
+
Index: openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 11 Dec 2003 21:39:55 -0000 1.20
+++ openacs-4/packages/acs-service-contract/tcl/acs-service-contract-procs.tcl 26 Jan 2004 15:39:46 -0000 1.21
@@ -229,7 +229,7 @@
-ad_proc -deprecated acs_sc_call {
+ad_proc -private -deprecated acs_sc_call {
{-error:boolean}
contract
operation
@@ -245,6 +245,8 @@
@param error If specified, will throw an error if the operation isn't implemented.
@author Neophytos Demetriou
+
+ @see acs_sc::invoke
} {
set proc_name [acs_sc_generate_name $contract $impl $operation]
Index: openacs-4/packages/acs-subsite/acs-subsite.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/acs-subsite.info,v
diff -u -r1.60 -r1.61
--- openacs-4/packages/acs-subsite/acs-subsite.info 11 Dec 2003 21:39:55 -0000 1.60
+++ openacs-4/packages/acs-subsite/acs-subsite.info 26 Jan 2004 15:39:46 -0000 1.61
@@ -7,18 +7,18 @@
tf
-
+ OpenACSSubsite
- 2003-11-07
+ 2004-01-21OpenACSProvides for creating subsites within the OpenACS Community System. Aware of parties, groups, users, portraits. Can be themed via a per subsite master template.
-
-
-
-
+
+
+
+
Index: openacs-4/packages/acs-subsite/sql/oracle/user-profiles-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/oracle/user-profiles-create.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/sql/oracle/user-profiles-create.sql 30 Sep 2003 12:10:03 -0000 1.2
+++ openacs-4/packages/acs-subsite/sql/oracle/user-profiles-create.sql 26 Jan 2004 15:39:46 -0000 1.3
@@ -112,7 +112,7 @@
membership_rel.del(profile_id);
- end delete;
+ end del;
end user_profile;
/
Index: openacs-4/packages/acs-subsite/sql/oracle/upgrade/upgrade-5.0d4-5.0d5.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/oracle/upgrade/upgrade-5.0d4-5.0d5.sql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-subsite/sql/oracle/upgrade/upgrade-5.0d4-5.0d5.sql 8 Oct 2003 16:59:22 -0000 1.1
+++ openacs-4/packages/acs-subsite/sql/oracle/upgrade/upgrade-5.0d4-5.0d5.sql 26 Jan 2004 15:39:46 -0000 1.2
@@ -288,7 +288,7 @@
membership_rel.del(profile_id);
- end delete;
+ end del;
end user_profile;
/
Index: openacs-4/packages/acs-subsite/tcl/group-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/group-procs.tcl,v
diff -u -r1.17 -r1.18
--- openacs-4/packages/acs-subsite/tcl/group-procs.tcl 11 Dec 2003 21:39:55 -0000 1.17
+++ openacs-4/packages/acs-subsite/tcl/group-procs.tcl 26 Jan 2004 15:39:46 -0000 1.18
@@ -448,6 +448,36 @@
-join_policy $group(join_policy) \
-create_p $create_p]
}
+
+ if { ![string equal $rel_type "membership_rel"] } {
+ # Add them with a membership_rel first
+ relation_add -member_state $member_state "membership_rel" $group_id $user_id
+ }
relation_add -member_state $member_state $rel_type $group_id $user_id
}
+
+
+ad_proc -public group::remove_member {
+ {-group_id:required}
+ {-user_id:required}
+} {
+ Removes a user from a group. No permission checking.
+} {
+
+ # Find all acs_rels between this group and this user, which are membership_rels or descendants thereof (admin_rels, for example)
+ set rel_id_list [db_list select_rel_ids {
+ select r.rel_id
+ from acs_rels r,
+ membership_rels mr
+ where r.rel_id = mr.rel_id
+ and r.object_id_one = :group_id
+ and r.object_id_two = :user_id
+ }]
+
+ db_transaction {
+ foreach rel_id $rel_id_list {
+ relation_remove $rel_id
+ }
+ }
+}
Index: openacs-4/packages/acs-subsite/tcl/relation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/relation-procs.tcl,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-subsite/tcl/relation-procs.tcl 11 Dec 2003 21:39:55 -0000 1.9
+++ openacs-4/packages/acs-subsite/tcl/relation-procs.tcl 26 Jan 2004 15:39:46 -0000 1.10
@@ -76,6 +76,9 @@
lappend var_list [list member_state $member_state]
}
+ # We initialize rel_id, so it's set if there's a problem
+ set rel_id {}
+
# We use db_transaction inside this proc to roll back the insert
# in case of a violation
@@ -109,7 +112,6 @@
}
return $rel_id
-
}
Index: openacs-4/packages/acs-subsite/www/members/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/index.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-subsite/www/members/index.tcl 30 Dec 2003 20:45:10 -0000 1.14
+++ openacs-4/packages/acs-subsite/www/members/index.tcl 26 Jan 2004 15:39:46 -0000 1.15
@@ -189,21 +189,21 @@
set ban_url [export_vars -base member-state-change { rel_id {member_state banned} }]
set delete_url [export_vars -base member-state-change { rel_id {member_state deleted} }]
} else {
- set remove_url [export_vars -base member-remove { rel_id }]
+ set remove_url [export_vars -base member-remove { user_id }]
}
}
"needs approval" {
set approve_url [export_vars -base member-state-change { rel_id { member_state approved } }]
if { $main_site_p } {
set reject_url [export_vars -base member-state-change { rel_id {member_state rejected} }]
} else {
- set remove_url [export_vars -base member-remove { rel_id }]
+ set remove_url [export_vars -base member-remove { user_id }]
}
}
"rejected" - "deleted" - "banned" {
set approve_url [export_vars -base member-state-change { rel_id { member_state approved } }]
if { !$main_site_p } {
- set remove_url [export_vars -base member-remove { rel_id }]
+ set remove_url [export_vars -base member-remove { user_id }]
}
}
}
Index: openacs-4/packages/acs-subsite/www/members/index.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/index.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/www/members/index.xql 3 Dec 2003 23:38:27 -0000 1.2
+++ openacs-4/packages/acs-subsite/www/members/index.xql 26 Jan 2004 15:39:46 -0000 1.3
@@ -27,7 +27,7 @@
member_role.pretty_name as member_role_pretty
from acs_rel_roles admin_role, acs_rel_roles member_role
where admin_role.role = 'admin'
- and member_role.role = 'member';
+ and member_role.role = 'member'
Index: openacs-4/packages/acs-subsite/www/members/member-invite-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/Attic/member-invite-oracle.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/www/members/member-invite-oracle.xql 28 Aug 2003 09:41:41 -0000 1.2
+++ openacs-4/packages/acs-subsite/www/members/member-invite-oracle.xql 26 Jan 2004 15:39:46 -0000 1.3
@@ -12,7 +12,7 @@
nvl(u.last_name || ' ', '') ||
u.email || ' ' ||
nvl(u.screen_name, '')) like upper('%'||:value||'%')
- and not exists (select 1 from acs_rels where object_id_one = $group_id and object_id_two = u.user_id)
+ and not exists (select 1 from acs_rels where object_id_one = $group_id and object_id_two = u.user_id and rel_type = 'membership_rel')
order by name
Index: openacs-4/packages/acs-subsite/www/members/member-invite-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/Attic/member-invite-postgresql.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/www/members/member-invite-postgresql.xql 28 Aug 2003 09:41:41 -0000 1.2
+++ openacs-4/packages/acs-subsite/www/members/member-invite-postgresql.xql 26 Jan 2004 15:39:46 -0000 1.3
@@ -11,7 +11,7 @@
coalesce(u.last_name || ' ', '') ||
u.email || ' ' ||
coalesce(u.screen_name, '')) like upper('%'||:value||'%')
- and not exists (select 1 from acs_rels where object_id_one = $group_id and object_id_two = u.user_id)
+ and not exists (select 1 from acs_rels where object_id_one = $group_id and object_id_two = u.user_id and rel_type = 'membership_rel')
order by name
Index: openacs-4/packages/acs-subsite/www/members/member-invite.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/member-invite.tcl,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-subsite/www/members/member-invite.tcl 5 Dec 2003 00:23:05 -0000 1.5
+++ openacs-4/packages/acs-subsite/www/members/member-invite.tcl 26 Jan 2004 15:39:46 -0000 1.6
@@ -67,13 +67,7 @@
group::add_member \
-group_id $group_id \
-user_id $user_id \
- -rel_type membership_rel
-
- # DRB: This is a bandaid-patch to make relseg usage consistent with the
- # older parts of the toolkit. Relsegs need reworking but until then...
- if { ![string equal $rel_type membership_rel] } {
- relation_add -member_state "" $rel_type $group_id $user_id
- }
+ -rel_type $rel_type
} {
form set_error user_search user_id "Error adding user to community: $errmsg"
global errorInfo
Index: openacs-4/packages/acs-subsite/www/members/member-remove.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/members/member-remove.tcl,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/acs-subsite/www/members/member-remove.tcl 28 Aug 2003 09:41:41 -0000 1.2
+++ openacs-4/packages/acs-subsite/www/members/member-remove.tcl 26 Jan 2004 15:39:46 -0000 1.3
@@ -5,20 +5,17 @@
@creation-date 2003-06-02
@cvs-id $Id$
} {
- rel_id:integer,multiple
+ user_id:integer,multiple
}
set group_id [application_group::group_id_from_package_id]
-ad_require_permission $group_id "admin"
+permission::require_permission -object_id $group_id -privilege "admin"
-foreach one_rel_id $rel_id {
- db_transaction {
- relation_remove $one_rel_id
- } on_error {
- ad_return_error "Error creating the relation" "We got the following error while trying to remove the relation:
$errmsg
"
- ad_script_abort
- }
+foreach id $user_id {
+ group::remove_member \
+ -group_id $group_id \
+ -user_id $user_id
}
ad_returnredirect .
Index: openacs-4/packages/acs-subsite/www/permissions/grant.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/grant.tcl,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/acs-subsite/www/permissions/grant.tcl 15 Oct 2003 12:31:50 -0000 1.10
+++ openacs-4/packages/acs-subsite/www/permissions/grant.tcl 26 Jan 2004 15:39:46 -0000 1.11
@@ -146,20 +146,14 @@
if { [form is_valid grant] } {
- # A valid submission, grant and revoke accordingly.
+ # A valid submission - grant accordingly.
form get_values grant
set privileges [element get_values grant privilege]
- # loop through all privileges, grant checked and revoke un-checked
- # (assuming that there are not too many privs in total, otherwise
- # this would be slow)
- foreach privilege $existing_privs {
- if { [lsearch $privileges $privilege] > -1 } {
- permission::grant -party_id $party_id -object_id $object_id -privilege $privilege
- } else {
- permission::revoke -party_id $party_id -object_id $object_id -privilege $privilege
- }
+ # grant all selected privs
+ foreach privilege $privileges {
+ permission::grant -party_id $party_id -object_id $object_id -privilege $privilege
}
ad_returnredirect "one?[export_vars [list object_id application_url]]"
Index: openacs-4/packages/acs-tcl/acs-tcl.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/acs-tcl.info,v
diff -u -r1.31 -r1.32
--- openacs-4/packages/acs-tcl/acs-tcl.info 11 Dec 2003 21:39:56 -0000 1.31
+++ openacs-4/packages/acs-tcl/acs-tcl.info 26 Jan 2004 15:39:46 -0000 1.32
@@ -7,16 +7,16 @@
tt
-
+ OpenACSThe Kernel Tcl API library.
- 2003-11-07
+ 2004-01-21OpenACSContains all the core Tcl API, including the request processor, security and session management, permissions, site-nodes, package management infrastructure, etc.
-
-
-
+
+
+
Index: openacs-4/packages/acs-tcl/tcl/admin-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/admin-procs.tcl,v
diff -u -r1.14 -r1.15
--- openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 11 Dec 2003 21:39:56 -0000 1.14
+++ openacs-4/packages/acs-tcl/tcl/admin-procs.tcl 26 Jan 2004 15:39:46 -0000 1.15
@@ -10,11 +10,13 @@
ad_proc -deprecated -warn ad_ssl_available_p {} {
Returns 1 if this AOLserver has the SSL module installed.
+
+ @see security::https_available_p
} {
return [security::https_available_p]
}
-proc_doc ad_restrict_to_https {conn args why} {
+ad_proc -public ad_restrict_to_https {conn args why} {
Redirects user to HTTPS.
@author Allen Pulsifer (pulsifer@mediaone.net)
@@ -30,7 +32,7 @@
return "filter_return"
}
-proc_doc ad_approval_system_inuse_p {} {
+ad_proc -public ad_approval_system_inuse_p {} {
Returns 1 if the system is configured to use and approval system.
} {
if {[ad_parameter RegistrationRequiresEmailVerification] && [ad_parameter RegistrationRequiresApprovalP] } {
@@ -40,13 +42,13 @@
}
}
-proc_doc ad_user_class_parameters {} {
+ad_proc -private ad_user_class_parameters {} {
Returns the list of parameter var names used to define a user class.
} {
return [list category_id country_code usps_abbrev intranet_user_p group_id last_name_starts_with email_starts_with expensive user_state sex age_above_years age_below_years registration_during_month registration_before_days registration_after_days registration_after_date last_login_before_days last_login_after_days last_login_equals_days number_visits_below number_visits_above user_class_id sql_post_select crm_state curriculum_elements_completed]
}
-proc_doc ad_user_class_description { set_id } {
+ad_proc -private ad_user_class_description { set_id } {
Takes an ns_set of key/value pairs and produces a human-readable description of the class of users specified.
} {
set clauses [list]
@@ -175,7 +177,7 @@
return $pretty_description
}
-proc_doc ad_user_class_query { set_id } {
+ad_proc -private ad_user_class_query { set_id } {
Takes an ns_set of key/value pairs and produces a query for the class of users specified (one user per row returned).
@param set_id The id of a ns_set containing all the parameters of the user class.
@@ -408,15 +410,15 @@
}
-proc_doc ad_user_class_query_count_only { set_id } {
+ad_proc -private ad_user_class_query_count_only { set_id } {
Takes an ns_set of key/value pairs and produces a query that will compute the number of users in the class specified.
} {
set new_set [ns_set copy $set_id]
ns_set update $new_set count_only_p 1
return [ad_user_class_query $new_set]
}
-proc_doc ad_registration_finite_state_machine_admin_links {
+ad_proc -private ad_registration_finite_state_machine_admin_links {
member_state
email_verified_p
user_id
Index: openacs-4/packages/acs-tcl/tcl/defs-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/defs-procs.tcl,v
diff -u -r1.40 -r1.41
--- openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 4 Jan 2004 21:16:43 -0000 1.40
+++ openacs-4/packages/acs-tcl/tcl/defs-procs.tcl 26 Jan 2004 15:39:46 -0000 1.41
@@ -211,7 +211,7 @@
return [acs_community_member_admin_link -user_id $user_id -label $name]
}
-ad_proc ad_header {
+ad_proc -deprecated ad_header {
{-focus ""}
page_title
{extra_stuff_for_document_head ""}
@@ -227,7 +227,7 @@
}
-ad_proc ad_header_with_extra_stuff {
+ad_proc -deprecated ad_header_with_extra_stuff {
{-focus ""}
page_title
{extra_stuff_for_document_head ""}
@@ -266,7 +266,7 @@
return $html
}
-ad_proc ad_footer {
+ad_proc -deprecated ad_footer {
{signatory ""}
{suppress_curriculum_bar_p 0}
} {
@@ -313,13 +313,13 @@
# the way a page works, they should see a link to the
# email address of the programmer who can fix the page).
-ad_proc ad_admin_owner {} {
+ad_proc -public ad_admin_owner {} {
@return E-mail address of the Administrator of this site.
} {
return [ad_parameter -package_id [ad_acs_kernel_id] AdminOwner]
}
-ad_proc ad_admin_header {
+ad_proc -deprecated ad_admin_header {
{-focus ""}
page_title
} "" {
@@ -333,7 +333,7 @@
return [ad_header_with_extra_stuff -focus $focus $page_title]
}
-ad_proc ad_admin_footer {} {
+ad_proc -deprecated ad_admin_footer {} {
Signs pages with ad_admin_owner (usually a programmer who can fix
bugs) rather than the signatory of the user pages
} {
@@ -349,7 +349,7 @@