Index: openacs-4/readme.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/readme.txt,v diff -u -N -r1.8 -r1.9 --- openacs-4/readme.txt 11 Nov 2003 12:56:12 -0000 1.8 +++ openacs-4/readme.txt 11 Dec 2003 21:39:42 -0000 1.9 @@ -1,6 +1,6 @@ This is the OpenACS - the Open Architecture Community System. -Version 5.0.0 beta 1 +Version 5.0.0 beta 4 -------------- Index: openacs-4/contrib/obsolete-packages/library/library.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/library/library.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/library/library.info 2 Jul 2003 12:19:40 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/library/library.info 11 Dec 2003 21:39:43 -0000 1.2 @@ -1,18 +1,18 @@ - + Library Libraries f f - + oracle postgresql - Dirk Gomez + Dirk Gomez Red Hat Knowledge Library for ACS4.0 Red Hat Knowledge Library for ACS4.0 Index: openacs-4/contrib/packages/acknowledgement/acknowledgement.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/acknowledgement/acknowledgement.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/acknowledgement/acknowledgement.info 10 Oct 2003 14:46:42 -0000 1.1 +++ openacs-4/contrib/packages/acknowledgement/acknowledgement.info 11 Dec 2003 21:39:42 -0000 1.2 @@ -12,7 +12,7 @@ Peter Alberer Ask system users for acknowledgements 2003-10-08 - Ask system users for acknowledgements + Ask system users for acknowledgements such as acceptance of a privacy policy or terms of use. The users acceptance is logged and can be checked via a simple API call. Index: openacs-4/contrib/packages/acs-mail-lite/acs-mail-lite.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/acs-mail-lite/Attic/acs-mail-lite.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/acs-mail-lite/acs-mail-lite.info 1 Oct 2003 05:29:13 -0000 1.1 +++ openacs-4/contrib/packages/acs-mail-lite/acs-mail-lite.info 11 Dec 2003 21:39:42 -0000 1.2 @@ -12,7 +12,7 @@ Timo Hentschel Simplified reliable email transmission. 2003-06-16 - This package provides a simple ns_sendmail-like interface for sending messages, but queues messages in the database to ensure reliable sending and make sending a message 'transactional'. + This package provides a simple ns_sendmail-like interface for sending messages, but queues messages in the database to ensure reliable sending and make sending a message 'transactional'. Modified version of the canonical acs-mail-lite package from openacs. Index: openacs-4/contrib/packages/bcds/bcds.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcds/bcds.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/bcds/bcds.info 14 May 2003 15:30:01 -0000 1.1 +++ openacs-4/contrib/packages/bcds/bcds.info 11 Dec 2003 21:39:42 -0000 1.2 @@ -9,8 +9,8 @@ ghost bear - A presentation system for Content Repository. - A presentation system for Content Repository. Normally used together with Basic Content Management System + A presentation system for the Content Repository. + A presentation system for Content Repository. Normally used together with Basic Content Management System (BCMS). Index: openacs-4/contrib/packages/bcms/bcms.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms/bcms.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/bcms/bcms.info 3 Dec 2003 16:38:26 -0000 1.3 +++ openacs-4/contrib/packages/bcms/bcms.info 11 Dec 2003 21:39:42 -0000 1.4 @@ -9,9 +9,9 @@ Jun Yamog - Basic CMS is a small layer on top of Content Repository to manipulate its data model + Basic CMS is a thin layer on top of Content Repository to manipulate its data model. 2003-04-26 - Basic CMS is a small layer on top of Content Repository to manipulate its data model + Basic CMS is a thin layer on top of Content Repository to manipulate its data model. Index: openacs-4/contrib/packages/bcms-ui-wizard/bcms-ui-wizard.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/bcms-ui-wizard/bcms-ui-wizard.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/bcms-ui-wizard/bcms-ui-wizard.info 14 May 2003 15:36:17 -0000 1.1 +++ openacs-4/contrib/packages/bcms-ui-wizard/bcms-ui-wizard.info 11 Dec 2003 21:39:42 -0000 1.2 @@ -11,7 +11,7 @@ Jun Yamog A BCMS UI implementation that makes use of wizard 2003-04-26 - A BCMS UI implementation that makes use of wizard + A BCMS UI implementation that makes use of wizard. Index: openacs-4/contrib/packages/classified-ads/classified-ads.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/classified-ads/classified-ads.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/contrib/packages/classified-ads/classified-ads.info 21 Aug 2003 02:02:51 -0000 1.4 +++ openacs-4/contrib/packages/classified-ads/classified-ads.info 11 Dec 2003 21:39:42 -0000 1.5 @@ -10,7 +10,7 @@ Roberto Mello Deds Castillo - Classified Ads Package + User entered classified ads. 2003-08-08 Infiniteinfo This package implements a generic classified ads module using the content repository. It features categorization, adding of custom fields, etc. Index: openacs-4/contrib/packages/events/events.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/events/events.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/contrib/packages/events/events.info 13 Oct 2003 13:23:47 -0000 1.6 +++ openacs-4/contrib/packages/events/events.info 11 Dec 2003 21:39:42 -0000 1.7 @@ -13,7 +13,7 @@ postgresql Michael Steigman - This software module gives organizations a way to register people for events such as a lecture series or a social gathering online. + Event registration and management such as a lecture series or a social gathering online. Organizations often have a number of set events which they like to repeat. For example, a company may have a certain presentation which it makes over and over. A photoraphy club may hold monthly outings. A marathon race could occur annually. The Events package provides a way to coordinate activities, venues, and users via a web page. This is a port of the ACS Classic 3.x events package originally written by Arsdigita. See package documentation for more info. Index: openacs-4/contrib/packages/form-to-mail/form-to-mail.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/form-to-mail/form-to-mail.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/form-to-mail/form-to-mail.info 30 Jul 2003 21:09:55 -0000 1.1 +++ openacs-4/contrib/packages/form-to-mail/form-to-mail.info 11 Dec 2003 21:39:42 -0000 1.2 @@ -12,14 +12,12 @@ Steve Ivy Form-to-Email Handling 2003-07-09 - <p>The Form-To-Mail package is designed to work somewhat like formmail.pl - the user enters information into an HTML form on a page, and upon submitting the page the data is collected and emailed to an address - of the administrator&#39;s choosing. -</p> - <p>Form-to-Mail (FTM) is designed with reuse, and hopefully some security, in mind. Email addresses such as sender and recipient are configured by the administrator, stored in the database, and cannnot be overridden by form variables, whic -h limits abuse of the form by third parties. -</p> - <p>FTM is designed to be included on other pages in the site, and provides a facility for adding custom form elements to the form, using a .tcl file that can be as simple or complex as the developer requires. The package uses a single inst -ance to generate the included HTML form, and to process the submitted form. + <p>The Form-To-Mail package is designed to work somewhat like formmail.pl - the user enters information into an HTML form on a page, and upon submitting the page the data is collected and emailed to an address + of the administrator&#39;s choosing. +</p> + <p>Form-to-Mail (FTM) is designed with reuse, and hopefully some security, in mind. Email addresses such as sender and recipient are configured by the administrator, stored in the database, and cannnot be overridden by form variables, which limits abuse of the form by third parties. +</p> + <p>FTM is designed to be included on other pages in the site, and provides a facility for adding custom form elements to the form, using a .tcl file that can be as simple or complex as the developer requires. The package uses a single instance to generate the included HTML form, and to process the submitted form. </p> Index: openacs-4/contrib/packages/general-comments/general-comments.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/general-comments/Attic/general-comments.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/general-comments/general-comments.info 5 Jun 2003 00:48:39 -0000 1.2 +++ openacs-4/contrib/packages/general-comments/general-comments.info 11 Dec 2003 21:39:42 -0000 1.3 @@ -1,7 +1,7 @@ - + General Comments General Comments f @@ -14,10 +14,10 @@ postgresql Don Baccus - Provides commenting facility on objects. + CONTRIB: Provides commenting facility on objects. 2003-01-30 OpenACS - + Modified version of the standard general comments package Index: openacs-4/contrib/packages/irc-logger/irc-logger.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/irc-logger.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/irc-logger/irc-logger.info 10 Mar 2003 20:27:32 -0000 1.3 +++ openacs-4/contrib/packages/irc-logger/irc-logger.info 11 Dec 2003 21:39:42 -0000 1.4 @@ -13,7 +13,7 @@ postgresql Bart Teeuwisse - The IRC logger places the log files of logger (a Perl script by Dave Beckett) into ETP for integration with OpenACS. + The IRC logger uses the logger perl script to feed ETP for integration with OpenACS. 2003-02-21 the Code Mill The IRC logger places the log files of <a href="http://cvs.ilrt.org/cvsweb/redland/logger/">logger</a> (a Perl script by Dave Beckett) into ETP for integration with OpenACS. Besides logger, this package also depends on <a href="http://www.tdom.org/">tDOM</a> (high performance XML data processing with easy and powerful Tcl scripting functionality). Index: openacs-4/contrib/packages/jabber/jabber.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/jabber/Attic/jabber.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/jabber/jabber.info 1 Oct 2003 04:35:33 -0000 1.1 +++ openacs-4/contrib/packages/jabber/jabber.info 11 Dec 2003 21:39:43 -0000 1.2 @@ -13,7 +13,7 @@ postgresql Sussdorff-Roy GbR - Package for comunication based on Jabber Server. + Package for Messaging based on the Jabber Server. 2003-03-06 Sussdorff-Roy GbR This package allows users to communicate through the different IM services with other users using the jabber server. Index: openacs-4/contrib/packages/mail-links/mail-links.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/mail-links/mail-links.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/mail-links/mail-links.info 1 Oct 2003 04:58:31 -0000 1.1 +++ openacs-4/contrib/packages/mail-links/mail-links.info 11 Dec 2003 21:39:43 -0000 1.2 @@ -10,8 +10,8 @@ Timo Hentschel - The Clickthrough package provides a service that allows a site to monitor how its users exit the site, by recording which email-links are followed to external sites. - The Clickthrough package provides a service that allows a site to monitor how its users exit the site, by recording which email-links are followed to external sites. + Record which email-links are followed to external sites. + The Mail Clickthrough package provides a service that allows a site to monitor how its users exit the site, by recording which email-links are followed to external sites. Index: openacs-4/contrib/packages/mailing-lists/mailing-lists.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/mailing-lists/mailing-lists.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/mailing-lists/mailing-lists.info 1 Oct 2003 05:38:54 -0000 1.2 +++ openacs-4/contrib/packages/mailing-lists/mailing-lists.info 11 Dec 2003 21:39:43 -0000 1.3 @@ -1,17 +1,17 @@ - + Mailing List Mailing Lists f f - + Timo Hentschel - ACS 4 mailing list package. + Mailing list management. 2003-02-27 - Sussdorff-Roy + Sussdorff-Roy GbR First version of mailing lists. Index: openacs-4/contrib/packages/photobook/photobook.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/photobook/photobook.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/photobook/photobook.info 3 Nov 2003 20:10:55 -0000 1.1 +++ openacs-4/contrib/packages/photobook/photobook.info 11 Dec 2003 21:39:43 -0000 1.2 @@ -12,13 +12,13 @@ Jeff Davis Enter, manage, and present user data appropriate for a "face book" 2003-11-03 - Enter, manage, and present user data appropriate for -generation of a "facebook" or general user profile. -Allows upload of a photo portrait as well as general education/work history. - -PLEASE NOTE - although this module is in use at Sloan, it is far from finished. Sloan still plans to add many features, including the ability to dynamically manage fields and categories, and awareness of user types. In addition the package needs to be internationalized and ported to Postgres. There is also Sloan-specific code here, related to the Email For Life program, which needs to be parameterized or removed. - -In short, this package is provided more for looking at than for using; it will change significantly in future releases. + Enter, manage, and present user data appropriate for +generation of a "facebook" or general user profile. +Allows upload of a photo portrait as well as general education/work history. +<p> +PLEASE NOTE - although this module is in use at Sloan, it is far from finished. Sloan still plans to add many features, including the ability to dynamically manage fields and categories, and awareness of user types. In addition the package needs to be internationalized and ported to Postgres. There is also Sloan-specific code here, related to the Email For Life program, which needs to be parameterized or removed. +<p> +In short, this package is provided more for looking at than for using and will change significantly in future releases. Index: openacs-4/contrib/packages/populate/populate.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/populate/populate.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/populate/populate.info 27 Jan 2003 20:23:01 -0000 1.1 +++ openacs-4/contrib/packages/populate/populate.info 11 Dec 2003 21:39:43 -0000 1.2 @@ -13,8 +13,8 @@ postgresql Don Baccus - Populate database - This package provides a convenient web-based UI which allows one to populate the database with large numbers of users, groups, etc. + Populate database with test data. + This package provides a convenient web-based UI which allows one to populate the database with large numbers of users, groups, etc for scalability testing. Index: openacs-4/contrib/packages/populate/tcl/populate-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/populate/tcl/populate-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/populate/tcl/populate-procs.tcl 17 Feb 2003 03:04:55 -0000 1.2 +++ openacs-4/contrib/packages/populate/tcl/populate-procs.tcl 11 Dec 2003 21:39:44 -0000 1.3 @@ -25,7 +25,8 @@ apm_package_create_instance -package_id $package_id subsite_$package_id $context_id acs-subsite site_node::mount -node_id $node_id -object_id $package_id site_node::update_cache -node_id $node_id - apm_package_call_post_instantiation_proc $package_id acs-subsite + apm_invoke_callback_proc -package_key acs-subsite -type "after-instantiate" -arg_list [list package_id $package_id] + # apm_package_call_post_instantiation_proc $package_id acs-subsite } # Fill in the subtree Index: openacs-4/contrib/packages/portal/portal.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/portal/portal.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/portal/portal.info 31 Oct 2002 04:06:25 -0000 1.2 +++ openacs-4/contrib/packages/portal/portal.info 11 Dec 2003 21:39:44 -0000 1.3 @@ -16,7 +16,7 @@ yon Portals 2001-02-20 - OpenForce, Inc. + OpenACS Portals are used to aggregate content from different sources within a single page. Props to Ian Baker for "Portal". 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 -N -r1.12 -r1.13 --- openacs-4/contrib/packages/project-manager/project-manager.info 8 Oct 2003 21:37:09 -0000 1.12 +++ openacs-4/contrib/packages/project-manager/project-manager.info 11 Dec 2003 21:39:44 -0000 1.13 @@ -9,26 +9,27 @@ Jade Rubick - Project management for OpenACS + Project management tool for OpenACS 2003-10-08 - http://openacs.org/projects/dotwrk/project_management/ + Track tasks, estimates and actual progress for a project. See the <a href="http://openacs.org/projects/dotwrk/project_management/">project page</a> for more information. + - + + + - - + - - + Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-drop.sql,v diff -u -N -r1.10 -r1.11 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql 15 Sep 2003 23:09:56 -0000 1.10 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-drop.sql 11 Dec 2003 21:39:44 -0000 1.11 @@ -1,151 +1,159 @@ --- packages/project-manager/sql/project-manager-drop.sql --- drop script --- --- @author jade@bread.com --- @creation-date 2003-05-15 --- @cvs-id $Id$ --- - --------- --- TASKS --------- - --- task dependency types -drop table pm_task_dependency_types cascade; -drop table pm_task_dependency cascade; -drop sequence pm_task_dependency_seq; -drop sequence pm_tasks_number_seq; - -------------- --- WORKGROUPS -------------- - -drop sequence pm_workgroup_seq; -drop table pm_workgroup_parties; -drop table pm_workgroup; - ------------- --- PROCESSES ------------- - -drop sequence pm_process_seq; -drop sequence pm_process_task_seq; -drop sequence pm_process_task_dependency_seq; - -drop table pm_process_task_assignment; -drop table pm_process_task_dependency; -drop table pm_process_task; -drop table pm_process; - ---------- --- OTHERS ---------- -drop table pm_default_roles; -drop table pm_project_assignment; -drop table pm_task_assignment; -drop table pm_roles; -drop sequence pm_role_seq; - - -create function inline_0 () -returns integer as ' -declare - v_item RECORD; - -begin - for v_item in select - item_id - from - cr_items - where - content_type = ''pm_task'' - LOOP - PERFORM pm_task__delete_task_item(v_item.item_id); - end loop; - - return 0; -end; -' language 'plpgsql'; - -select inline_0(); -drop function inline_0(); - -select drop_package('pm_task'); - - ------------ --- PROJECTS ------------ - ---drop permissions -delete from acs_permissions where object_id in (select project_id from pm_projects); - --- unregister content_types from folder -create function inline_0 () -returns integer as ' -declare - v_folder_id cr_folders.folder_id%TYPE; - v_item_id cr_items.item_id%TYPE; - v_item_cursor RECORD; -begin - - -- delete all contents of projects folder - FOR v_item_cursor IN - select - item_id - from - cr_items - where - content_type = ''pm_project'' - LOOP - PERFORM pm_project__delete_project_item(v_item_cursor.item_id); - END LOOP; - - select content_item__get_id(''projects'', null, ''f'') into v_folder_id from dual; - - -- unregister_content_types - PERFORM content_folder__unregister_content_type ( - v_folder_id, -- folder_id - ''pm_project'', -- content_type - ''t'' -- include_subtypes - ); - - -- this table must not hold reference to ''pm_project'' type - delete from cr_folder_type_map where content_type = ''pm_project''; - - -- delete projects folder - PERFORM content_folder__delete(v_folder_id); - - -- delete the content folders - FOR v_item_cursor IN - select f.folder_id - from cr_folders f, - cr_items i - where f.folder_id = i.item_id and - description = ''Project Repository'' - LOOP - PERFORM content_item__delete(v_item_cursor.folder_id); - END LOOP; - - return 0; -end; -' language 'plpgsql'; - -select inline_0(); -drop function inline_0(); - --- drop package, which drops all functions created with define_function_args -select drop_package('pm_project'); - ---drop table -drop table pm_projects cascade; - -select content_type__drop_type('pm_task', 't', 'f'); - -drop table pm_tasks cascade; -drop table pm_tasks_revisions cascade; - -select content_type__drop_type('pm_project', 't', 'f'); - --- note that the Project Repository folder is not deleted - +-- packages/project-manager/sql/project-manager-drop.sql +-- drop script +-- +-- @author jade@bread.com +-- @creation-date 2003-05-15 +-- @cvs-id $Id$ +-- + +-------- +-- TASKS +-------- + +-- task dependency types +drop table pm_task_dependency_types cascade; +drop table pm_task_dependency cascade; +drop sequence pm_task_dependency_seq; +drop sequence pm_tasks_number_seq; + +------------- +-- WORKGROUPS +------------- + +drop sequence pm_workgroup_seq; +drop table pm_workgroup_parties; +drop table pm_workgroup; + +------------ +-- PROCESSES +------------ + +drop sequence pm_process_seq; +drop sequence pm_process_task_seq; +drop sequence pm_process_task_dependency_seq; + +drop table pm_process_task_assignment; +drop table pm_process_task_dependency; +drop table pm_process_task; +drop table pm_process; + +--------- +-- OTHERS +--------- +drop table pm_default_roles; +drop table pm_project_assignment; +drop table pm_task_assignment; +drop table pm_roles; +drop sequence pm_role_seq; + + +create function inline_0 () +returns integer as ' +declare + v_item RECORD; + +begin + for v_item in select + item_id + from + cr_items + where + content_type = ''pm_task'' + LOOP + PERFORM pm_task__delete_task_item(v_item.item_id); + end loop; + + return 0; +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +select drop_package('pm_task'); + + +----------- +-- PROJECTS +----------- + +--drop permissions +delete from acs_permissions where object_id in (select project_id from pm_projects); + +-- unregister content_types from folder +create function inline_0 () +returns integer as ' +declare + v_folder_id cr_folders.folder_id%TYPE; + v_item_id cr_items.item_id%TYPE; + v_item_cursor RECORD; +begin + + -- delete all contents of projects folder + FOR v_item_cursor IN + select + item_id + from + cr_items + where + content_type = ''pm_project'' + LOOP + PERFORM pm_project__delete_project_item(v_item_cursor.item_id); + END LOOP; + + select content_item__get_id(''projects'', null, ''f'') into v_folder_id from dual; + + -- unregister_content_types + PERFORM content_folder__unregister_content_type ( + v_folder_id, -- folder_id + ''pm_project'', -- content_type + ''t'' -- include_subtypes + ); + + -- this table must not hold reference to ''pm_project'' type + delete from cr_folder_type_map where content_type = ''pm_project''; + + -- delete projects folder + PERFORM content_folder__delete(v_folder_id); + + -- delete the content folders + FOR v_item_cursor IN + select f.folder_id + from cr_folders f, + cr_items i + where f.folder_id = i.item_id and + description = ''Project Repository'' + LOOP + PERFORM content_item__delete(v_item_cursor.folder_id); + END LOOP; + + return 0; +end; +' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +-- drop package, which drops all functions created with define_function_args +select drop_package('pm_project'); + +--drop table +drop table pm_projects cascade; + +drop sequence pm_project_status_seq; +drop table pm_project_status; + +drop table pm_project_category_map; + +drop sequence pm_project_category_seq; +drop table pm_project_category; + +select content_type__drop_type('pm_task', 't', 'f'); + +drop table pm_tasks cascade; +drop table pm_tasks_revisions cascade; + +select content_type__drop_type('pm_project', 't', 'f'); + +-- note that the Project Repository folder is not deleted + Index: openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/sql/postgresql/Attic/project-manager-functions-create.sql,v diff -u -N -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 26 Nov 2003 13:33:23 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-functions-create.sql 11 Dec 2003 21:39:44 -0000 1.10 @@ -36,30 +36,30 @@ create function pm_project__new_root_folder (integer) returns integer as ' declare - p_package_id alias for $1; + p_package_id alias for $1; - v_folder_id cr_folders.folder_id%TYPE; - v_folder_name cr_items.name%TYPE; + v_folder_id cr_folders.folder_id%TYPE; + v_folder_name cr_items.name%TYPE; begin -- raise notice ''in new root folder''; - -- Set the folder name - v_folder_name := pm_project__new_unique_name (p_package_id); + -- Set the folder name + v_folder_name := pm_project__new_unique_name (p_package_id); - v_folder_id := content_folder__new ( - v_folder_name, -- name - ''Projects'', -- label - ''Project Repository'', -- description - null -- parent_id - ); + v_folder_id := content_folder__new ( + v_folder_name, -- name + ''Projects'', -- label + ''Project Repository'', -- description + null -- parent_id + ); - -- Register the standard content types + -- Register the standard content types PERFORM content_folder__register_content_type ( v_folder_id, -- folder_id ''pm_project'', -- content_type ''f'' -- include_subtypes - ); + ); -- there is no facility in the API for adding in the package_id, -- so we have to do it ourselves @@ -68,9 +68,9 @@ set package_id = p_package_id where folder_id = v_folder_id; - -- TODO: Handle Permissions here for this folder. + -- TODO: Handle Permissions here for this folder. - return v_folder_id; + return v_folder_id; end;' language 'plpgsql'; @@ -83,32 +83,32 @@ create function pm_project__get_root_folder (integer, boolean) returns integer as ' declare - p_package_id alias for $1; + p_package_id alias for $1; p_create_if_not_present_p alias for $2; - v_folder_id cr_folders.folder_id%TYPE; - v_count integer; + v_folder_id cr_folders.folder_id%TYPE; + v_count integer; begin -- raise notice ''in get root folder p_create_if_not_present_p = %'',p_create_if_not_present_p; - select count(*) into v_count - from cr_folders - where package_id = p_package_id; + select count(*) into v_count + from cr_folders + where package_id = p_package_id; -- raise notice ''count is % for package_id %'', v_count, p_package_id; - if v_count > 1 then + if v_count > 1 then raise exception ''More than one project repository for this application instance''; - elsif v_count = 1 then + elsif v_count = 1 then select folder_id into v_folder_id from cr_folders where package_id = p_package_id; - else + else if p_create_if_not_present_p = true then - -- Must be a new instance. Create a new root folder. + -- Must be a new instance. Create a new root folder. raise notice ''creating a new root repository folder''; - v_folder_id := pm_project__new_root_folder(p_package_id); + v_folder_id := pm_project__new_root_folder(p_package_id); else -- raise notice ''setting to null''; v_folder_id := null; @@ -117,7 +117,7 @@ -- raise notice ''v_folder_id is %'', v_folder_id; - return v_folder_id; + return v_folder_id; end; ' language 'plpgsql'; @@ -130,49 +130,51 @@ -- is null. Otherwise a project folder will be created as a sub-folder -- of an existing project folder. -select define_function_args('pm_project__new_project_item', 'project_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, creation_date, creation_user, creation_ip, package_id'); +select define_function_args('pm_project__new_project_item', 'project_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, creation_date, creation_user, creation_ip, package_id'); create function pm_project__new_project_item ( - integer, -- project_id - varchar, -- project_name - varchar, -- project_code - integer, -- parent_id - varchar, -- goal - varchar, -- description - timestamptz, -- planned_start_date - timestamptz, -- planned_end_date - timestamptz, -- actual_start_date - timestamptz, -- actual_end_date - char(1), -- ongoing_p - timestamptz, -- creation_date - integer, -- creation_user - varchar, -- creation_ip - integer -- package_id + integer, -- project_id + varchar, -- project_name + varchar, -- project_code + integer, -- parent_id + varchar, -- goal + varchar, -- description + timestamptz, -- planned_start_date + timestamptz, -- planned_end_date + timestamptz, -- actual_start_date + timestamptz, -- actual_end_date + char(1), -- ongoing_p + integer, -- status_id + timestamptz, -- creation_date + integer, -- creation_user + varchar, -- creation_ip + integer -- package_id ) returns integer as ' declare - p_project_id alias for $1; - p_project_name alias for $2; - p_project_code alias for $3; - p_parent_id alias for $4; - p_goal alias for $5; - p_description alias for $6; - p_planned_start_date alias for $7; - p_planned_end_date alias for $8; - p_actual_start_date alias for $9; - p_actual_end_date alias for $10; - p_ongoing_p alias for $11; - p_creation_date alias for $12; - p_creation_user alias for $13; - p_creation_ip alias for $14; - p_package_id alias for $15; + p_project_id alias for $1; + p_project_name alias for $2; + p_project_code alias for $3; + p_parent_id alias for $4; + p_goal alias for $5; + p_description alias for $6; + p_planned_start_date alias for $7; + p_planned_end_date alias for $8; + p_actual_start_date alias for $9; + p_actual_end_date alias for $10; + p_ongoing_p alias for $11; + p_status_id alias for $12; + p_creation_date alias for $13; + p_creation_user alias for $14; + p_creation_ip alias for $15; + p_package_id alias for $16; - v_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_id cr_items.item_id%TYPE; - v_parent_id cr_items.parent_id%TYPE; + v_item_id cr_items.item_id%TYPE; + v_revision_id cr_revisions.revision_id%TYPE; + v_id cr_items.item_id%TYPE; + v_parent_id cr_items.parent_id%TYPE; begin - select acs_object_id_seq.nextval into v_id from dual; + select acs_object_id_seq.nextval into v_id from dual; v_parent_id := pm_project__get_root_folder (p_package_id, ''t''); @@ -185,64 +187,64 @@ -- raise notice ''v_parent_id (%) p_parent_id (%)'', v_parent_id, p_parent_id; - v_item_id := content_item__new ( - v_id::varchar, -- name - v_parent_id, -- parent_id - v_id, -- item_id - null, -- locale - now(), -- creation_date - p_creation_user, -- creation_user - p_parent_id, -- context_id - p_creation_ip, -- creation_ip - ''content_item'', -- item_subtype - ''pm_project'', -- content_type - p_project_name, -- title - p_description, -- description - ''text/plain'', -- mime_type - null, -- nls_language - null -- data - ); + v_item_id := content_item__new ( + v_id::varchar, -- name + v_parent_id, -- parent_id + v_id, -- item_id + null, -- locale + now(), -- creation_date + p_creation_user, -- creation_user + p_parent_id, -- context_id + p_creation_ip, -- creation_ip + ''content_item'', -- item_subtype + ''pm_project'', -- content_type + p_project_name, -- title + p_description, -- description + ''text/plain'', -- mime_type + null, -- nls_language + null -- data + ); - v_revision_id := content_revision__new ( - p_project_name, -- title - p_description, -- description - now(), -- publish_date - ''text/plain'', -- mime_type - NULL, -- nls_language - NULL, -- data - v_item_id, -- item_id - NULL, -- revision_id - now(), -- creation_date - p_creation_user, -- creation_user - p_creation_ip -- creation_ip - ); + v_revision_id := content_revision__new ( + p_project_name, -- title + p_description, -- description + now(), -- publish_date + ''text/plain'', -- mime_type + NULL, -- nls_language + NULL, -- data + v_item_id, -- item_id + NULL, -- revision_id + now(), -- creation_date + p_creation_user, -- creation_user + p_creation_ip -- creation_ip + ); - PERFORM content_item__set_live_revision (v_revision_id); + PERFORM content_item__set_live_revision (v_revision_id); - insert into pm_projects ( - project_id, project_code, - goal, planned_start_date, - planned_end_date, actual_start_date, actual_end_date, - ongoing_p, estimated_finish_date, + insert into pm_projects ( + project_id, project_code, + goal, planned_start_date, + planned_end_date, actual_start_date, actual_end_date, + ongoing_p, estimated_finish_date, earliest_finish_date, latest_finish_date, actual_hours_completed, - estimated_hours_total) - values ( - v_revision_id, p_project_code, - p_goal, p_planned_start_date, - p_planned_end_date, p_actual_start_date, - p_actual_end_date, p_ongoing_p, p_planned_end_date, + estimated_hours_total, status_id) + values ( + v_revision_id, p_project_code, + p_goal, p_planned_start_date, + p_planned_end_date, p_actual_start_date, + p_actual_end_date, p_ongoing_p, p_planned_end_date, p_planned_end_date, p_planned_end_date, ''0'', - ''0'' + ''0'', p_status_id ); - PERFORM acs_permission__grant_permission( - v_revision_id, - p_creation_user, - ''admin'' - ); + PERFORM acs_permission__grant_permission( + v_revision_id, + p_creation_user, + ''admin'' + ); - return v_revision_id; + return v_revision_id; end;' language 'plpgsql'; @@ -253,13 +255,13 @@ create or replace function pm_project__delete_project_item (integer) returns integer as ' declare - p_project_id alias for $1; + p_project_id alias for $1; v_child cr_items%ROWTYPE; begin raise NOTICE ''Deleting pm_project...''; - delete from acs_permissions - where object_id = p_project_id; + delete from acs_permissions + where object_id = p_project_id; for v_child in select item_id @@ -272,90 +274,92 @@ PERFORM pm_project__delete_project_item(v_child.item_id); end loop; - delete from pm_projects - where project_id = p_project_id; + delete from pm_projects + where project_id = p_project_id; PERFORM content_item__delete(p_project_id); return 0; end;' language 'plpgsql'; -select define_function_args('pm_project__new_project_revision', 'item_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, creation_date, creation_user, creation_ip, package_id'); +select define_function_args('pm_project__new_project_revision', 'item_id, project_name, project_code, parent_id, goal, description, planned_start_date, planned_end_date, actual_start_date, actual_end_date, ongoing_p, status_id, creation_date, creation_user, creation_ip, package_id'); create function pm_project__new_project_revision ( - integer, -- item_id - varchar, -- project_name - varchar, -- project_code - integer, -- parent_id - varchar, -- goal - varchar, -- description - timestamptz, -- planned_start_date - timestamptz, -- planned_end_date - timestamptz, -- actual_start_date - timestamptz, -- actual_end_date - char(1), -- ongoing_p - timestamptz, -- creation_date - integer, -- creation_user - varchar, -- creation_ip + integer, -- item_id + varchar, -- project_name + varchar, -- project_code + integer, -- parent_id + varchar, -- goal + varchar, -- description + timestamptz, -- planned_start_date + timestamptz, -- planned_end_date + timestamptz, -- actual_start_date + timestamptz, -- actual_end_date + char(1), -- ongoing_p + integer, -- status_id + timestamptz, -- creation_date + integer, -- creation_user + varchar, -- creation_ip integer -- package_id ) returns integer as ' declare - p_item_id alias for $1; - p_project_name alias for $2; - p_project_code alias for $3; - p_parent_id alias for $4; - p_goal alias for $5; - p_description alias for $6; - p_planned_start_date alias for $7; - p_planned_end_date alias for $8; - p_actual_start_date alias for $9; - p_actual_end_date alias for $10; - p_ongoing_p alias for $11; - p_creation_date alias for $12; - p_creation_user alias for $13; - p_creation_ip alias for $14; - p_package_id alias for $15; + p_item_id alias for $1; + p_project_name alias for $2; + p_project_code alias for $3; + p_parent_id alias for $4; + p_goal alias for $5; + p_description alias for $6; + p_planned_start_date alias for $7; + p_planned_end_date alias for $8; + p_actual_start_date alias for $9; + p_actual_end_date alias for $10; + p_ongoing_p alias for $11; + p_status_id alias for $12; + p_creation_date alias for $13; + p_creation_user alias for $14; + p_creation_ip alias for $15; + p_package_id alias for $16; - v_revision_id cr_revisions.revision_id%TYPE; + v_revision_id cr_revisions.revision_id%TYPE; begin -- the item_id is the project_id - v_revision_id := content_revision__new ( - p_project_name, -- title - p_description, -- description - now(), -- publish_date - ''text/plain'', -- mime_type - NULL, -- nls_language - NULL, -- data - p_item_id, -- item_id - NULL, -- revision_id - now(), -- creation_date - p_creation_user, -- creation_user - p_creation_ip -- creation_ip - ); + v_revision_id := content_revision__new ( + p_project_name, -- title + p_description, -- description + now(), -- publish_date + ''text/plain'', -- mime_type + NULL, -- nls_language + NULL, -- data + p_item_id, -- item_id + NULL, -- revision_id + now(), -- creation_date + p_creation_user, -- creation_user + p_creation_ip -- creation_ip + ); - PERFORM content_item__set_live_revision (v_revision_id); + PERFORM content_item__set_live_revision (v_revision_id); - insert into pm_projects ( - project_id, project_code, - goal, planned_start_date, - planned_end_date, actual_start_date, actual_end_date, - ongoing_p) - values ( - v_revision_id, p_project_code, - p_goal, p_planned_start_date, - p_planned_end_date, p_actual_start_date, - p_actual_end_date, p_ongoing_p); + insert into pm_projects ( + project_id, project_code, + goal, planned_start_date, + planned_end_date, actual_start_date, actual_end_date, + ongoing_p, status_id) + values ( + v_revision_id, p_project_code, + p_goal, p_planned_start_date, + p_planned_end_date, p_actual_start_date, + p_actual_end_date, p_ongoing_p, p_status_id); - PERFORM acs_permission__grant_permission( - v_revision_id, - p_creation_user, - ''admin'' - ); + PERFORM acs_permission__grant_permission( + v_revision_id, + p_creation_user, + ''admin'' + ); - return v_revision_id; + return v_revision_id; end;' language 'plpgsql'; @@ -367,23 +371,23 @@ create function pm_project__new_unique_name (integer) returns text as ' declare - p_package_id alias for $1; + p_package_id alias for $1; - v_name cr_items.name%TYPE; - v_package_key apm_packages.package_key%TYPE; - v_id integer; + v_name cr_items.name%TYPE; + v_package_key apm_packages.package_key%TYPE; + v_id integer; begin - select package_key into v_package_key from apm_packages - where package_id = p_package_id; + select package_key into v_package_key from apm_packages + where package_id = p_package_id; - select acs_object_id_seq.nextval into v_id from dual; + select acs_object_id_seq.nextval into v_id from dual; - -- Set the name - select v_package_key || ''_'' || - to_char(current_timestamp, ''YYYYMMDD'') || ''_'' || - v_id into v_name; + -- Set the name + select v_package_key || ''_'' || + to_char(current_timestamp, ''YYYYMMDD'') || ''_'' || + v_id into v_name; - return v_name; + return v_name; end;' language 'plpgsql'; ---------------------------------- @@ -421,171 +425,171 @@ select define_function_args('pm_task__new_task_item', 'task_id, project_id, title, description, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, creation_date, creation_user, creation_ip, package_id'); create function pm_task__new_task_item ( - integer, -- task_id + integer, -- task_id integer, -- project_id varchar, -- title - varchar, -- description - timestamptz, -- end_date + varchar, -- description + timestamptz, -- end_date numeric, -- percent_complete numeric, -- estimated_hours_work numeric, -- estimated_hours_work_min numeric, -- estimated_hours_work_max, - timestamptz, -- creation_date - integer, -- creation_user - varchar, -- creation_ip - integer -- package_id + timestamptz, -- creation_date + integer, -- creation_user + varchar, -- creation_ip + integer -- package_id ) returns integer as ' declare p_task_id alias for $1; - p_project_id alias for $2; + p_project_id alias for $2; p_title alias for $3; - p_description alias for $4; - p_end_date alias for $5; + p_description alias for $4; + p_end_date alias for $5; p_percent_complete alias for $6; p_estimated_hours_work alias for $7; p_estimated_hours_work_min alias for $8; p_estimated_hours_work_max alias for $9; - p_creation_date alias for $10; - p_creation_user alias for $11; - p_creation_ip alias for $12; - p_package_id alias for $13; + p_creation_date alias for $10; + p_creation_user alias for $11; + p_creation_ip alias for $12; + p_package_id alias for $13; - v_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_id cr_items.item_id%TYPE; + v_item_id cr_items.item_id%TYPE; + v_revision_id cr_revisions.revision_id%TYPE; + v_id cr_items.item_id%TYPE; v_task_number integer; begin - select acs_object_id_seq.nextval into v_id from dual; + select acs_object_id_seq.nextval into v_id from dual; -- We want to put the task under the project item -- create the task_number - v_item_id := content_item__new ( - v_id::varchar, -- name - p_project_id, -- parent_id - v_id, -- item_id - null, -- locale - now(), -- creation_date - p_creation_user, -- creation_user + v_item_id := content_item__new ( + v_id::varchar, -- name + p_project_id, -- parent_id + v_id, -- item_id + null, -- locale + now(), -- creation_date + p_creation_user, -- creation_user p_package_id, -- context_id - p_creation_ip, -- creation_ip - ''content_item'', -- item_subtype - ''pm_task'', -- content_type - p_title, -- title - p_description, -- description - ''text/plain'', -- mime_type - null, -- nls_language - null -- data - ); + p_creation_ip, -- creation_ip + ''content_item'', -- item_subtype + ''pm_task'', -- content_type + p_title, -- title + p_description, -- description + ''text/plain'', -- mime_type + null, -- nls_language + null -- data + ); - v_revision_id := content_revision__new ( - p_title, -- title - p_description, -- description - now(), -- publish_date - ''text/plain'', -- mime_type - NULL, -- nls_language - NULL, -- data - v_item_id, -- item_id - NULL, -- revision_id - now(), -- creation_date - p_creation_user, -- creation_user - p_creation_ip -- creation_ip - ); + v_revision_id := content_revision__new ( + p_title, -- title + p_description, -- description + now(), -- publish_date + ''text/plain'', -- mime_type + NULL, -- nls_language + NULL, -- data + v_item_id, -- item_id + NULL, -- revision_id + now(), -- creation_date + p_creation_user, -- creation_user + p_creation_ip -- creation_ip + ); - PERFORM content_item__set_live_revision (v_revision_id); + PERFORM content_item__set_live_revision (v_revision_id); - insert into pm_tasks ( + insert into pm_tasks ( task_id, task_number) - values ( + values ( v_item_id, v_task_number); insert into pm_tasks_revisions ( task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked) values ( v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, ''0''); - PERFORM acs_permission__grant_permission( - v_revision_id, - p_creation_user, - ''admin'' - ); + PERFORM acs_permission__grant_permission( + v_revision_id, + p_creation_user, + ''admin'' + ); - return v_revision_id; + return v_revision_id; end;' language 'plpgsql'; select define_function_args('pm_task__new_task_revision', 'task_id, project_id, title, description, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked, creation_date, creation_user, creation_ip, package_id'); create function pm_task__new_task_revision ( - integer, -- task_id (the item_id) + integer, -- task_id (the item_id) integer, -- project_id varchar, -- title - varchar, -- description - timestamptz, -- end_date + varchar, -- description + timestamptz, -- end_date numeric, -- percent_complete numeric, -- estimated_hours_work numeric, -- estimated_hours_work_min numeric, -- estimated_hours_work_max numeric, -- actual_hours_worked - timestamptz, -- creation_date - integer, -- creation_user - varchar, -- creation_ip - integer -- package_id + timestamptz, -- creation_date + integer, -- creation_user + varchar, -- creation_ip + integer -- package_id ) returns integer as ' declare p_task_id alias for $1; - p_project_id alias for $2; + p_project_id alias for $2; p_title alias for $3; - p_description alias for $4; - p_end_date alias for $5; + p_description alias for $4; + p_end_date alias for $5; p_percent_complete alias for $6; p_estimated_hours_work alias for $7; p_estimated_hours_work_min alias for $8; p_estimated_hours_work_max alias for $9; p_actual_hours_worked alias for $10; - p_creation_date alias for $11; - p_creation_user alias for $12; - p_creation_ip alias for $13; - p_package_id alias for $14; + p_creation_date alias for $11; + p_creation_user alias for $12; + p_creation_ip alias for $13; + p_package_id alias for $14; - v_revision_id cr_revisions.revision_id%TYPE; - v_id cr_items.item_id%TYPE; + v_revision_id cr_revisions.revision_id%TYPE; + v_id cr_items.item_id%TYPE; begin - select acs_object_id_seq.nextval into v_id from dual; + select acs_object_id_seq.nextval into v_id from dual; -- We want to put the task under the project item - v_revision_id := content_revision__new ( - p_title, -- title - p_description, -- description - now(), -- publish_date - ''text/plain'', -- mime_type - NULL, -- nls_language - NULL, -- data - p_task_id, -- item_id - NULL, -- revision_id - now(), -- creation_date - p_creation_user, -- creation_user - p_creation_ip -- creation_ip - ); + v_revision_id := content_revision__new ( + p_title, -- title + p_description, -- description + now(), -- publish_date + ''text/plain'', -- mime_type + NULL, -- nls_language + NULL, -- data + p_task_id, -- item_id + NULL, -- revision_id + now(), -- creation_date + p_creation_user, -- creation_user + p_creation_ip -- creation_ip + ); - PERFORM content_item__set_live_revision (v_revision_id); + PERFORM content_item__set_live_revision (v_revision_id); insert into pm_tasks_revisions ( task_revision_id, end_date, percent_complete, estimated_hours_work, estimated_hours_work_min, estimated_hours_work_max, actual_hours_worked) values ( v_revision_id, p_end_date, p_percent_complete, p_estimated_hours_work, p_estimated_hours_work_min, p_estimated_hours_work_max, p_actual_hours_worked); - PERFORM acs_permission__grant_permission( - v_revision_id, - p_creation_user, - ''admin'' - ); + PERFORM acs_permission__grant_permission( + v_revision_id, + p_creation_user, + ''admin'' + ); - return v_revision_id; + return v_revision_id; end;' language 'plpgsql'; @@ -596,15 +600,15 @@ create or replace function pm_task__delete_task_item (integer) returns integer as ' declare - p_task_id alias for $1; + p_task_id alias for $1; begin -- will not work because permissions are on revision_id not -- item_id - -- delete from acs_permissions - -- where object_id = p_task_id; + -- delete from acs_permissions + -- where object_id = p_task_id; - delete from pm_tasks_revisions - where task_revision_id in (select revision_id from pm_tasks_revisionsx where item_id = p_task_id); + delete from pm_tasks_revisions + where task_revision_id in (select revision_id from pm_tasks_revisionsx where item_id = p_task_id); delete from pm_tasks where task_id = p_task_id; 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 -N -r1.15 -r1.16 --- openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 3 Oct 2003 22:21:45 -0000 1.15 +++ openacs-4/contrib/packages/project-manager/sql/postgresql/project-manager-table-create.sql 11 Dec 2003 21:39:44 -0000 1.16 @@ -14,6 +14,25 @@ -- PROJECTS +create sequence pm_project_status_seq start 3; + +create table pm_project_status ( + status_id integer + constraint pm_project_status_pk + primary key, + description varchar(100), + -- closed or open + status_type char(1) default 'c' + constraint pm_projects_status_type_ck + check (status_type in ('c','o')) +); + +insert into pm_project_status (status_id, description, status_type) values +(1, 'Open', 'o'); +insert into pm_project_status (status_id, description, status_type) values +(2, 'Closed', 'c'); + + create table pm_projects ( project_id integer constraint project_manager_id_fk @@ -27,6 +46,11 @@ planned_end_date timestamptz, actual_start_date timestamptz, actual_end_date timestamptz, + status_id integer + constraint pm_projects_status_id_nn + not null + constraint pm_projects_status_id_fk + references pm_project_status, ongoing_p char(1) default 'f' constraint pm_projects_ongoing_p_ck check (ongoing_p in ('t','f')), @@ -53,10 +77,9 @@ ); - -- ROLES -create sequence pm_role_seq start 3; +create sequence pm_role_seq start 4; create table pm_roles ( role_id integer @@ -78,15 +101,15 @@ or task. For example, they could be a manager, or client, or participant.. The sort order determines what order it is displayed in. The is_observer_p specifies whether they are directly - responsible for the task. People not directly responsible will not - get email notifications reminding them that tasks are overdue, for - example. + responsible for the task, or are just observers on it. '; -insert into pm_roles (role_id, one_line, description, sort_order) values ('1','Participant','Team members who are responsible for the completion of the project','10'); -insert into pm_roles (role_id, one_line, description, sort_order) values ('2','Manager','Manages the team to complete the project or task on time and on budget.','20'); +insert into pm_roles (role_id, one_line, description, sort_order) values ('1','Lead','Team members who are responsible for the completion of the project','10'); +insert into pm_roles (role_id, one_line, description, sort_order) values ('2','Player','A person on the team responsible for completion of the project','20'); +insert into pm_roles (role_id, one_line, description, sort_order, is_observer_p) values ('3','Watcher','A person interested in developments, possibly helping out on it.','30','t'); + create table pm_default_roles ( role_id integer constraint pm_default_role_fk Index: openacs-4/contrib/packages/project-manager/www/add-edit-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/add-edit-postgresql.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/www/add-edit-postgresql.xql 18 Sep 2003 23:33:54 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/www/add-edit-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.10 @@ -1,5 +1,36 @@ + + + SELECT + p.item_id as project_item_id, + p.parent_id, + p.project_id, + p.title as project_name, + p.project_code, + p.goal, + p.description, + p.status_id, + to_char(p.planned_start_date,'YYYY MM DD') as planned_start_date, + to_char(p.planned_end_date,'YYYY MM DD') as planned_end_date, + p.ongoing_p + FROM + pm_projectsx p + WHERE + p.item_id = :project_item_id and + p.project_id = :project_id + + + + + + SELECT + current_timestamp + FROM + pm_projects + + + select pm_project__new_project_item ( @@ -14,6 +45,7 @@ null, null, :ongoing_p, + :status_id, now(), :user_id, :peeraddr, @@ -36,6 +68,7 @@ null, null, :ongoing_p, + :status_id, now(), :user_id, :peeraddr, @@ -44,27 +77,6 @@ - - - SELECT - p.item_id as project_item_id, - p.parent_id, - p.project_id, - p.title as project_name, - p.project_code, - p.goal, - p.description, - to_char(p.planned_start_date,'YYYY MM DD') as planned_start_date, - to_char(p.planned_end_date,'YYYY MM DD') as planned_end_date, - p.ongoing_p - FROM - pm_projectsx p - WHERE - p.item_id = :project_item_id and - p.project_id = :project_id - - - SELECT @@ -76,4 +88,15 @@ + + + SELECT + description, status_id + FROM + pm_project_status + ORDER BY + status_type desc, description asc + + + 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 -N -r1.12 -r1.13 --- openacs-4/contrib/packages/project-manager/www/add-edit.tcl 18 Sep 2003 23:33:54 -0000 1.12 +++ openacs-4/contrib/packages/project-manager/www/add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.13 @@ -23,6 +23,7 @@ {planned_end_date ""} {deadline_scheduling ""} {ongoing_p ""} + {status_id ""} } -properties { @@ -58,87 +59,121 @@ } -ad_form -name add_edit -form { - project_id:key +ad_form -name add_edit \ + -form { + project_id:key + + {parent_id:text(hidden) + {value $parent_id} + } + + {project_item_id:text(hidden) + {value $project_item_id} + } + + {project_name:text + {label "[set project_term] name"} + {value $project_name} + } + + {description:text(textarea),optional + {label "Description"} + {value $description} + {html { rows 5 cols 40 wrap soft}}} + + {planned_start_date:date,to_sql(linear_date) + {label "Starts"} + {format "MONTH DD YYYY"} + {value {[util::date acquire clock [clock scan $planned_start_date]]}} + {today} + {help} + } + + {planned_end_date:date,to_sql(linear_date) + {label "Deadline"} + {format "MONTH DD YYYY"} + {value {[util::date acquire clock [clock scan $planned_end_date]]}} + {today} + {help} + } + + {ongoing_p:text(select) + {label "Project is ongoing?"} + {options {{"No" "f"} {"Yes" "t"}} {value $ongoing_p}} + {help_text "If yes, then this project has no deadline"} + } + + {status_id:text(select) + {label "Status"} + {options {[db_list_of_lists get_status_codes { }]}} + } - {parent_id:text(hidden) - {value $parent_id} } - {project_item_id:text(hidden) - {value $project_item_id} - } - {project_name:text - {label "[set project_term] name"} - {value $project_name} +if {[exists_and_not_null project_id]} { + 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 {$project_item_id $package_id}} + } + } } - - {description:text(textarea),optional - {label "Description"} - {value $description} - {html { rows 5 cols 40 wrap soft}}} - - {planned_start_date:date,to_sql(linear_date) - {label "Starts"} - {format "MONTH DD YYYY"} - {value {[util::date acquire clock [clock scan $planned_start_date]]}} - {today} - {help} +} else { + 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}} + } + } } - - {planned_end_date:date,to_sql(linear_date) - {label "Deadline"} - {format "MONTH DD YYYY"} - {value {[util::date acquire clock [clock scan $planned_end_date]]}} - {today} - {help} - } - - {ongoing_p:text(select) - {label "Project is ongoing?"} - {options {{"No" "f"} {"Yes" "t"}} {value $ongoing_p}} - {help_text "If yes, then this project has no deadline"} - } - -} -select_query_name project_query -on_submit { - - set user_id [ad_conn user_id] - set peeraddr [ad_conn peeraddr] - -} -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 - -} -edit_data { - - set project_id [db_exec_plsql new_project_revision { *SQL* }] - project_manager::project::compute_parent_status $project_item_id - -} -after_submit { - - ad_returnredirect "one?[export_url_vars project_id]" - ad_script_abort } if {$use_goal_p} { - ad_form -extend -name add_edit -form { - {goal:text(textarea),optional - {label "[set project_term] goal"} - {value $goal} - {html { rows 5 cols 40 wrap soft}}} - } + ad_form -extend -name add_edit \ + -form { + {goal:text(textarea),optional + {label "[set project_term] goal"} + {value $goal} + {html { rows 5 cols 40 wrap soft}}} + } } if {$use_project_code_p} { - ad_form -extend -name add_edit -form { - {project_code:text,optional - {label "[set project_term] code"} - {value $project_code} - } - } + ad_form -extend -name add_edit \ + -form { + {project_code:text,optional + {label "[set project_term] code"} + {value $project_code} + } + } } + + +ad_form -extend -name add_edit \ + -select_query_name project_query \ + -on_submit { + + set user_id [ad_conn user_id] + set peeraddr [ad_conn peeraddr] + + } -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 + + } -edit_data { + + set project_id [db_exec_plsql new_project_revision { *SQL* }] + project_manager::project::compute_parent_status $project_item_id + + category::map_object -remove_old -object_id $project_item_id $category_ids + + } -after_submit { + + ad_returnredirect "one?[export_url_vars project_id]" + ad_script_abort + } 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 -N -r1.8 -r1.9 --- openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 18 Sep 2003 01:09:14 -0000 1.8 +++ openacs-4/contrib/packages/project-manager/www/index-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.9 @@ -14,15 +14,19 @@ to_char(p.planned_start_date, 'MM/DD/YY') as planned_start_date, to_char(p.planned_end_date, 'MM/DD/YY') as planned_end_date, p.ongoing_p, + c.category_id, + c.category_name, p.actual_hours_completed, 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, cr_items i + 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 WHERE p.project_id = i.live_revision and - p.parent_id = :root_folder - ORDER BY p.title + 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 -N -r1.17 -r1.18 --- openacs-4/contrib/packages/project-manager/www/index.adp 8 Oct 2003 23:29:16 -0000 1.17 +++ openacs-4/contrib/packages/project-manager/www/index.adp 11 Dec 2003 21:39:44 -0000 1.18 @@ -3,33 +3,27 @@ @project_term@s -@context@ +@context;noquote@ - +
+ - - + + - - + - + - -
Processes - -  Admin pages
-
Add Project -
+ + -

+ - + + 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 -N -r1.9 -r1.10 --- openacs-4/contrib/packages/project-manager/www/index.tcl 12 Sep 2003 21:36:32 -0000 1.9 +++ openacs-4/contrib/packages/project-manager/www/index.tcl 11 Dec 2003 21:39:44 -0000 1.10 @@ -14,6 +14,10 @@ @return project_term Terminology for projects @return project_term_lower Terminology for projects (lower case) +} { + orderby_project:optional + status_id:optional + category_id:optional } -properties { context:onevalue @@ -54,13 +58,19 @@ # Projects, using list-builder --------------------------------- + + +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"] + + + template::list::create \ -name projects \ -multirow projects \ -key item_id \ -elements { project_name { - label "Subject" + label "Project name" link_url_col item_url link_html { title "View this project version" } } @@ -74,16 +84,50 @@ label "Hours completed" display_template "@projects.actual_hours_completed@/@projects.estimated_hours_total@" } + category_id { + label "Categories" + display_template "

  • @projects.category_name@" + } } \ + -actions { + "Tasks" "tasks" "View list of tasks" + "Processes" "processes" "View and use processes" + "Add project" "add-edit" "Add project" + "Admin" "admin/" "Administration pages" + } \ -main_class { narrow } \ -filters { - orderby_project {} + status_id { + 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 + } + } + category_id { + label "Category" + values {$category_choices} + where_clause { + om.category_id = :category_id + } + } } \ -orderby { - project_name {orderby project_name} - default_value project_name,desc + default_value category_id,asc + project_name { + label "Project name" + orderby_desc "upper(p.title) desc" + orderby_asc "upper(p.title) asc" + default_direction asc + } + category_id { + label "Categories" + orderby_desc "c.category_name desc" + orderby_asc "c.category_name asc" + default_direction asc + } } \ -orderby_name orderby_project \ -html { 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 -N -r1.19 -r1.20 --- openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 3 Oct 2003 23:52:17 -0000 1.19 +++ openacs-4/contrib/packages/project-manager/www/one-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.20 @@ -33,13 +33,13 @@ p.project_code, p.goal, p.description, - to_char(p.planned_start_date,'Mon DD') as planned_start_date, - to_char(p.planned_end_date,'Mon DD') as planned_end_date, + to_char(p.planned_start_date,'YYYY-MM-DD HH24:MI') as planned_start_date, + to_char(p.planned_end_date,'YYYY-MM-DD HH24:MI') as planned_end_date, p.ongoing_p, i.live_revision, - to_char(p.estimated_finish_date,'Mon DD') as estimated_finish_date, - to_char(p.earliest_finish_date,'Mon DD') as earliest_finish_date, - to_char(p.latest_finish_date,'Mon DD') as latest_finish_date, + to_char(p.estimated_finish_date,'YYYY-MM-DD HH24:MI') as estimated_finish_date, + to_char(p.earliest_finish_date,'YYYY-MM-DD HH24:MI') as earliest_finish_date, + to_char(p.latest_finish_date,'YYYY-MM-DD HH24:MI') as latest_finish_date, p.actual_hours_completed, p.estimated_hours_total, p.parent_id @@ -84,12 +84,12 @@ SELECT t.item_id as task_id, t.title, - to_char(t.end_date,'Mon DD') as end_date, - to_char(t.earliest_start,'Mon DD') as earliest_start, - to_char(t.earliest_finish,'Mon DD') as earliest_finish, - to_char(t.latest_start,'Mon DD') as latest_start, - to_char(t.latest_finish,'Mon DD') as latest_finish, - to_char(t.latest_start-t.earliest_start,'FMDD') || ' days' as slack_time, + 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_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_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 +100,11 @@ t.estimated_hours_work_max, t.actual_hours_worked FROM - pm_tasks_revisionsx t LEFT JOIN pm_task_assignment a ON t.item_id = a.task_id, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id, cc_users u + (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 WHERE t.parent_id = :project_item_id and t.revision_id = i.live_revision and - a.party_id = u.party_id + t.party_id = u.party_id [template::list::orderby_clause -name tasks -orderby] 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 -N -r1.27 -r1.28 --- openacs-4/contrib/packages/project-manager/www/one.adp 10 Nov 2003 19:34:54 -0000 1.27 +++ openacs-4/contrib/packages/project-manager/www/one.adp 11 Dec 2003 21:39:44 -0000 1.28 @@ -103,7 +103,33 @@

    - Breakdown + + + + + + + +
    Categories
    + + + + +
    + +
      + + +
    • @categories:item@ + + +
    + +
    +
    + +

    + Add subproject

    Subprojects: @@ -154,5 +180,5 @@ - + 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 -N -r1.26 -r1.27 --- openacs-4/contrib/packages/project-manager/www/one.tcl 10 Oct 2003 22:51:04 -0000 1.26 +++ openacs-4/contrib/packages/project-manager/www/one.tcl 11 Dec 2003 21:39:44 -0000 1.27 @@ -29,6 +29,7 @@ {orderby_versions ""} } -properties { + categories:onelist context_bar:onevalue project:multirow tasks:multirow @@ -74,9 +75,24 @@ set write_p [permission::permission_p -object_id $package_id -privilege write] set create_p [permission::permission_p -object_id $package_id -privilege create] +# categories + + +set categories [list] +set cat_list [category::get_mapped_categories $project_item_id] +foreach cat $cat_list { + lappend categories [category::get_name $cat] +} + db_1row project_query { } -column_array project set project_root [db_exec_plsql get_root_folder { }] +set project(planned_start_date) [lc_time_fmt $project(planned_start_date) "%x"] +set project(planned_end_date) [lc_time_fmt $project(planned_end_date) "%x"] +set project(estimated_finish_date) [lc_time_fmt $project(estimated_finish_date) "%x"] +set project(earliest_finish_date) [lc_time_fmt $project(earliest_finish_date) "%x"] +set project(latest_finish_date) [lc_time_fmt $project(latest_finish_date) "%x"] + # set up context bar, needs parent_id if {[string equal $project(parent_id) $project_root]} { @@ -127,20 +143,20 @@ } earliest_start { label "Earliest Start" - display_template "@tasks.earliest_start@" + display_template "@tasks.earliest_start_pretty@" } earliest_finish { label "Earliest Finish" - display_template "@tasks.earliest_finish@" + display_template "@tasks.earliest_finish_pretty@" } latest_start { label "Latest Start" - display_template "@tasks.latest_start@" + display_template "@tasks.latest_start_pretty@" } latest_finish { label "Latest Finish" display_template { - @tasks.latest_finish@ + @tasks.latest_finish_pretty@ } } last_name { @@ -176,16 +192,21 @@ latest_start {orderby latest_start} slack_time {orderby slack_time} latest_finish {orderby latest_finish} - default_value slack_time,asc + default_value latest_start,asc } \ -orderby_name orderby_tasks \ -html { } -db_multirow -extend { item_url } tasks project_tasks_query { +db_multirow -extend { item_url earliest_start_pretty earliest_finish_pretty latest_start_pretty latest_finish_pretty} 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"] } @@ -318,6 +339,8 @@ db_multirow -extend { item_url } versions project_versions { } { set item_url [export_vars -base "one" -override {{project_item_id $item_id}} {project_item_id}] + + } Index: openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-dependency-add-edit.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl 10 Oct 2003 22:51:04 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/process-dependency-add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.4 @@ -62,6 +62,7 @@ if {![exists_and_not_null use_dependency]} { ns_log Notice "Redirecting" ad_returnredirect "process-one?[export_url_vars process_id]" + ad_script_abort } # terminology Index: openacs-4/contrib/packages/project-manager/www/process-one-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-one-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/process-one-postgresql.xql 10 Oct 2003 22:51:04 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/process-one-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.3 @@ -7,7 +7,6 @@ t.process_task_id, t.one_line, t.description, - t.end_date, t.estimated_hours_work, t.estimated_hours_work_min, t.estimated_hours_work_max, Index: openacs-4/contrib/packages/project-manager/www/process-one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-one.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/contrib/packages/project-manager/www/process-one.adp 10 Nov 2003 19:34:54 -0000 1.3 +++ openacs-4/contrib/packages/project-manager/www/process-one.adp 11 Dec 2003 21:39:44 -0000 1.4 @@ -8,7 +8,7 @@ Process tasks:
      -
    • Use this process: @use_link@

      +

    • Use this process: @use_link;noquote@

    • Add Index: openacs-4/contrib/packages/project-manager/www/process-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-one.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/contrib/packages/project-manager/www/process-one.tcl 10 Oct 2003 22:51:04 -0000 1.6 +++ openacs-4/contrib/packages/project-manager/www/process-one.tcl 11 Dec 2003 21:39:44 -0000 1.7 @@ -75,7 +75,7 @@ estimated_hours_work_min { label "Work estimate min" } - estimated_hours_work_min { + estimated_hours_work_max { label "Work estimate max" } } \ Index: openacs-4/contrib/packages/project-manager/www/processes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/processes.adp,v diff -u -N -r1.4 -r1.5 --- openacs-4/contrib/packages/project-manager/www/processes.adp 10 Nov 2003 19:34:54 -0000 1.4 +++ openacs-4/contrib/packages/project-manager/www/processes.adp 11 Dec 2003 21:39:44 -0000 1.5 @@ -5,22 +5,6 @@ Processes @context_bar;noquote@ - - - - - - - - - - - -
       Admin pages
      - - -

      - Index: openacs-4/contrib/packages/project-manager/www/processes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/processes.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/contrib/packages/project-manager/www/processes.tcl 10 Oct 2003 22:51:04 -0000 1.4 +++ openacs-4/contrib/packages/project-manager/www/processes.tcl 11 Dec 2003 21:39:44 -0000 1.5 @@ -81,7 +81,9 @@ narrow } \ -actions { + "Projects" "index" "View projects" "Add process" "process-add-edit" "Add a process" + "Admin" "admin/" "Administration pages" } \ -filters { orderby_process {} 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 -N -r1.11 -r1.12 --- openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 10 Oct 2003 22:51:04 -0000 1.11 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.12 @@ -2,48 +2,48 @@ - SELECT + SELECT t.process_task_id as process_tid, t.one_line, t.description, t.estimated_hours_work, t.estimated_hours_work_min, t.estimated_hours_work_max, d.dependency_id - FROM + FROM pm_process_task t LEFT JOIN pm_process_task_dependency d ON t.process_task_id = d.process_task_id - WHERE - t.process_id = :process_id + WHERE + t.process_id = :process_id ORDER BY t.process_task_id - select pm_task__new_task_item ( + select pm_task__new_task_item ( null, - :project_item_id, + :project_item_id, :p_task_title, :p_description, [project_manager::project::util::datenvl -value [set end_date_$i] -value_if_null "null," -value_if_not_null "to_timestamp('[set end_date_$i]','YYYY MM DD HH24 MI SS'),"] '0', :p_work, :p_work_min, :p_work_max, - current_timestamp, - :user_id, - :peeraddr, - :package_id - ); + current_timestamp, + :user_id, + :peeraddr, + :package_id + ); - select pm_task__new_task_revision ( + select pm_task__new_task_revision ( :p_task_item_id, - :project_item_id, + :project_item_id, :p_task_title, :p_description, [project_manager::project::util::datenvl -value [set end_date_$i] -value_if_null "null," -value_if_not_null "to_timestamp('[set end_date_$i]','YYYY MM DD HH24 MI SS'),"] @@ -52,20 +52,20 @@ :p_work_min, :p_work_max, :p_hours, - current_timestamp, - :user_id, - :peeraddr, - :package_id - ); + current_timestamp, + :user_id, + :peeraddr, + :package_id + ); select current_timestamp - FROM - dual + FROM + dual @@ -77,15 +77,15 @@ t.item_id, t.description, t.name, - to_char(t.end_date,'YYYY MM DD') as end_date, + to_char(t.end_date,'YYYY MM DD') as end_date, t.percent_complete, t.estimated_hours_work, t.estimated_hours_work_min, t.estimated_hours_work_max, d.parent_task_id, t.actual_hours_worked - FROM - pm_tasks_revisionsx t, + FROM + pm_tasks_revisionsx t, cr_items i LEFT JOIN pm_task_dependency d ON i.item_id = d.task_id WHERE t.item_id in ([join $task_id ","]) and 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 -N -r1.23 -r1.24 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 10 Nov 2003 19:34:54 -0000 1.23 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.24 @@ -1,4 +1,4 @@ -ns_log notice task assign add edit page +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 @@ -218,131 +218,9 @@ {value $number} } -} -on_submit { - - set user_id [ad_conn user_id] - set peeraddr [ad_conn peeraddr] - -} -new_data { - - ns_log Notice "new data" - - # -------------------------------------------------------------- - # 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] - - for {set i 1} {$i <= $number} {incr i} { - - if {![exists_and_not_null estimated_hours_work($i)]} { - set estimated_hours_work($i) [expr .5 * ($estimated_hours_work_max($i) - $estimated_hours_work_min($i)) + $estimated_hours_work_min($i)] - } - - if {![exists_and_not_null estimated_hours_work_min($i)]} { - set estimated_hours_work_min($i) $estimated_hours_work($i) - } - - if {![exists_and_not_null estimated_hours_work_max($i)]} { - set estimated_hours_work_max($i) $estimated_hours_work($i) - } - - - if {![exists_and_not_null end_date_$i]} { - set end_date_$i "{} {} {} {} {} {}" - } - - # 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 this_revision_id [db_exec_plsql new_task_item { *SQL* }] - - 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 - } - - lappend process_task_id $process_task_ids($i) - } - -} -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)]} { - set estimated_hours_work($i) [expr .5 * ($estimated_hours_work_max($i) - $estimated_hours_work_min($i)) + $estimated_hours_work_min($i)] - } - - if {![exists_and_not_null estimated_hours_work_min($i)]} { - set estimated_hours_work_min($i) $estimated_hours_work($i) - } - - if {![exists_and_not_null estimated_hours_work_max($i)]} { - set estimated_hours_work_max($i) $estimated_hours_work($i) - } - - if {![exists_and_not_null end_date_$i]} { - set end_date_$i "{} {} {} {} {} {}" - } - - # set up variables, pulling from arrays - set p_task_item_id $task_item_id($i) - set p_task_title $task_title($i) - set p_description $description($i) - set p_percent $percent_complete($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_hours $actual_hours_worked($i) - - # do the actual edit - set this_revision_id [db_exec_plsql new_task_revision { }] - - ns_log Notice "Added in $this_revision_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 - -} -select_query_name task_query -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. - - - 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_script_abort - } + # ---------------------------------- # we set the values for edited tasks # ---------------------------------- @@ -544,3 +422,134 @@ } } + + +ad_form -extend -name add_edit -select_query_name task_query -on_submit { + + set user_id [ad_conn user_id] + set peeraddr [ad_conn peeraddr] + +} -new_data { + + ns_log Notice "new data" + + # -------------------------------------------------------------- + # 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] + + for {set i 1} {$i <= $number} {incr i} { + + if {![exists_and_not_null estimated_hours_work($i)]} { + set estimated_hours_work($i) [expr .5 * ($estimated_hours_work_max($i) - $estimated_hours_work_min($i)) + $estimated_hours_work_min($i)] + } + + if {![exists_and_not_null estimated_hours_work_min($i)]} { + set estimated_hours_work_min($i) $estimated_hours_work($i) + } + + if {![exists_and_not_null estimated_hours_work_max($i)]} { + set estimated_hours_work_max($i) $estimated_hours_work($i) + } + + + if {![exists_and_not_null end_date_$i]} { + set end_date_$i "{} {} {} {} {} {}" + } + + # 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) + + 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" + + set this_revision_id [db_exec_plsql new_task_item { *SQL* }] + + 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 + } + + lappend process_task_id $process_task_ids($i) + } + +} -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)]} { + set estimated_hours_work($i) [expr .5 * ($estimated_hours_work_max($i) - $estimated_hours_work_min($i)) + $estimated_hours_work_min($i)] + } + + if {![exists_and_not_null estimated_hours_work_min($i)]} { + set estimated_hours_work_min($i) $estimated_hours_work($i) + } + + if {![exists_and_not_null estimated_hours_work_max($i)]} { + set estimated_hours_work_max($i) $estimated_hours_work($i) + } + + if {![exists_and_not_null end_date_$i]} { + set end_date_$i "{} {} {} {} {} {}" + } + + # set up variables, pulling from arrays + set p_task_item_id $task_item_id($i) + set p_task_title $task_title($i) + set p_description $description($i) + set p_percent $percent_complete($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_hours $actual_hours_worked($i) + + # do the actual edit + set this_revision_id [db_exec_plsql new_task_revision { }] + + ns_log Notice "Added in $this_revision_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 + + ns_log Notice "computed parent pre redirect" + +} -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. + + + 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_script_abort + +} + 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 -N -r1.5 -r1.6 --- openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 10 Oct 2003 22:51:04 -0000 1.5 +++ openacs-4/contrib/packages/project-manager/www/task-assign-add-edit.tcl 11 Dec 2003 21:39:44 -0000 1.6 @@ -90,7 +90,7 @@ # currently hardcoded the number of assignments -for {set i 0} {$i <= 10} {incr i} { +for {set i 0} {$i <= 5} {incr i} { template::multirow append num $i } 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 -N -r1.19 -r1.20 --- openacs-4/contrib/packages/project-manager/www/task-one.adp 10 Nov 2003 19:34:54 -0000 1.19 +++ openacs-4/contrib/packages/project-manager/www/task-one.adp 11 Dec 2003 21:39:44 -0000 1.20 @@ -25,7 +25,7 @@ Description -@task_info.description@ +@task_info.description;noquote@ @@ -103,6 +103,8 @@ -@comments@ +@comments;noquote@

      -@comments_link@ +@comments_link;noquote@ + + 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 -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/tasks-postgresql.xql 11 Dec 2003 21:39:44 -0000 1.2 @@ -0,0 +1,36 @@ + + +postgresql7.2 + + + + SELECT + ts.task_id, + ts.task_number, + t.task_revision_id, + t.title, + t.description, + to_char(t.end_date,'YYYY-MM-DD HH24:MI') as end_date, + t.percent_complete, + t.estimated_hours_work, + t.estimated_hours_work_min, + t.estimated_hours_work_max, + t.actual_hours_worked, + to_char(t.earliest_start,'YYYY-MM-DD HH24:MI') as earliest_start, + 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_finish,'YYYY-MM-DD HH24:MI') as latest_finish, + 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 + WHERE + ts.task_id = t.item_id and + ta.party_id = p.person_id and + 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 -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/tasks.adp 11 Dec 2003 21:39:44 -0000 1.2 @@ -0,0 +1,29 @@ + + + + +@task_term@s +@context_bar;noquote@ + + + + + + + + + + + +
      + + + + + + + +
      + + + 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 -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 11 Dec 2003 21:39:44 -0000 1.2 @@ -0,0 +1,128 @@ +ad_page_contract { + + Main view page for tasks. + + @author jader@bread.com + @creation-date 2003-12-03 + @cvs-id $Id: tasks.tcl,v 1.2 2003/12/11 21:39:44 jeffd Exp $ + + @return title Page title. + @return context Context bar. + @return tasks Multirow data set of tasks + @return task_term Terminology for tasks + @return task_term_lower Terminology for tasks (lower case) + @return project_term Terminology for projects + @return project_term_lower Terminology for projects (lower case) + +} { + orderby:optional + party_id:optional +} -properties { + task_term:onevalue + context_bar:onevalue + tasks:multirow +} + +# --------------------------------------------------------------- # + +# terminology +set task_term [parameter::get -parameter "TaskName" -default "Task"] +set task_term_lower [parameter::get -parameter "taskname" -default "task"] +set project_term [parameter::get -parameter "ProjectName" -default "Project"] +set project_term_lower [parameter::get -parameter "projectname" -default "project"] + +# set up context bar +set context_bar [ad_context_bar "Tasks"] + +# the unique identifier for this package +set package_id [ad_conn package_id] +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 +} + +# permissions +permission::require_permission -party_id $user_id -object_id $package_id -privilege read + +set write_p [permission::permission_p -object_id $package_id -privilege write] +set create_p [permission::permission_p -object_id $package_id -privilege create] +set admin_p [permission::permission_p -object_id $package_id -privilege admin] + +# Tasks, using list-builder --------------------------------- + +template::list::create \ + -name tasks \ + -multirow tasks \ + -key item_id \ + -elements { + task_number { + label "\#" + link_url_col item_url + link_html { title "View this project version" } + } + title { + label "Subject" + } + full_name { + label "Who" + display_template "@tasks.full_name@ (@tasks.role@)" + } + description { + label "Description" + } + end_date { + label "Deadline" + } + actual_hours_worked { + label "Hours completed" + display_template "@tasks.actual_hours_worked@/@tasks.estimated_hours_work@" + } + } \ + -actions { + "Projects" "index" "View list of tasks" + "Processes" "processes" "View and use processes" + "Add task" "task-add-edit" "Add a task" + "Admin" "admin/" "Administration pages" + } \ + -main_class { + narrow + } \ + -filters { + 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 + } + } + } \ + -orderby { + default_value task_number,asc + task_number { + label "Task \#" + orderby_desc "ts.task_number desc" + orderby_asc "ts.task_number asc" + default_direction asc + } + title { + label "Subject" + orderby_desc "t.title desc" + orderby_asc "t.title asc" + default_direction asc + } + } \ + -orderby_name orderby \ + -html { + width 100% + } + + +db_multirow -extend { item_url } tasks tasks { +} { + set item_url [export_vars -base "task-one" {task_id}] +} + + +# ------------------------- END OF FILE ------------------------- # Index: openacs-4/contrib/packages/project-manager/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.adp,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/www/admin/index.adp 10 Nov 2003 19:34:54 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/www/admin/index.adp 11 Dec 2003 21:39:44 -0000 1.3 @@ -31,4 +31,14 @@ the description given to the user for task dependencies. + + Status types + type valid status codes, for example, 'Open' and 'Closed' + + + + Project categories + the categories for projects. + + Index: openacs-4/contrib/packages/project-manager/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/admin/Attic/index.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/contrib/packages/project-manager/www/admin/index.tcl 12 Sep 2003 01:20:57 -0000 1.1 +++ openacs-4/contrib/packages/project-manager/www/admin/index.tcl 11 Dec 2003 21:39:44 -0000 1.2 @@ -16,6 +16,7 @@ } -properties { + categories_link:onevalue context:onevalue projects:multirow write_p:onevalue @@ -42,6 +43,10 @@ set package_id [ad_conn package_id] set user_id [ad_maybe_redirect_for_registration] +# set up link to categories +set categories_link "/categories/cadmin/one-object?object_id=$package_id" + + # permissions permission::require_permission -party_id $user_id -object_id $package_id -privilege read 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 -N -r1.1 -r1.2 --- openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 19 Sep 2003 16:48:03 -0000 1.1 +++ openacs-4/contrib/packages/survey/tcl/survey-procs.tcl 11 Dec 2003 21:39:44 -0000 1.2 @@ -576,7 +576,7 @@ #dotlrn specific info set dotlrn_installed_p [apm_package_installed_p dotlrn] - if {$dotlrn_installed_p} { + if {$dotlrn_installed_p && ![empty_string_p [dotlrn_community::get_community_id]]} { set package_id [ad_conn package_id] set community_id [dotlrn_community::get_community_id] set segment_id [dotlrn_community::get_rel_segment_id -community_id $community_id -rel_type "dotlrn_member_rel"] Index: openacs-4/etc/backup.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/backup.sh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/etc/backup.sh 11 Dec 2003 21:39:44 -0000 1.2 @@ -0,0 +1,162 @@ +#!/bin/bash +# +# $Id: backup.sh,v 1.2 2003/12/11 21:39:44 jeffd Exp $ +# +# full and incremental backup script +# created 07 February 2000 +# Based on a script by Daniel O'Callaghan +# and modified by Gerhard Mourani +# modified more by Joel Aufrecht in 2002 +# merged with Collaboraid database backups Dec 2003 +# +# Change the variables below to fit your computer/backup +# + +COMPUTER=yourserver.net # name of this computer +BACKUPUSER=backup # username to own the files +BACKUPDIR=/backup/thisserver # where to store the backups +WEBDIR=/var/lib/aolserver # path to OpenACS service root +PG_BINDIR=/usr/local/pgsql/bin # path to PostGreSQL binaries +TIMEDIR=$BACKUPDIR/last-full # where to store time of full backup +TAR=/bin/tar # name and location of tar +CHOWN=/bin/chown +CHMOD=/bin/chmod +SCP="/usr/bin/scp -oProtocol=2" +OTHERHOST=otherserver.net # another server, to receive backup + # files + # leave blank to skip scp exchange + +OTHERUSER=backup # the user on the recipient server + # must have silent authentication, ie, + # certificates + + # script assumes an exact match between database + # name and filesystem +POSTGRES_DBS="service0" # space-separated list of postgres databases + # to be backed up to file system + +ORACLE8I_DBS="service0" # space-separated list of Oracle8i databases + # to be backed up to file system + + # space-separated list of directories to be backed up +DIRECTORIES="/etc /home /root /cvsroot /var/qmail/alias /usr/local/aolserver $WEBDIR" + +####################################################################### +# +# Shouldn't need to change anything below this line +# +####################################################################### + +DOW=`date +%a` # Day of the week e.g. Mon +DOM=`date +%d` # Date of the Month e.g. 27 +DM=`date +%d%b` # Date and Month e.g. 27Sep +DATE=`date +"%Y-%m-%d"` # Year, Month, Date, e.g. 20020401 + +# A full backup is generated: +# the first time the script is run, +# On the 1st of the month +# Every Sunday +# The rest of the time the backup includes only files that have changed +# since the last full backup +# Each backup has a date-specific filename +# + +#--------------------------------------------------------------------- +# Parse command line +#--------------------------------------------------------------------- + +case $1 in + --full) + TYPE="full" + NEWER="" + ;; + --help | -help | -h | --h) + echo "Usage: $0 --full to force full backup, or $0 to run automated. All other variables are set in the script." + exit;; + *) +esac + +if [ ! -s $TIMEDIR/$COMPUTER-full-date ]; + then + TYPE="full"; +fi + +if [[ $DOM = "01" || $DOW = "Sun" ]]; + then + TYPE="full"; +fi + +if $TYPE == "full"; + then + NEWER="" +else + TYPE="incremental" + NEWER="--newer-mtime `cat $TIMEDIR/$COMPUTER-full-date`"; +fi + +mkdir -p $BACKUPDIR +mkdir -p $TIMEDIR + +#--------------------------------------------------------------------- +# Dump databases +#--------------------------------------------------------------------- + +#--------------------------------------------------------------------- +# PostGreSQL +echo -e "\nPostgres" + +for dbname in $POSTGRES_DBS +do + dmp_file=$WEBDIR/$dbname/database-backup/$dbname-nightly-backup.dmp + echo -n "-> Dumping $dbname to $dmp_file ... " + time $PG_BINDIR/pg_dump -f $dmp_file -Fp $dbname + /bin/ls -lh $dmp_file | awk '{print $5}' + gzip -f $dmp_file +done + +#--------------------------------------------------------------------- +# Oracle +for dbname in $ORACLE8IDBS +do + dmp_file=$WEBDIR/$dbname/database-backup/$dbname-nightly-backup.dmp + echo -n "-> Dumping $dbname to $dmp_file ... " + time /usr/sbin/export-oracle $dbname $dmp_file + /bin/ls -lh $dmp_file | awk '{print $5}' + gzip -f $dmp_file +done + +#--------------------------------------------------------------------- +# Make backup files from file system and transfer to remote site +# TODO: This could be parallelized +#--------------------------------------------------------------------- +# we switched from bzip2 back to gzip because bzip2 takes 10 times longer +# for a 10% size advantage + +for directory in $DIRECTORIES + + do + + # strip directory of slashes when using it in the backup file name + FULLNAME=$BACKUPDIR/$DATE-$COMPUTER-${directory//\//-}-backup-$TYPE.tar.gz + # to use bzip2 instead of gzip, change z to j in the tar flags + cd $NEWER + tar -zcpsh . --file $FULLNAME $directory + $CHOWN $BACKUPUSER $FULLNAME + $CHMOD 660 $FULLNAME + if [[ -n $OTHERHOST ]] + then $SCP -q $FULLNAME $OTHERUSER@$OTHERHOST:$BACKUPDIR + fi +done + +# If full backup completed successfully, record the date so that +# incremental backups are relative to the last successful full +# backup + +if $TYPE == "full"; + then + NEWER="" + NOW=`date +%Y-%m-%d` + echo $NOW> $TIMEDIR/$COMPUTER-full-date; +fi + +echo "Done." \ No newline at end of file Index: openacs-4/etc/config.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/config.tcl,v diff -u -N -r1.12 -r1.13 --- openacs-4/etc/config.tcl 11 Nov 2003 16:51:47 -0000 1.12 +++ openacs-4/etc/config.tcl 11 Dec 2003 21:39:44 -0000 1.13 @@ -53,7 +53,6 @@ ns_param nssha1 ${bindir}/nssha1.so ns_param nscache ${bindir}/nscache.so ns_param nsrewrite ${bindir}/nsrewrite.so -ns_param libtdom ${bindir}/libtdom.so #--------------------------------------------------------------------- # nsopenssl will fail unless the cert files are present as specified @@ -74,10 +73,14 @@ #ns_param nscgi ${bindir}/nscgi.so #ns_param nsjava ${bindir}/libnsjava.so -# Required for AOLserver 4 -#ns_param nsdb ${bindir}/nsdb.so +if { [ns_info version] >= 4 } { + # Required for AOLserver 4.x + ns_param nsdb ${bindir}/nsdb.so +} else { + # Required for AOLserver 3.x + ns_param libtdom ${bindir}/libtdom.so +} - #--------------------------------------------------------------------- # # Rollout email support @@ -143,7 +146,8 @@ ns_section ns/threads ns_param mutexmeter true ;# measure lock contention -ns_param stacksize 500000 +# The per-thread stack size must be a multiple of 8k for AOLServer to run under MacOS X +ns_param stacksize [expr 128 * 8192] # # MIME types. Index: openacs-4/etc/install/build-release.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/etc/install/build-release.sh,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/etc/install/build-release.sh 11 Dec 2003 21:39:45 -0000 1.2 @@ -0,0 +1,81 @@ +#!/bin/bash + +# if TAG=1 create the cvs tags otherwise assume they exist. +TAG=1 + +# What release version are we building; version format should be +# dashes rather than dots eg. OACS_VERSION=5-0-0b4 + +OACS_VERSION=5-0-0b4 +DOTLRN_VERSION=2-0-0b4 + +OACS_BRANCH=oacs-5-0 +DOTLRN_BRANCH=dotlrn-2-0 + +DOTLRN_CVSROOT=/dotlrn-cvsroot +OACS_CVSROOT=/cvsroot + +# +# Nothing below here should need to change... +# +BASE=/var/tmp/release-$OACS_VERSION +mkdir $BASE +if [ ! -d $BASE ]; then + echo "Failed creating base dir $BASE" + exit 1 +fi + +cd $BASE + +if [ $TAG -eq 1 ]; then + + # Checkout and tag the release + cvs -d $OACS_CVSROOT checkout -r $OACS_BRANCH openacs-4 + cd openacs-4 + cvs tag -F oacs-$OACS_VERSION + cd ../ + + + # Checkout and tag the dotlrn release + mkdir dotlrn-packages + cd dotlrn-packages + cvs -d $DOTLRN_CVSROOT checkout -r $DOTLRN_BRANCH dotlrn-all + for dir in *; do ( cd $dir && cvs tag -F dotlrn-$DOTLRN_VERSION ); done + cd ../ + + # + # Should check for .sql .xql .adp .tcl .html .xml executable files and squak if found. + # + +fi + + + +# Generate tarballs... +# + +# openacs +# +mkdir tarball +cd tarball +cvs -d $OACS_CVSROOT export -r oacs-$OACS_VERSION acs-core +mv opeancs-4 openacs-${OACS_VERSION//-/.} +tar -czf ../openacs-${OACS_VERSION//-/.}.tar.gz openacs-${OACS_VERSION//-/.} +cd .. + +# dotlrn +# +mkdir dotlrn-tarball +cd dotlrn-tarball +cvs -d $OACS_CVSROOT export -r oacs-$OACS_VERSION acs-core +cd openacs-4/packages +cvs -d $OACS_CVSROOT export -r oacs-$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 +mv openacs-4 dotlrn-${DOTLRN_VERSION//-/.} +tar -czf ../dotlrn-${DOTLRN_VERSION//-/.}.tar.gz dotlrn-${DOTLRN_VERSION//-/.} + + +# Clean up after ourselves... +cd $BASE && rm -rf dotlrn-tarball tarball openacs-4 dotlrn-packages 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 -N -r1.22 -r1.23 --- openacs-4/packages/acs-admin/acs-admin.info 10 Nov 2003 14:28:55 -0000 1.22 +++ openacs-4/packages/acs-admin/acs-admin.info 11 Dec 2003 21:39:45 -0000 1.23 @@ -7,15 +7,17 @@ t t - + Don Baccus -

      Provides an interface for administering the OpenACS Community System Installation. + An interface for Site-wide administration of an OpenACS Installation. 2003-11-07 - OpenACS - A UI for administering the OpenACS system. + OpenACS + Provides 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/lib/service-parameters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/lib/service-parameters.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-admin/lib/service-parameters.tcl 17 Sep 2003 22:49:09 -0000 1.3 +++ openacs-4/packages/acs-admin/lib/service-parameters.tcl 11 Dec 2003 21:39:45 -0000 1.4 @@ -21,6 +21,7 @@ if { $parameter_count > 0 } { set param_url [export_vars -base "/shared/parameters" { package_id { return_url {[ad_return_url]} } }] } + set instance_name [lang::util::localize $instance_name] if { [empty_string_p $url] && [empty_string_p $admin_url] && [empty_string_p $param_url] } { continue Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/Attic/apm-admin-procs-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-admin/tcl/apm-admin-procs-postgresql.xql 10 May 2001 13:50:10 -0000 1.3 +++ openacs-4/packages/acs-admin/tcl/apm-admin-procs-postgresql.xql 11 Dec 2003 21:39:45 -0000 1.4 @@ -3,13 +3,14 @@ postgresql7.1 + select apm_package_version__version_name_greater(:version_name, highest.version_name) from (select version_name from apm_package_versions - where version_id = apm_package__highest_version(:package_key) + where version_id IN (select apm_package__highest_version(:package_key)) ) highest Index: openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 4 Oct 2003 03:10:01 -0000 1.11 +++ openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 11 Dec 2003 21:39:45 -0000 1.12 @@ -51,7 +51,11 @@ } else { set title [lindex $args end] set context [concat [list [list $apm_url $apm_title]] $args] - set context_bar [eval ad_context_bar $context] + set cmd [list ad_context_bar --] + foreach elem $context { + lappend cmd $elem + } + set context_bar [eval $cmd] } set header [ad_header $title ""] append body "$header\n" Index: openacs-4/packages/acs-admin/www/apm/package-deinstall.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-deinstall.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/apm/package-deinstall.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-admin/www/apm/package-deinstall.tcl 11 Dec 2003 21:39:45 -0000 1.2 @@ -21,7 +21,7 @@ doc_body_append "
    " } on_error { if {![apm_version_installed_p $version_id] } { - ad_return_complaint "Database Error" "The database returned the following error + ad_return_complaint 1 "Database Error: The database returned the following error message
    [ad_quotehtml $errmsg]
    " } } Index: openacs-4/packages/acs-admin/www/apm/package-delete-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/package-delete-2.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-admin/www/apm/package-delete-2.tcl 17 May 2003 09:36:29 -0000 1.5 +++ openacs-4/packages/acs-admin/www/apm/package-delete-2.tcl 11 Dec 2003 21:39:45 -0000 1.6 @@ -23,47 +23,10 @@ apm_version_info $version_id -doc_body_append [apm_header [list "version-view?version_id=$version_id" "$pretty_name $version_name"] "Delete"] +doc_body_append [apm_header "Delete"] -# Unmount all instances of this package with the Tcl API that invokes before-unmount callbacks -db_foreach all_package_instances { - select site_nodes.node_id - from apm_packages, site_nodes - where apm_packages.package_id = site_nodes.object_id - and apm_packages.package_key = :package_key -} { - set url [site_node::get_url -node_id $node_id] - doc_body_append "Unmounting package instance at url $url
    " - site_node::unmount -node_id $node_id -} - -# Delete the package instances with Tcl API that invokes before-uninstantiate callbacks -db_foreach all_package_instances { - select package_id - from apm_packages - where package_key = :package_key -} { - doc_body_append "Deleting package instance $package_id
    " - apm_package_instance_delete $package_id -} - -# Invoke the before-uninstall Tcl callback before the sql drop scripts -apm_invoke_callback_proc -version_id $version_id -type before-uninstall - -if {![empty_string_p $sql_drop_scripts]} { - - doc_body_append "Now executing drop scripts. -
      -" - foreach path $sql_drop_scripts { - doc_body_append "
    • "
      -	db_source_sql_file -callback apm_doc_body_callback "[acs_package_root_dir $package_key]/$path"
      -	doc_body_append "
      " - } -} - db_transaction { - apm_package_delete -remove_files=0 -callback apm_doc_body_callback $package_key + apm_package_delete -sql_drop_scripts $sql_drop_scripts -remove_files=0 -callback apm_doc_body_callback $package_key } on_error { if {[apm_package_registered_p $package_key] } { doc_body_append "The database returned the following error @@ -74,6 +37,6 @@ doc_body_append "

    -Return to the index. +

    You should restart the server now to make sure the memory footprint and cache of the package is cleared out. Click here to restart the server now.

    [ad_footer] " Index: openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl 17 May 2003 09:36:29 -0000 1.4 +++ openacs-4/packages/acs-admin/www/apm/version-dependency-add-2.tcl 11 Dec 2003 21:39:45 -0000 1.5 @@ -22,7 +22,7 @@ } default { - ad_return complaint "Dependency Entry Error" "Depenendencies are either provided or required." + ad_return_complaint 1 "Entry error: Depenendencies are either provided or required." } } apm_package_install_spec $version_id @@ -31,7 +31,7 @@ select count(*) from apm_package_dependencies where dependency_id = :dependency_id } -default 0] } { - ad_return_complaint "Database Error" "The database returned the following error: + ad_return_complaint 1 "The database returned the following error:
    [ad_quotehtml $errmsg]
    " } } Index: openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl 10 Sep 2002 22:21:59 -0000 1.2 +++ openacs-4/packages/acs-admin/www/apm/version-dependency-remove.tcl 11 Dec 2003 21:39:45 -0000 1.3 @@ -20,12 +20,12 @@ } default { - ad_return complaint "Dependency Entry Error" "Depenendencies are either interfaces or requirements." + ad_return complaint 1 "Dependency Entry Error: Depenendencies are either interfaces or requirements." } } apm_package_install_spec $version_id } on_error { - ad_return_complaint "Database Error" "The database returned the following error: + ad_return_complaint 1 "Database Error: The database returned the following error:
    [ad_quotehtml $errmsg]
    " } Index: openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl 10 Mar 2003 19:59:31 -0000 1.3 +++ openacs-4/packages/acs-admin/www/apm/version-generate-tarball.tcl 11 Dec 2003 21:39:45 -0000 1.4 @@ -11,7 +11,7 @@ db_transaction { apm_generate_tarball $version_id } on_error { - ad_return_complaint "APM Generation Error" "The database returned the following error message: + ad_return_complaint 1 "APM Generation Error: The database returned the following error message:
     
    [ad_quotehtml $errmsg] Index: openacs-4/packages/acs-admin/www/apm/version-i18n-index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-index.adp,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-admin/www/apm/version-i18n-index.adp 3 Oct 2003 10:36:09 -0000 1.7 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-index.adp 11 Dec 2003 21:39:45 -0000 1.8 @@ -5,16 +5,14 @@

    Import/Export Messages

    - » Export - messages from the database to catalog files (NB! Overwrites - catalog files in the file system) + » Export + messages from the database to catalog files

    » Import - messages from catalog files to the database (NB! Overwrites - messages in the database) + href="@import_url@">Import + messages from catalog files to the database

    Index: openacs-4/packages/acs-admin/www/apm/version-i18n-index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-index.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-admin/www/apm/version-i18n-index.tcl 3 Oct 2003 08:56:40 -0000 1.4 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-index.tcl 11 Dec 2003 21:39:45 -0000 1.5 @@ -26,3 +26,5 @@ set localize_url [export_vars -base "[apm_package_url_from_key "acs-lang"]admin/message-list" { package_key {locale {[ad_conn locale]}}}] +set import_url [export_vars -base "/acs-lang/admin/import-messages" { package_key {return_url {[ad_return_url]}} }] +set export_url [export_vars -base "/acs-lang/admin/export-messages" { package_key {return_url {[ad_return_url]}} }] Index: openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 13 Oct 2003 16:37:48 -0000 1.13 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 11 Dec 2003 21:39:45 -0000 1.14 @@ -55,7 +55,7 @@ # We need either or both of the actions to be selected if { (! $replace_text_p) && (! $replace_tags_p) } { - ad_return_complaint "Invalid HTML Parameters" "You must choose an action to take on selected adp files, either replace_text or replace_tags or both." + ad_return_complaint 1 "Invalid HTML Parameters: you must choose an action to take on selected adp files, either replace_text or replace_tags or both." ad_script_abort } Index: openacs-4/packages/acs-admin/www/apm/version-i18n.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n.adp,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-admin/www/apm/version-i18n.adp 16 Oct 2003 13:17:20 -0000 1.15 +++ openacs-4/packages/acs-admin/www/apm/version-i18n.adp 11 Dec 2003 21:39:45 -0000 1.16 @@ -12,323 +12,4 @@ -

    Instructions

    - -

    - Here's the process for internationalizing a package: -

    - -
      -

      -

    1. - Replace text with tags in ADP files: Run above process - for ADP files with only the first action checked. -
    2. -

      -

      -

    3. - Manually check ADP files: Go through the ADP files and - check that the <\#...\#>'s are where they should be. -
    4. -

      -

      -

    5. - Manually check Tcl files: Go through the Tcl files, and - replace any localizable text with the <\#...\#> notation. -
    6. -

      -

      -

    7. - Replace tags with keys and insert into catalog: Run this - action for both ADP files and Tcl files, one after another. -
    8. -

      -
    - -

    - An important piece of advice when doing message catalog conversion is to - replace phrases rather than words with message catalog lookups. - The reason for this is that different languages have very - different grammar. An example of this is that some languages don't have - prepositions. -

    - -

    Valid message lookups

    - -

    - In adp files message lookups are always done with the syntax \#package_key.message_key\#. In Tcl - files all message lookups *must* be on either of the following formats: - -

      -
    • Typical static 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 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 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])]
      -    
      - -
    • -
    -

    - -

    Actions to take on adp files

    - -

    - The last two checkboxes in the form above let you choose which of - the two available scripts to run on the selected adp files. You - have to choose at least one of these actions, by default both are - selected and for almost all cases this is the setting that we - recommend. When translating the dotlrn package we first ran through - all adp files with both actions. For each adp file, we looked at the - untouched texts on the result page and manually inserted <#key - text#> tags in the adp where appropriate. When we were done with - this run-through we then ran the action "Replace tags with keys and - insert into catalog" to remove the temporary tags from the adp:s. -

    - -

    - To the best of our knowledge there is no harm in running those - actions multiple times on files. Before an adp file is modified it - will be backed up to a file with the name of the original file with - the ending .orig appended to it (i.e. www/a-file.adp is backed up - to www/a-file.adp.orig). However if such an .orig file already - exists no backup is done. -

    - -

    - If the adp status for a file shows 0 translatable texts, then the - "Replace texts with tags" action will do nothing. Likewise, if the - adp status shows 0 tags then "Replace tags with keys and insert into - catalog" action will have no effect. -

    - -

    Replacing text with tags

    - -

    - If you select "Replace text with tags" then for each adp file a - script will attempt to replace translatable text with temporary - <#message_key text#> tags. You will have the opportunity to edit the - message keys to use. You will also be able to indicate when a piece - of text should be left untouched (since it should not be subject to - translation, for example Javascript code). -

    - -

    - Any pieces of text that our script finds that it could not - automatically extract, 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'
    -
    - -

    Replace tags with keys and insert into catalog

    - -

    - If selected, this action will be executed after the "Replace text - with tags" action. It will replace any occurence of the temporary - <#message_key text#> tags with \#message_key\# lookups in the adp - files and insert the corresponding keys and messages into the en_US - catalog file for the package. -

    - -

    - Entries for the extracted messages will be added to the en_US - catalog file only if they do not already exist in that file. If the - messages don't contain the package key prefix this prefix will be - added before insertion into the message catalog. -

    - -

    - The message tags are processed from the adp:s in the order that they - appear. If the key of a message tag is already in the catalog file - then the message texts will be compared. If the message texts in the - tag and in the catalog file are identical then no insertion is done - to the catalog file. If they differ it is assumed that the new - message should be inserted into the catalog file but with a - different key. In this case a warning is issued in the log file and - an integer is appended to the message key to make it unique before - insertion into the catalog file is done. -

    - -

    Dealing with tcl files

    - -

    - When internationalizing the tcl files in the dotlrn package we - noticed that translatable texts are often found in page titles, - context bars, and form labels and options. Many times the texts are - enclosed in double quotes. We used 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. -

    - -

    Checking the Consistency of the Catalog File

    - -

    - This section describes how we checked 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. -

    - -

    Help

    - -

    The I18N status of adp files

    - -

    - Clicking on the "Show I18N status of files" link above will display - three counts for each adp file - the number of potential - translatable text messages, the number of temporary tags (on the - syntax <#message_key text#>), and the number of message key lookups - in the file (i.e. occurencies of \#message_key\#). -

    - -

    - A fully translated adp must have 0 tags, it typically has 0 or only - a few texts deemed translatable by our script and any number of - message key lookups (the last count). Our script sometimes considers - for example Javascript to be translatable, but don't worry - you - will have the opportunity to tell it to leave such texts untouched. -

    - +Developer's Guide to i18n \ No newline at end of file Index: openacs-4/packages/acs-admin/www/apm/version-tag.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/Attic/version-tag.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-admin/www/apm/version-tag.tcl 10 Sep 2002 22:21:59 -0000 1.2 +++ openacs-4/packages/acs-admin/www/apm/version-tag.tcl 11 Dec 2003 21:39:45 -0000 1.3 @@ -21,7 +21,7 @@ set files [db_list apm_all_paths { select path from apm_package_files where version_id = :version_id order by path -} +}] if { [llength $files] == 0 } { ad_return_complaint 1 "
  • No files in this packages" Index: openacs-4/packages/acs-admin/www/auth/authority.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/acs-admin/www/auth/authority.tcl 7 Nov 2003 17:35:41 -0000 1.18 +++ openacs-4/packages/acs-admin/www/auth/authority.tcl 11 Dec 2003 21:39:45 -0000 1.19 @@ -274,16 +274,7 @@ if { $run_time_seconds > 0 && $num_actions > 0 } { set actions_per_minute [expr round(60.0 * $num_actions / $run_time_seconds)] } - - set run_time {} - if { $run_time_seconds > 0 } { - set hrs [expr $run_time_seconds / (60*60)] - set mins [expr ($run_time_seconds / 60) % 60] - set secs [expr $run_time_seconds % 60] - if { $hrs > 0 } { append run_time "${hrs}h " } - if { $hrs > 0 || $mins > 0 } { append run_time "${mins}m " } - append run_time "${secs}s" - } + set run_time [util::interval_pretty -seconds $run_time_seconds] } if { [exists_and_not_null get_doc_impl_id] && [exists_and_not_null process_doc_impl_id] } { set batch_sync_run_url [export_vars -base batch-job-run { authority_id }] Index: openacs-4/packages/acs-admin/www/users/member-state-change.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/member-state-change.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-admin/www/users/member-state-change.tcl 18 Sep 2002 14:54:47 -0000 1.9 +++ openacs-4/packages/acs-admin/www/users/member-state-change.tcl 11 Dec 2003 21:39:45 -0000 1.10 @@ -29,7 +29,7 @@ where user_id = :user_id }]} { # The user is not in there - ad_return_complaint "Invalid User" "The user is not in the system" + ad_return_complaint 1 "Invalid User: the user is not in the system" return } @@ -70,7 +70,7 @@ } if [empty_string_p $action] { - ad_return_complaint "Not valid action" "You have not changed the user in any way" + ad_return_complaint 1 "Not valid action: You have not changed the user in any way" return } Index: openacs-4/packages/acs-admin/www/users/user-batch-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/user-batch-add.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/users/user-batch-add.adp 22 May 2003 14:00:20 -0000 1.3 +++ openacs-4/packages/acs-admin/www/users/user-batch-add.adp 11 Dec 2003 21:39:45 -0000 1.4 @@ -10,16 +10,16 @@

    Each user will get this email:
    From:
    Subject: -

    Message: (The four variables delimited by # marks will be automatically set for each user.) +

    Message: (The four variables delimited by {) marks will be automatically set for each user.)
    +   + + [i] + #file-storage.lt_Leave_blank_for_linked_documents# + + #file-storage.Description# + + + + Index: openacs-4/packages/file-storage/www/file-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file-add.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/file-storage/www/file-add.tcl 5 Nov 2002 17:19:59 -0000 1.4 +++ openacs-4/packages/file-storage/www/file-add.tcl 11 Dec 2003 21:40:04 -0000 1.5 @@ -36,3 +36,5 @@ if {[empty_string_p $title]} { set lock_title_p 0 } + +set unpack_available_p [expr ![empty_string_p [string trim [parameter::get -parameter UnzipBinary]]]] Index: openacs-4/packages/file-storage/www/file-edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-edit-2.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/file-storage/www/file-edit-2.tcl 5 Nov 2002 17:19:59 -0000 1.4 +++ openacs-4/packages/file-storage/www/file-edit-2.tcl 11 Dec 2003 21:40:04 -0000 1.5 @@ -19,19 +19,11 @@ ad_require_permission $file_id write -if [catch {db_exec_plsql rename_file " -begin - content_item.rename ( - item_id => :file_id, - name => :title - ); -end;"} errmsg] { +if [catch { + db_exec_plsql rename_file {} +} errmsg] { - if [db_string duplicate_check " - select count(*) - from cr_items - where name = :name - and parent_id = content_item.get_parent_folder(:file_id)"] { + if { [db_string duplicate_check {}] } { ad_return_complaint 1 "[_ file-storage.lt_It_appears_that_there]" } else { ad_return_complaint 1 "[_ file-storage.lt_We_got_an_error_that_] Index: openacs-4/packages/file-storage/www/file-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-oracle.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/file-oracle.xql 25 Sep 2003 13:55:04 -0000 1.9 +++ openacs-4/packages/file-storage/www/file-oracle.xql 11 Dec 2003 21:40:04 -0000 1.10 @@ -18,7 +18,8 @@ r.title as name, acs_permission.permission_p(:file_id,:user_id,'write') as write_p, acs_permission.permission_p(:file_id,:user_id,'delete') as delete_p, - acs_permission.permission_p(:file_id,:user_id,'admin') as admin_p + acs_permission.permission_p(:file_id,:user_id,'admin') as admin_p, + content_item.get_path(o.object_id, :root_folder_id) as file_url from acs_objects o, cr_revisions r, cr_items i where o.object_id = :file_id and i.item_id = o.object_id Index: openacs-4/packages/file-storage/www/file-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-postgresql.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/file-postgresql.xql 25 Sep 2003 13:55:04 -0000 1.9 +++ openacs-4/packages/file-storage/www/file-postgresql.xql 11 Dec 2003 21:40:04 -0000 1.10 @@ -17,7 +17,8 @@ r.title as name, acs_permission__permission_p(:file_id,:user_id,'write') as write_p, acs_permission__permission_p(:file_id,:user_id,'delete') as delete_p, - acs_permission__permission_p(:file_id,:user_id,'admin') as admin_p + acs_permission__permission_p(:file_id,:user_id,'admin') as admin_p, + content_item__get_path(o.object_id, :root_folder_id) as file_url from acs_objects o, cr_revisions r, cr_items i where o.object_id = :file_id and i.item_id = o.object_id Index: openacs-4/packages/file-storage/www/file.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file.adp,v diff -u -N -r1.16 -r1.17 --- openacs-4/packages/file-storage/www/file.adp 13 Oct 2003 17:16:08 -0000 1.16 +++ openacs-4/packages/file-storage/www/file.adp 11 Dec 2003 21:40:04 -0000 1.17 @@ -59,8 +59,14 @@ - - @version.title@ + + + + @version.title@ + + + @version.title@ + @version.author@ @version.content_size_pretty@ Index: openacs-4/packages/file-storage/www/file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/file-storage/www/file.tcl 16 Oct 2003 17:44:55 -0000 1.15 +++ openacs-4/packages/file-storage/www/file.tcl 11 Dec 2003 21:40:04 -0000 1.16 @@ -34,18 +34,10 @@ set show_administer_permissions_link_p [ad_parameter "ShowAdministerPermissionsLinkP"] -db_1row file_info " -select person.name(o.creation_user) as owner, - i.name, - r.title, - acs_permission.permission_p(:file_id,:user_id,'write') as write_p, - acs_permission.permission_p(:file_id,:user_id,'delete') as delete_p, - acs_permission.permission_p(:file_id,:user_id,'admin') as admin_p -from acs_objects o, cr_revisions r, cr_items i -where o.object_id = :file_id -and i.item_id = o.object_id -and r.revision_id = i.live_revision" +set root_folder_id [fs::get_root_folder] +db_1row file_info {} + # We use the new db_map here if {[string equal $show_all_versions_p "t"]} { # append sql " Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -N -r1.24 -r1.25 --- openacs-4/packages/forums/forums.info 10 Nov 2003 16:36:31 -0000 1.24 +++ openacs-4/packages/forums/forums.info 11 Dec 2003 21:40:04 -0000 1.25 @@ -9,14 +9,14 @@ OpenACS -

    Online discussion boards with many configuration options. + Online discussion forums. 2003-11-10 OpenACS - This online discussion board software is the successor of the original bboard package. The biggest improvement is the new scalable datamodel. This package supports threaded and flat view, moderation, a stand alone search function as well as integration with the OpenACS search package and integration with the notifications package for email alerts. It also supports automatic posting of incoming email. + This online discussion board software is the successor of the original bboard package. The biggest improvement is a scalable datamodel. Forums supports threaded and flat view, moderation, a stand alone search function as well as integration with the OpenACS search package and integration with the notifications package for email alerts. It also supports reply via email. - + Index: openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 17 May 2003 10:42:08 -0000 1.12 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 11 Dec 2003 21:40:04 -0000 1.13 @@ -4,6 +4,7 @@ -- -- @author gwong@orchardlabs.com,ben@openforce.biz -- @creation-date 2002-05-16 +-- @cvs-id $Id$ -- -- The Package for Messages -- @@ -105,7 +106,7 @@ return v_message_id; end; -' language 'plpgsql' with(isstrict,iscachable); +' language 'plpgsql' stable strict; select define_function_args ('forums_message__thread_open', 'message_id'); Index: openacs-4/packages/forums/tcl/forums-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-security-procs.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/forums/tcl/forums-security-procs.tcl 21 Sep 2003 19:58:58 -0000 1.7 +++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 11 Dec 2003 21:40:04 -0000 1.8 @@ -41,7 +41,12 @@ {-user_id ""} {-message_id:required} } { - return [permission::permission_p -party_id $user_id -object_id $message_id -privilege read] + # if the user is a guest, they can't see any forum messages at all + if { ![acs_privacy::user_can_read_private_data_p -user_id $user_id -object_id [ad_conn package_id]] } { + return 0 + } else { + return [permission::permission_p -party_id $user_id -object_id $message_id -privilege read] + } } ad_proc -public require_read_message { Index: openacs-4/packages/forums/www/forum-view-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-oracle.xql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/forums/www/forum-view-oracle.xql 3 Oct 2003 18:26:31 -0000 1.9 +++ openacs-4/packages/forums/www/forum-view-oracle.xql 11 Dec 2003 21:40:05 -0000 1.10 @@ -44,4 +44,15 @@ + + + user_name desc + + + + + user_name asc + + + Index: openacs-4/packages/forums/www/forum-view-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/forum-view-postgresql.xql,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/forums/www/forum-view-postgresql.xql 3 Oct 2003 18:26:31 -0000 1.11 +++ openacs-4/packages/forums/www/forum-view-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.12 @@ -43,5 +43,15 @@ [template::list::orderby_clause -orderby -name "messages"] + + + lower(person__name(fm.user_id)) desc + + + + + lower(person__name(fm.user_id)) asc + + Index: openacs-4/packages/forums/www/forum-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.tcl,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/forums/www/forum-view.tcl 7 Nov 2003 17:24:01 -0000 1.20 +++ openacs-4/packages/forums/www/forum-view.tcl 11 Dec 2003 21:40:05 -0000 1.21 @@ -121,8 +121,8 @@ } user_name { label "#forums.Author#" - orderby_asc {upper(user_name) asc, posting_date desc} - orderby_desc {upper(user_name) desc, posting_date desc} + orderby_asc_name "orderby_user_name_asc" + orderby_desc_name "orderby_user_name_desc" } n_messages { label "#forums.Replies#" Index: openacs-4/packages/forums/www/message-post-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post-confirm.adp,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/forums/www/message-post-confirm.adp 10 Oct 2003 17:09:44 -0000 1.11 +++ openacs-4/packages/forums/www/message-post-confirm.adp 11 Dec 2003 21:40:05 -0000 1.12 @@ -30,13 +30,6 @@
    - - #forums.lt_Would_you_like_to_att# - #forums.No# - #forums.Yes# -
    -
    - Index: openacs-4/packages/forums/www/message-post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-post.tcl,v diff -u -N -r1.28 -r1.29 --- openacs-4/packages/forums/www/message-post.tcl 7 Nov 2003 17:24:01 -0000 1.28 +++ openacs-4/packages/forums/www/message-post.tcl 11 Dec 2003 21:40:05 -0000 1.29 @@ -112,14 +112,17 @@ element create message attach_p \ -label [_ forums.Attach] \ -datatype text \ - -widget hidden \ - -optional + -widget radio \ + -value 0 \ + -options [list [list [_ forums.No] 0] [list [_ forums.Yes] 1]] } if {[form is_valid message]} { form get_values message \ - message_id forum_id parent_id subject content html_p confirm_p subscribe_p anonymous_p - + message_id forum_id parent_id subject content html_p confirm_p subscribe_p anonymous_p + if {$attachments_enabled_p} { + form get_values message attach_p + } if { !$anonymous_allowed_p } { set anonymous_p 0 } @@ -131,7 +134,8 @@ set subject.spellcheck ":nospell:" set content.spellcheck ":nospell:" set content [string trimright $content] - set exported_vars [export_form_vars message_id forum_id parent_id subject content html_p confirm_p subject.spellcheck content.spellcheck anonymous_p] + + set exported_vars [export_form_vars message_id forum_id parent_id subject content html_p confirm_p subject.spellcheck content.spellcheck anonymous_p attach_p] set message(html_p) $html_p set message(subject) $subject @@ -261,4 +265,3 @@ } else { lappend context [_ forums.Post_a_Message] } - Index: openacs-4/packages/gatekeeper/gatekeeper.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/gatekeeper/gatekeeper.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/gatekeeper/gatekeeper.info 17 May 2003 10:44:02 -0000 1.2 +++ openacs-4/packages/gatekeeper/gatekeeper.info 11 Dec 2003 21:40:05 -0000 1.3 @@ -1,20 +1,21 @@ - + GateKeeper GateKeepers f - + oracle postgresql - Joseph Bank - Provides ability to retrieve remote URL's in a controlled way. + Joseph Bank + Provides ability to retrieve remote URLs in a controlled way. 2001-01-19 - ArsDigita Corporation + OpenACS + Gatekeeper can act as a proxy for requests, passing a request on to another server via an http GET or POST and returning the resulting document via the existing connection Index: openacs-4/packages/general-comments/general-comments.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/general-comments.info,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/general-comments/general-comments.info 10 Nov 2003 16:36:31 -0000 1.10 +++ openacs-4/packages/general-comments/general-comments.info 11 Dec 2003 21:40:05 -0000 1.11 @@ -1,7 +1,7 @@ - + General Comments General Comments f @@ -10,14 +10,15 @@ Don Baccus - Provides commenting facility on objects. + Service to provide comment entry and display on objects. 2003-01-30 OpenACS + General comments provides the widgets and UI to support commentability on any object. There is also an admin interface to edit/hide/delete comments. - - - + + + Index: openacs-4/packages/glossary/glossary.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/glossary/glossary.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/glossary/glossary.info 17 May 2003 10:45:36 -0000 1.6 +++ openacs-4/packages/glossary/glossary.info 11 Dec 2003 21:40:05 -0000 1.7 @@ -1,28 +1,30 @@ - + Glossary Glossaries f f - + oracle postgresql - Dennis Gregorovic - Users can create glossaries which contain terms and their definitions. + Dennis Gregorovic + User maintained glossary. 2001-02-06 - ArsDigita Corporation - The Glossary Package is based on the ACS 3.x glossary module which was simply a repository for a site's terms and their definitions. + OpenACS + + The glossary package supports glossaries for multiple + contexts. A site, subsite, group, user, or even a document + may have one or more glossaries associated with it. Terms may have + illustrations (acs-content-repository). Each glossary can have its + security set (acs-permissions), a workflow, and optionally except user + comments. A glossary's content is stored in the content repository. Relies on the deprecated acs-workflow module. + -In the process of migrating the glossary to an ACS 4.0 package, we will expand it's feature set to support multiple contexts. A site, subsite, group, user, or -even document (a this point the document must exist in the database as an ACS object) may have one or more glossaries associated with it. Terms may -have illustrations (acs-content-repository). Each glossary can have its security set (acs-permissions), a workflow, and optionally except user comments. A -glossary's content will be stored in the content repository and its presentation will use the ArsDigita Templating System (ATS). - Index: openacs-4/packages/lars-blogger/lars-blogger.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/lars-blogger.info,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/lars-blogger/lars-blogger.info 8 Dec 2003 05:19:50 -0000 1.27 +++ openacs-4/packages/lars-blogger/lars-blogger.info 11 Dec 2003 21:40:05 -0000 1.28 @@ -7,18 +7,18 @@ f f - + Lars Pind Simon Carstensen - Write your own web log + Individual or collaborative web logs. 2003-11-10 Collaboraid - Manages multiple weblogs for your wbsite. + Weblog creation and management with notifications, RSS, archives, draft and published entries, includable templates for presenting on other pages, and permissioning for multiple users. - + - + @@ -29,7 +29,7 @@ - + Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-pb.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-pb.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-pb.sql 8 Dec 2003 05:10:23 -0000 1.1 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-categories-pb.sql 11 Dec 2003 21:40:05 -0000 1.2 @@ -12,7 +12,7 @@ p_category_id alias for $1; v_name varchar; begin - select title into v_name + select name into v_name from pinds_blog_categories where category_id = p_category_id; return v_name; Index: openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-1.0a2-1.0a3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-1.0a2-1.0a3.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-1.0a2-1.0a3.sql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,14 @@ +-- this had select title into v_name but title did not exist +-- +create or replace function pinds_blog_category__name (integer) +returns varchar as ' +declare + p_category_id alias for $1; + v_name varchar; +begin + select name into v_name + from pinds_blog_categories + where category_id = p_category_id; + return v_name; +end; +' language 'plpgsql'; Index: openacs-4/packages/lars-blogger/tcl/category-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/category-procs-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/category-procs-oracle.xql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,22 @@ + + + + oracle8.1.6 + + + + begin + :1 := pinds_blog_category.new ( + category_id => :category_id, + package_id => :package_id, + name => :name, + short_name => :short_name, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + + + + + Index: openacs-4/packages/lars-blogger/tcl/category-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/category-procs-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/category-procs-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,20 @@ + + + + postgresql7.1 + + + + select pinds_blog_category__new ( + :category_id, + :package_id, + :name, + :short_name, + :creation_user, + :creation_ip + ) + + + + + Index: openacs-4/packages/lars-blogger/tcl/category-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/category-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/category-procs.tcl 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,48 @@ +ad_library { + Category Tcl APi +} + +namespace eval lars_blogger {} +namespace eval lars_blogger::category {} + +ad_proc lars_blogger::category::new { + {-package_id ""} + {-name:required} + {-category_id ""} + {-short_name ""} +} { + @return category_id of new category +} { + set creation_user [ad_conn user_id] + set creation_ip [ns_conn peeraddr] + + if { [empty_string_p $category_id] } { + set category_id [db_nextval acs_object_id_seq] + } + if { [empty_string_p $package_id] } { + set package_id [ad_conn package_id] + } + if { [empty_string_p $short_name] } { + set existing_short_names [lars_blogger::category::get_existing_short_names -package_id $package_id] + set short_name [util_text_to_url -existing_urls $existing_short_names -text $name] + } + + return [db_exec_plsql insert_category {}] +} + +ad_proc lars_blogger::category::edit { + {-category_id:required} + {-name:required} + {-short_name ""} +} { + @return category_id of new category +} { + return [db_exec_plsql update_category {}] +} + +ad_proc lars_blogger::category::get_existing_short_names { + {-package_id ""} +} { + return [db_list short_names {}] +} + Index: openacs-4/packages/lars-blogger/tcl/category-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/category-procs.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/category-procs.xql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,23 @@ + + + + + + + select short_name + from pinds_blog_categories + where package_id = :package_id + + + + + + update pinds_blog_categories + set name = :name, + short_name = :short_name + where category_id = :category_id + + + + + Index: openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 8 Dec 2003 04:47:53 -0000 1.5 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 11 Dec 2003 21:40:05 -0000 1.6 @@ -3,6 +3,25 @@ oracle8.1.6 + + + begin + :1 := pinds_blog_entry.new ( + entry_id => :entry_id, + package_id => :package_id, + title => :title, + title_url => :title_url, + content => :content, + content_format => :content_format, + entry_date => nvl(to_date(:entry_date, 'YYYY-MM-DD'), sysdate), + draft_p => :draft_p, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + + + select b.entry_id, Index: openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 8 Dec 2003 04:47:53 -0000 1.5 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.6 @@ -3,6 +3,24 @@ postgresql7.1 + + + select pinds_blog_entry__new ( + :entry_id, + :package_id, + :title, + :title_url, + :category_id, + :content, + :content_format, + coalesce(to_date(:entry_date, 'YYYY-MM-DD'), current_timestamp), + :draft_p, + :creation_user, + :creation_ip + ) + + + select b.entry_id, Index: openacs-4/packages/lars-blogger/tcl/entry-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/entry-procs.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 8 Dec 2003 05:19:49 -0000 1.10 +++ openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 11 Dec 2003 21:40:05 -0000 1.11 @@ -2,8 +2,46 @@ Entry procs for blogger. } +namespace eval lars_blogger {} namespace eval lars_blogger::entry {} +ad_proc -public lars_blogger::entry::new { + {-entry_id ""} + {-package_id ""} + {-title:required} + {-title_url ""} + {-category_id ""} + {-content ""} + {-content_format "text/plain"} + {-entry_date ""} + {-draft_p "t"} +} { + Add the blog entry and then flush the cache so that the new entry shows up. +} { + set creation_user [ad_conn user_id] + set creation_ip [ns_conn peeraddr] + + if { [empty_string_p $package_id] } { + set package_id [ad_conn package_id] + } + + db_transaction { + # Create the entry + set entry_id [db_exec_plsql entry_add {}] + lars_blog_flush_cache $package_id + } + + # If publish directly, fire off notifications and ping weblogs.com + if { [string equal $draft_p "f"] } { + lars_blogger::entry::publish \ + -entry_id $entry_id \ + -package_id $package_id \ + -no_update + } + + return $entry_id +} + ad_proc -public lars_blogger::entry::get { -entry_id:required -array:required @@ -30,7 +68,7 @@ } { if { !$no_update_p } { # Set draft_p = 'f' - db_dml update_entry { *SQL* } + db_dml update_entry {} # Flush cache lars_blog_flush_cache } @@ -40,12 +78,9 @@ ns_conn close } - # Setup instance feed if needed + # Setup instance/user feeds if needed lars_blog_setup_feed -package_id $package_id - # Setup user feed if needed - lars_blog_setup_feed -user -package_id $package_id - # Notifications lars_blogger::entry::do_notifications -entry_id $entry_id Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 8 Dec 2003 05:23:42 -0000 1.5 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 11 Dec 2003 21:40:05 -0000 1.6 @@ -3,31 +3,6 @@ oracle8.1.6 - - - begin - :1 := pinds_blog_entry.new ( - entry_id => :entry_id, - package_id => :package_id, - title => :title, - title_url => :title_url, - content => :content, - content_format => :content_format, - entry_date => to_date(:entry_date, 'YYYY-MM-DD'), - draft_p => :draft_p, - creation_user => :creation_user, - creation_ip => :creation_ip - ); - end; - - - - - - posted_date = sysdate - - - begin Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 8 Dec 2003 05:23:42 -0000 1.6 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.7 @@ -3,30 +3,6 @@ postgresql7.1 - - - select pinds_blog_entry__new ( - :entry_id, - :package_id, - :title, - :title_url, - :category_id, - :content, - :content_format, - to_date(:entry_date, 'YYYY-MM-DD'), - :draft_p, - :creation_user, - :creation_ip - ) - - - - - - posted_date = current_timestamp - - - select weblogger_channel__new ( Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 8 Dec 2003 05:23:42 -0000 1.14 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 11 Dec 2003 21:40:05 -0000 1.15 @@ -5,7 +5,7 @@ @cvs-id $Id$ } -ad_proc -public lars_blog_entry_add { +ad_proc -deprecated -warn lars_blog_entry_add { {-entry_id:required} {-package_id:required} {-title:required} @@ -16,26 +16,18 @@ {-entry_date:required} {-draft_p:required} } { - Add the blog entry and then flush the cache so that the new entry shows up. + Add the blog entry and then flush the cache so that the new entry shows up. } { - set creation_user [ad_conn user_id] - set creation_ip [ns_conn peeraddr] - - db_transaction { - # Create the entry - set entry_id [db_exec_plsql entry_add {}] - lars_blog_flush_cache $package_id - } - - # If publish directly, fire off notifications and ping weblogs.com - if { [string equal $draft_p "f"] } { - lars_blogger::entry::publish \ - -entry_id $entry_id \ - -package_id $package_id \ - -no_update - } - - return $entry_id + return [lars_blogger::entry::new \ + -entry_id $entry_id \ + -package_id $package_id \ + -title $title \ + -title_url $title_url \ + -category_id $category_id \ + -content $content \ + -content_format $content_format \ + -entry_date $entry_date \ + -draft_p $draft_p] } ad_proc -public lars_blog_entry_edit { @@ -105,61 +97,64 @@ set creation_user [ad_conn user_id] set creation_ip [ns_conn peeraddr] - if { !$user_p } { - if { [parameter::get -parameter "package_rss_feed_p" -default 1]} { + # Package feed + if { [parameter::get -parameter "package_rss_feed_p" -package_id $package_id -default 1] } { + + # check whether there's been a channel setup for this instance + set summary_context_id [db_string select_instance_channel {} -default {}] - # check whether there's been a channel setup for this instance - set summary_context_id [db_string select_instance_channel {} -default {}] + if { [empty_string_p $summary_context_id] } { + # Setup a channel for this instance + set summary_context_id [db_exec_plsql create_instance_channel {}] + } + + # check whether there's been a feed setup for this instance + set exists_instance_feed_p [db_string exists_instance_feed_p {}] + + if { [string equal $exists_instance_feed_p "0"] } { + # Setup an RSS feed for this instance + set channel_link [lars_blog_public_package_url] - if { [empty_string_p $summary_context_id] } { - # Setup a channel for this instance - set summary_context_id [db_exec_plsql create_instance_channel {}] - } + set subscr_id [db_exec_plsql create_subscr {}] + db_dml update_subscr {} - # check whether there's been a feed setup for this instance - set exists_instance_feed_p [db_string exists_instance_feed_p {}] - - if { [string equal $exists_instance_feed_p "0"] } { - # Setup an RSS feed for this instance - set channel_link [lars_blog_public_package_url] - - set subscr_id [db_exec_plsql create_subscr {}] - db_dml update_subscr {} - - # Run it now - rss_gen_report $subscr_id - } + # Run it now + rss_gen_report $subscr_id } - } else { - if {[parameter::get -parameter "user_rss_feed_p" -default 0]} { + } - # check whether there's been a channel setup for this instance - set summary_context_id [db_string select_user_channel {} -default {}] + if { [parameter::get -parameter "user_rss_feed_p" -package_id $package_id -default 0] } { - if { [empty_string_p $summary_context_id] } { - # Setup a channel for this instance - set summary_context_id [db_exec_plsql create_user_channel {}] - } + # check whether there's been a channel setup for this instance + set summary_context_id [db_string select_user_channel {} -default {}] - # check whether there's been a feed setup for this user - set exists_user_feed_p [db_string exists_user_feed_p {}] - set screen_name [db_string screen_name {}] + if { [empty_string_p $summary_context_id] } { + # Setup a channel for this instance + set summary_context_id [db_exec_plsql create_user_channel {}] + } - if { [string equal $exists_user_feed_p "0"] && ![empty_string_p $screen_name] } { - # Setup an RSS feed for the user - set channel_link "[lars_blog_public_package_url]user/$screen_name/" + # check whether there's been a feed setup for this user + set exists_user_feed_p [db_string exists_user_feed_p {}] - set subscr_id [db_exec_plsql create_subscr {}] - db_dml update_subscr {} - + if { !$exists_user_feed_p } { + set screen_name [acs_user::get_element -user_id $creation_user -element screen_name] + + if { ![empty_string_p $screen_name] } { + # Setup an RSS feed for the user + set channel_link "[lars_blog_public_package_url]user/$screen_name/" + + set subscr_id [db_exec_plsql create_subscr {}] + db_dml update_subscr {} + # Run it now rss_gen_report $subscr_id + } else { + ns_log Warning "lars-blogger: User $creation_user has no screen_name, cannot setup an RSS feed for user" } } } } - ad_proc -private lars_blog_get_as_string_mem { package_id admin_p Index: openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.xql 8 Dec 2003 05:23:42 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.xql 11 Dec 2003 21:40:05 -0000 1.4 @@ -80,23 +80,4 @@ - - - select screen_name from users where user_id = :creation_user - - - - - - - select p.package_id - from apm_packages p, acs_object_party_privilege_map perm - where p.package_key = 'lars-blogger' - and p.package_id = perm.object_id - and perm.privilege = 'create' - and perm.party_id = :user_id - - - - Index: openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-oracle.xql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,15 @@ + + + + oracle8.1.6 + + + + select site_node.url(node_id) as url_stub + from site_nodes s, pinds_blog_entries e + where e.entry_id = :object_id + and s.object_id = e.package_id + + + + Index: openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.2 @@ -0,0 +1,15 @@ + + + + postgresql7.1 + + + + select site_node__url(node_id) as url_stub + from site_nodes s, pinds_blog_entries e + where e.entry_id = :object_id + and s.object_id = e.package_id + + + + Index: openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs.tcl 28 Aug 2003 09:41:55 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs.tcl 11 Dec 2003 21:40:05 -0000 1.4 @@ -34,11 +34,7 @@ @creation-date 2002-11-18 } { - db_1row get_url_stub " - select site_node__url(node_id) as url_stub - from site_nodes s, pinds_blog_entries e - where e.entry_id = :object_id - and s.object_id = e.package_id" + db_1row get_url_stub {} set url "${url_stub}one-entry?entry_id=$object_id" Index: openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 28 Sep 2003 16:24:52 -0000 1.4 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 11 Dec 2003 21:40:05 -0000 1.5 @@ -13,51 +13,41 @@ select * from (select entry_id, - title, - content, - entry_date, - posted_date, - to_char(posted_date, 'YYYY-MM-DD') as posted_date_string, - to_char(posted_date, 'HH:MI') as posted_time_string, - to_char(posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, - -6 as tzoffset_hour, - 0 as tzoffset_minute, - to_char(entry_date, 'DD Mon YYYY hh12:MI am') as entry_date_pretty, - to_char(entry_date, 'YYYY/MM/') as entry_archive_url - from pinds_blog_entries - where package_id = :package_id - and draft_p = 'f' - and deleted_p = 'f' - order by entry_date desc, posted_date desc) + e.title, + e.content, + to_char(e.posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, + c.name as category + from pinds_blog_entries e, + pinds_blog_categories c + where e.package_id = :package_id + and e.draft_p = 'f' + and e.deleted_p = 'f' + and c.category_id = e.category_id (+) + order by e.entry_date desc, e.posted_date desc) where rownum < 11 select * - from (select entry_id, - title, - content, - entry_date, - posted_date, - to_char(posted_date, 'YYYY-MM-DD') as posted_date_string, - to_char(posted_date, 'HH:MI') as posted_time_string, - to_char(posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, - -6 as tzoffset_hour, - 0 as tzoffset_minute, - to_char(entry_date, 'DD Mon YYYY hh12:MI am') as entry_date_pretty, - to_char(entry_date, 'YYYY/MM/') as entry_archive_url + from (select e.entry_id, + e.title, + e.content, + to_char(e.posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, + c.name as category from pinds_blog_entries e, acs_objects o, - users u - where e.package_id = :package_id - and o.object_id = e.entry_id - and o.creation_user = :user_id - and u.user_id = o.creation_user - and e.draft_p = 'f' - and e.deleted_p = 'f' - order by e.entry_date desc, e.posted_date desc) + users u, + pinds_blog_categories c + where e.package_id = :package_id + and o.object_id = e.entry_id + and o.creation_user = :user_id + and u.user_id = o.creation_user + and e.draft_p = 'f' + and e.deleted_p = 'f' + and c.category_id = e.category_id (+) + order by e.entry_date desc, e.posted_date desc) where rownum < 11 Index: openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 29 Sep 2003 19:53:30 -0000 1.5 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 11 Dec 2003 21:40:05 -0000 1.6 @@ -14,15 +14,7 @@ select e.entry_id, e.title, e.content, - e.entry_date, - e.posted_date, - to_char(e.posted_date, 'YYYY-MM-DD') as posted_date_string, - to_char(e.posted_date, 'HH:MI') as posted_time_string, to_char(e.posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, - extract(timezone_hour from now()) as tzoffset_hour, - extract(timezone_minute from now()) as tzoffset_minute, - to_char(e.entry_date, 'DD Mon YYYY hh12:MI am') as entry_date_pretty, - to_char(e.entry_date, 'YYYY/MM/') as entry_archive_url, c.name as category from pinds_blog_entries e left outer join pinds_blog_categories c using (category_id) @@ -36,28 +28,21 @@ - select entry_id, - title, - content, - entry_date, - posted_date, - to_char(posted_date, 'YYYY-MM-DD') as posted_date_string, - to_char(posted_date, 'HH:MI') as posted_time_string, - to_char(posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, - extract(timezone_hour from now()) as tzoffset_hour, - extract(timezone_minute from now()) as tzoffset_minute, - to_char(entry_date, 'DD Mon YYYY hh12:MI am') as entry_date_pretty, - to_char(entry_date, 'YYYY/MM/') as entry_archive_url - - from pinds_blog_entries e join - acs_objects o on (o.object_id = e.entry_id) join - users u on (u.user_id = o.creation_user) - where e.package_id = :package_id - and o.creation_user = :user_id - and e.draft_p = 'f' - and e.deleted_p = 'f' - order by e.entry_date desc, e.posted_date desc - limit 10 + select e.entry_id, + e.title, + e.content, + to_char(e.posted_date, 'YYYY-MM-DD HH24:MI:SS') as posted_time_ansi, + c.name as category + from pinds_blog_entries e join + acs_objects o on (o.object_id = e.entry_id) join + users u on (u.user_id = o.creation_user) left outer join + pinds_blog_categories c using (category_id) + where e.package_id = :package_id + and o.creation_user = :user_id + and e.draft_p = 'f' + and e.deleted_p = 'f' + order by e.entry_date desc, e.posted_date desc + limit 10 Index: openacs-4/packages/lars-blogger/tcl/rss-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/rss-procs.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 29 Sep 2003 19:53:30 -0000 1.8 +++ openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 11 Dec 2003 21:40:05 -0000 1.9 @@ -5,6 +5,35 @@ @cvs-id $Id$ } +namespace eval lars_blogger {} +namespace eval lars_blogger::rss {} + + +ad_proc -public lars_blogger::rss::get_subscr_id_list { + {-package_id ""} +} { + if { [empty_string_p $package_id] } { + set package_id [ad_conn package_id] + } + + return [db_list select_subscr { + select s.subscr_id + from rss_gen_subscrs s + where s.summary_context_id = :package_id + or s.summary_context_id in (select c.channel_id + from weblogger_channels c + where c.package_id = :package_id) + }] +} + +ad_proc -public lars_blogger::rss::generate { + {-package_id ""} +} { + foreach subscr_id [lars_blogger::rss::get_subscr_id_list -package_id $package_id] { + rss_gen_report $subscr_id + } +} + ad_proc -private lars_blog__rss_datasource { summary_context_id } { @@ -13,7 +42,6 @@ @author Lars Pind (lars@pinds.com) } { - db_transaction { db_1row select_package_id_user_id {} @@ -25,7 +53,7 @@ set blog_url "[ad_url]$package_url" } - + set column_array(channel_title) $blog_title set column_array(channel_description) $blog_title Index: openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/lars-blogger/tcl/test/entry-test-procs.tcl 11 Dec 2003 21:40:06 -0000 1.2 @@ -0,0 +1,68 @@ +ad_library { + Test cases for the entry API. +} + +aa_register_case rss_generation { + Test RSS generation +} { + # Test case written to expose bug in RSS datasource generation: + # The queries had not been updated to get category name. + + aa_run_with_teardown \ + -rollback \ + -test_code { + + # Setup a screen_name + set screen_name [ad_generate_random_string] + acs_user::update -user_id [ad_conn user_id] -screen_name $screen_name + + # Generate a node name + set node_name [site_node::verify_folder_name \ + -parent_node_id [site_node::get_node_id -url /] \ + -instance_name "Weblogger"] + + # Create a package + set package_id [site_node::instantiate_and_mount \ + -package_key "lars-blogger" \ + -node_name $node_name] + + # Create a category + set category_name [ad_generate_random_string] + set category_id [lars_blogger::category::new \ + -name $category_name] + + # Configure to set up a package and user RSS feed + parameter::set_value -parameter "package_rss_feed_p" -package_id $package_id -value 1 + parameter::set_value -parameter "user_rss_feed_p" -package_id $package_id -value 1 + + # Create an entry + set content [ad_generate_random_string] + set entry_id [lars_blogger::entry::new \ + -package_id $package_id \ + -title "Testing" \ + -category_id $category_id \ + -content $content \ + -draft_p "f"] + + lars_blogger::entry::get \ + -entry_id $entry_id \ + -array entry + + aa_equals "Entry content is correct" $entry(content) $content + aa_equals "Entry category is correct" $entry(category_name) $category_name + + # Force a rebuild of the RSS feeds + lars_blogger::rss::generate -package_id $package_id + + # Check that we have to RSS subscriptions + set subscr_ids [lars_blogger::rss::get_subscr_id_list -package_id $package_id] + aa_equals "Two RSS subscriptions (one package, one user)" [llength $subscr_ids] 2 + + # Find the directory, and verify that it exists + foreach subscr_id $subscr_ids { + set report_dir [rss_gen_report_dir -subscr_id $subscr_id] + set report_file $report_dir/rss.xml + aa_true "Report file $report_file exists" [file exists $report_file] + } + } +} Index: openacs-4/packages/lars-blogger/www/category-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/category-edit.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/www/category-edit.tcl 16 Oct 2003 21:42:22 -0000 1.5 +++ openacs-4/packages/lars-blogger/www/category-edit.tcl 11 Dec 2003 21:40:06 -0000 1.6 @@ -56,10 +56,7 @@ } -on_submit { - if { [empty_string_p $short_name] } { - set existing_short_names [db_list short_names {}] - set short_name [util_text_to_url -existing_urls $existing_short_names -text $name] - } else { + if { ![empty_string_p $short_name] } { db_1row short_name_exists { *SQL* } if { $short_name_exists > 0 } { form set_error category short_name "This short name is already used by another category" @@ -69,13 +66,18 @@ } -new_data { - set creation_user [ad_conn user_id] - set creation_ip [ns_conn peeraddr] + lars_blogger::category::new \ + -name $name \ + -category_id $category_id \ + -short_name $short_name - db_exec_plsql insert_category {} - } -edit_data { - db_dml update_category {} + + lars_blogger::category::edit \ + -category_id $category_id \ + -name $name \ + -short_name $short_name + } -after_submit { ad_returnredirect $return_url ad_script_abort Index: openacs-4/packages/lars-blogger/www/category-edit.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/category-edit.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/category-edit.xql 17 Oct 2003 00:39:22 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/category-edit.xql 11 Dec 2003 21:40:06 -0000 1.4 @@ -48,14 +48,5 @@ - - - update pinds_blog_categories - set name = :name, - short_name = :short_name - where category_id = :category_id - - - Index: openacs-4/packages/lars-blogger/www/drafts.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/drafts.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/lars-blogger/www/drafts.tcl 7 Nov 2003 17:35:42 -0000 1.4 +++ openacs-4/packages/lars-blogger/www/drafts.tcl 11 Dec 2003 21:40:06 -0000 1.5 @@ -20,6 +20,11 @@ link_url_eval {[export_vars -base entry-edit { entry_id { return_url [ad_return_url] } }]} link_html { title "Edit entry" } } +lappend elements title { + label "Title" + link_url_eval {[export_vars -base one-entry { entry_id }]} + link_html { title "Preview entry" } +} lappend elements entry_date { label "Date" display_col entry_date_pretty @@ -37,9 +42,7 @@ } lappend elements content { - label "Entry" - link_url_eval {[export_vars -base one-entry { entry_id { return_url [ad_return_url] } }]} - link_html { title "Preview entry" } + label "Content" } lappend elements publish { label {Publish} Index: openacs-4/packages/lars-blogger/www/drafts.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/drafts.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/drafts.xql 16 Oct 2003 23:10:45 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/drafts.xql 11 Dec 2003 21:40:06 -0000 1.4 @@ -13,7 +13,7 @@ u.last_name from pinds_blog_entries e, acs_objects o, - all_users u + acs_users_all u where e.package_id = :package_id and e.draft_p = 't' and e.deleted_p = 'f' @@ -35,7 +35,7 @@ u.last_name from pinds_blog_entries e, acs_objects o, - all_users u + acs_users_all u where e.package_id = :package_id and e.draft_p = 't' and e.deleted_p = 'f' Index: openacs-4/packages/lars-blogger/www/entry-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-edit.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/lars-blogger/www/entry-edit.tcl 8 Dec 2003 05:23:42 -0000 1.9 +++ openacs-4/packages/lars-blogger/www/entry-edit.tcl 11 Dec 2003 21:40:06 -0000 1.10 @@ -106,7 +106,7 @@ set insert_or_update [element get_value entry insert_or_update] if { [string equal $insert_or_update "insert"] } { - lars_blog_entry_add \ + lars_blogger::entry::new \ -entry_id $entry_id \ -package_id $package_id \ -title $title \ @@ -119,15 +119,35 @@ } else { permission::require_write_permission -object_id $entry_id - lars_blog_entry_edit \ - -entry_id $entry_id \ - -title $title \ - -title_url $title_url \ - -category_id $category_id \ - -content $content \ - -content_format $content_format \ - -entry_date $entry_date \ - -draft_p $draft_p + set set_clauses { + "title = :title" + "title_url = :title_url" + "category_id = :category_id" + "content = :content" + "content_format = :content_format" + "entry_date = to_date(:entry_date, 'YYYY-MM-DD')" + "draft_p = :draft_p" + } + + set org_draft_p [db_string org_draft_p { select draft_p from pinds_blog_entries where entry_id = :entry_id } ] + + # Is this a publish? + if { [string equal $draft_p "t"] && [string equal $org_draft_p "f"] } { + # set the posted_date to now + lappend set_clauses [db_map now] + } + + db_dml update_entry {} + + # Is this a publish? + if { [string equal $draft_p "t"] && [string equal $org_draft_p "f"] } { + # do notifications + lars_blogger::entry::do_notifications -entry_id $entry_id + # and ping weblogs.com + lars_blog_weblogs_com_update_ping + } + + lars_blog_flush_cache $package_id } if { [empty_string_p $return_url] } { Index: openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl 28 Aug 2003 09:41:56 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl 11 Dec 2003 21:40:06 -0000 1.3 @@ -2,7 +2,7 @@ Setup an RSS feed for this blogger. } -# Setup instance feed if needed +# Setup instance/user feeds if needed lars_blog_setup_feed ad_returnredirect . Index: openacs-4/packages/logger/logger.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/logger.info,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/logger/logger.info 8 Oct 2003 16:05:25 -0000 1.8 +++ openacs-4/packages/logger/logger.info 11 Dec 2003 21:40:06 -0000 1.9 @@ -7,14 +7,14 @@ f f - + Lars Pind Peter Marklund - Supports time and expenses reporting. Full specification is here: http://www.collaboraid.biz/developer/logger-spec + Time and expenses reporting. 2003-05-08 - Collaboraid - - + Collaboraid + Logger lets you keep track of measurements over time. The primary use case is time and expenses reporting, an area where we are being guided by the HR-XML Time Expense Reporting 2.0 standard. However, the intention is to allow for reporting of arbitrary types of numerical data such as financial results - account balance, revenue etc. You could even use this application to monitor your weight. The full specification is here: <a href="http://www.collaboraid.biz/developer/logger-spec">http://www.collaboraid.biz/developer/logger-spec<a> + Index: openacs-4/packages/logger/sql/oracle/logger-packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/oracle/logger-packages-create.sql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/logger/sql/oracle/logger-packages-create.sql 30 Sep 2003 12:10:08 -0000 1.6 +++ openacs-4/packages/logger/sql/oracle/logger-packages-create.sql 11 Dec 2003 21:40:06 -0000 1.7 @@ -131,17 +131,18 @@ logger_entry.del(rec.entry_id); end loop; - -- Delete all variables only mapped to this project. + -- Delete all variables only mapped to this project that are not preinstalled (time, expenses) for rec in (select variable_id - from logger_variables - where exists (select 1 - from logger_project_pkg_map - where project_id = logger_project.del.project_id - ) - and not exists (select 1 - from logger_project_pkg_map - where project_id <> logger_project.del.project_id + from logger_variables + where package_id is not null + and exists (select 1 + from logger_project_pkg_map + where project_id = logger_project.del.project_id ) + and not exists (select 1 + from logger_project_pkg_map + where project_id <> logger_project.del.project_id + ) ) loop logger_variable.del(rec.variable_id); Index: openacs-4/packages/logger/sql/oracle/upgrade/upgrade-1.0b2-1.0b3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/oracle/upgrade/upgrade-1.0b2-1.0b3.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/sql/oracle/upgrade/upgrade-1.0b2-1.0b3.sql 11 Dec 2003 21:40:06 -0000 1.2 @@ -0,0 +1,95 @@ +-- +-- +-- Fixed deleting projects also deleting pre-installed variables +-- +-- @cvs-id $Id: upgrade-1.0b2-1.0b3.sql,v 1.2 2003/12/11 21:40:06 jeffd Exp $ +-- + +create or replace package body logger_project +as + function new ( + project_id in integer default null, + name in logger_projects.name%TYPE, + description in logger_projects.description%TYPE default null, + project_lead in integer, + creation_user in acs_objects.creation_user%TYPE, + creation_ip in acs_objects.creation_ip%TYPE default null, + package_id in apm_packages.package_id%TYPE + ) return integer + is + v_project_id integer; + begin + v_project_id := acs_object.new( + object_id => project_id, + object_type => 'logger_project', + context_id => package_id, + creation_ip => creation_ip, + creation_user => creation_user + ); + + insert into logger_projects (project_id, name, description, project_lead) + values (v_project_id, name, description, project_lead); + + insert into logger_project_pkg_map (project_id, package_id) + values (v_project_id, logger_project.new.package_id); + + return v_project_id; + end new; + + procedure del ( + project_id in integer + ) + is + begin + -- Delete all entries in the project + for rec in (select entry_id + from logger_entries + where project_id = logger_project.del.project_id + ) + loop + logger_entry.del(rec.entry_id); + end loop; + + -- Delete all variables only mapped to this project that are not preinstalled (time, expenses) + for rec in (select variable_id + from logger_variables + where package_id is not null + and exists (select 1 + from logger_project_pkg_map + where project_id = logger_project.del.project_id + ) + and not exists (select 1 + from logger_project_pkg_map + where project_id <> logger_project.del.project_id + ) + ) + loop + logger_variable.del(rec.variable_id); + end loop; + + -- Delete the project acs object. This will cascade the row in the logger_projects table + -- as well as all projections in the project + -- acs_object.delete should delete permissions for us but this change is not on cvs head yet + delete from acs_permissions where object_id = project_id; + acs_object.del(project_id); + + end del; + + function name ( + project_id in integer + ) return varchar2 + is + v_name logger_projects.name%TYPE; + begin + select name + into v_name + from logger_projects + where project_id = name.project_id; + + return v_name; + end name; + +end logger_project; +/ +show errors; + Index: openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql 9 May 2003 11:04:13 -0000 1.5 +++ openacs-4/packages/logger/sql/postgresql/logger-packages-create.sql 11 Dec 2003 21:40:07 -0000 1.6 @@ -65,17 +65,18 @@ perform logger_entry__del(v_rec.entry_id); end loop; - -- Delete all variables only mapped to this project. + -- Delete all variables only mapped to this project that are not preinstalled (time, expenses) for v_rec in select variable_id - from logger_variables - where exists (select 1 + from logger_variables + where package_id is not null + and exists (select 1 from logger_project_pkg_map where project_id = p_project_id ) - and not exists (select 1 - from logger_project_pkg_map - where project_id <> p_project_id - ) + and not exists (select 1 + from logger_project_pkg_map + where project_id <> p_project_id + ) loop perform logger_variable__del(v_rec.variable_id); end loop; Index: openacs-4/packages/logger/sql/postgresql/upgrade/upgrade-1.0b2-1.0b3.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/sql/postgresql/upgrade/upgrade-1.0b2-1.0b3.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/sql/postgresql/upgrade/upgrade-1.0b2-1.0b3.sql 11 Dec 2003 21:40:07 -0000 1.2 @@ -0,0 +1,47 @@ +-- +-- +-- Fixed deleting projects also deleting pre-installed variables +-- +-- @cvs-id $Id: upgrade-1.0b2-1.0b3.sql,v 1.2 2003/12/11 21:40:07 jeffd Exp $ +-- + +create or replace function logger_project__del (integer) +returns integer as ' +declare + p_project_id alias for $1; + + v_rec record; +begin + -- Delete all entries in the project + for v_rec in select entry_id + from logger_entries + where project_id = p_project_id + loop + perform logger_entry__del(v_rec.entry_id); + end loop; + + -- Delete all variables only mapped to this project. + for v_rec in select variable_id + from logger_variables + where package_id is not null + and exists (select 1 + from logger_project_pkg_map + where project_id = p_project_id + ) + and not exists (select 1 + from logger_project_pkg_map + where project_id <> p_project_id + ) + loop + perform logger_variable__del(v_rec.variable_id); + end loop; + + -- Delete the project acs object. This will cascade the row in the logger_projects table + -- as well as all projections in the project + -- acs_object__delete should delete permissions for us but this change is not on cvs head yet + delete from acs_permissions where object_id = p_project_id; + perform acs_object__delete(p_project_id); + + return 0; +end; ' language 'plpgsql'; + Index: openacs-4/packages/logger/tcl/project-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/project-procs-oracle.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/logger/tcl/project-procs-oracle.xql 1 May 2003 10:00:24 -0000 1.2 +++ openacs-4/packages/logger/tcl/project-procs-oracle.xql 11 Dec 2003 21:40:07 -0000 1.3 @@ -27,4 +27,14 @@ + + + select acs_object.name(p.project_lead), project_lead + from logger_projects p, + logger_project_pkg_map ppm + where ppm.project_id = p.project_id + and ppm.package_id = :package_id + + + Index: openacs-4/packages/logger/tcl/project-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/project-procs-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/logger/tcl/project-procs-postgresql.xql 8 May 2003 13:54:59 -0000 1.3 +++ openacs-4/packages/logger/tcl/project-procs-postgresql.xql 11 Dec 2003 21:40:07 -0000 1.4 @@ -23,4 +23,14 @@ + + + select acs_object__name(p.project_lead), project_lead + from logger_projects p, + logger_project_pkg_map ppm + where ppm.project_id = p.project_id + and ppm.package_id = :package_id + + + Index: openacs-4/packages/logger/tcl/project-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/project-procs.xql,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/logger/tcl/project-procs.xql 28 Aug 2003 09:45:30 -0000 1.6 +++ openacs-4/packages/logger/tcl/project-procs.xql 11 Dec 2003 21:40:07 -0000 1.7 @@ -92,14 +92,4 @@ - - - select acs_object__name(p.project_lead), project_lead - from logger_projects p, - logger_project_pkg_map ppm - where ppm.project_id = p.project_id - and ppm.package_id = :package_id - - - Index: openacs-4/packages/logger/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/Attic/index-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/www/index-oracle.xql 11 Dec 2003 21:40:07 -0000 1.2 @@ -0,0 +1,32 @@ + + + + oracle8.1.6 + + + + select le.entry_id, + acs_permission.permission_p(le.entry_id, :current_user_id, 'delete') as delete_p, + acs_permission.permission_p(le.entry_id, :current_user_id, 'write') as edit_p, + le.time_stamp, + to_char(le.time_stamp, 'fmDyfm fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, + to_char(le.time_stamp, 'IW-YYYY') as time_stamp_week, + le.value, + le.description, + lp.project_id, + lp.name as project_name, + submitter.user_id, + submitter.first_names || ' ' || submitter.last_name as user_name + from logger_entries le, + logger_projects lp, + acs_objects ao, + cc_users submitter + where le.project_id = lp.project_id + and ao.object_id = le.entry_id + and ao.creation_user = submitter.user_id + [list::filter_where_clauses -and -name "entries"] + [list::orderby_clause -orderby -name "entries"] + + + + Index: openacs-4/packages/logger/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/Attic/index-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/logger/www/index-postgresql.xql 11 Dec 2003 21:40:07 -0000 1.2 @@ -0,0 +1,32 @@ + + + + postgresql7.2 + + + + select le.entry_id, + acs_permission__permission_p(le.entry_id, :current_user_id, 'delete') as delete_p, + acs_permission__permission_p(le.entry_id, :current_user_id, 'write') as edit_p, + le.time_stamp, + to_char(le.time_stamp, 'fmDyfm fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, + to_char(le.time_stamp, 'IW-YYYY') as time_stamp_week, + le.value, + le.description, + lp.project_id, + lp.name as project_name, + submitter.user_id, + submitter.first_names || ' ' || submitter.last_name as user_name + from logger_entries le, + logger_projects lp, + acs_objects ao, + cc_users submitter + where le.project_id = lp.project_id + and ao.object_id = le.entry_id + and ao.creation_user = submitter.user_id + [list::filter_where_clauses -and -name "entries"] + [list::orderby_clause -orderby -name "entries"] + + + + Index: openacs-4/packages/logger/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.tcl,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/logger/www/index.tcl 20 Oct 2003 16:10:56 -0000 1.15 +++ openacs-4/packages/logger/www/index.tcl 11 Dec 2003 21:40:07 -0000 1.16 @@ -318,27 +318,6 @@ # This query will override the ad_page_contract value entry_id db_multirow -extend { edit_url delete_url delete_onclick } -unclobber entries select_entries " - select le.entry_id, - acs_permission__permission_p(le.entry_id, :current_user_id, 'delete') as delete_p, - acs_permission__permission_p(le.entry_id, :current_user_id, 'write') as edit_p, - le.time_stamp, - to_char(le.time_stamp, 'fmDyfm fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, - to_char(le.time_stamp, 'IW-YYYY') as time_stamp_week, - le.value, - le.description, - lp.project_id, - lp.name as project_name, - submitter.user_id, - submitter.first_names || ' ' || submitter.last_name as user_name - from logger_entries le, - logger_projects lp, - acs_objects ao, - cc_users submitter - where le.project_id = lp.project_id - and ao.object_id = le.entry_id - and ao.creation_user = submitter.user_id - [list::filter_where_clauses -and -name "entries"] - [list::orderby_clause -orderby -name "entries"] " { set selected_p [string equal [ns_queryget entry_id] $entry_id] set edit_url "log?[export_vars { entry_id { edit t } }]" Index: openacs-4/packages/logger/www/admin/entries-table-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/entries-table-oracle.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/logger/www/admin/entries-table-oracle.xql 8 May 2003 13:56:04 -0000 1.1 +++ openacs-4/packages/logger/www/admin/entries-table-oracle.xql 11 Dec 2003 21:40:07 -0000 1.2 @@ -1,6 +1,7 @@ +oracle8.1.6 Index: openacs-4/packages/logger/www/admin/projection.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/projection.tcl,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/logger/www/admin/projection.tcl 9 Nov 2003 22:57:23 -0000 1.6 +++ openacs-4/packages/logger/www/admin/projection.tcl 11 Dec 2003 21:40:07 -0000 1.7 @@ -62,7 +62,7 @@ {options {[logger::ui::variable_options -project_id $project_id]}} } - {value:text + {value:float {label Value} {html {size 50}} } Index: openacs-4/packages/logger/www/admin/variable-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/variable-delete.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/logger/www/admin/variable-delete.tcl 8 May 2003 13:56:04 -0000 1.3 +++ openacs-4/packages/logger/www/admin/variable-delete.tcl 11 Dec 2003 21:40:07 -0000 1.4 @@ -17,7 +17,7 @@ set n_log_entries [db_string n_log_entries {}] if { $n_log_entries > 0 } { - ad_return_complaint "Variable is in use" "You cannot delete this variable as it is being used by log entries" + ad_return_complaint 1 "Variable is in use: you cannot delete this variable as it is being used by log entries" ad_script_abort } Index: openacs-4/packages/logger/www/lib/entries-table-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table-oracle.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/logger/www/lib/entries-table-oracle.xql 9 Nov 2003 16:40:26 -0000 1.3 +++ openacs-4/packages/logger/www/lib/entries-table-oracle.xql 11 Dec 2003 21:40:07 -0000 1.4 @@ -19,7 +19,7 @@ from logger_entries le, logger_projects lp, acs_objects ao, - all_users submitter + acs_users_all submitter where le.project_id = lp.project_id and ao.object_id = le.entry_id and ao.creation_user = submitter.user_id Index: openacs-4/packages/logger/www/lib/entries-table-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/logger/www/lib/entries-table-postgresql.xql 9 Nov 2003 16:40:26 -0000 1.3 +++ openacs-4/packages/logger/www/lib/entries-table-postgresql.xql 11 Dec 2003 21:40:07 -0000 1.4 @@ -19,7 +19,7 @@ from logger_entries le, logger_projects lp, acs_objects ao, - all_users submitter + acs_users_all submitter where le.project_id = lp.project_id and ao.object_id = le.entry_id and ao.creation_user = submitter.user_id Index: openacs-4/packages/logger/www/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/nav-bar.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/logger/www/lib/nav-bar.tcl 9 May 2003 15:08:17 -0000 1.7 +++ openacs-4/packages/logger/www/lib/nav-bar.tcl 11 Dec 2003 21:40:07 -0000 1.8 @@ -19,7 +19,7 @@ # My log entrie page if { [ad_conn user_id] != 0 } { lappend link_list $index_urls - lappend link_list [list [list selected_user_id $user_id]] + lappend link_list [list [list user_id $user_id]] lappend link_list "My Entries" lappend link_list [list "${package_url}project-select"] Index: openacs-4/packages/monitoring/monitoring.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/monitoring.info,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/monitoring/monitoring.info 28 Aug 2003 09:41:57 -0000 1.7 +++ openacs-4/packages/monitoring/monitoring.info 11 Dec 2003 21:40:08 -0000 1.8 @@ -1,23 +1,23 @@ - + Monitoring Monitoring f t - + oracle postgresql Joseph Bank Vinod Kurup - Monitoring apps ported from ACS 3.4.x + Server and database monitoring. 2002-08-19 - OpenACS - The monitoring apps from ACS 3.4.x /admin/monitoring directory. Includes Cassandracle, Watchdog, etc. + OpenACS + A collection of tools for monitoring server and database health, including cassandracle (oracle monitoring), watchdog (error log monitoring). Derived from the ACS 3.4.x /admin/monitoring tools. Index: openacs-4/packages/news/news.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/news.info,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/news/news.info 10 Nov 2003 16:36:31 -0000 1.12 +++ openacs-4/packages/news/news.info 11 Dec 2003 21:40:08 -0000 1.13 @@ -1,24 +1,23 @@ - + News News f f OpenACS - News application + Used for announcements and news items. 2003-11-10 OpenACS - News publication tool for corporate and website news in HTML and plain text format. -Beta release. + News publication tool. Publication of plain text or html news items with support for scheduled publication and commentability. - + - + Index: openacs-4/packages/news-aggregator-portlet/news-aggregator-portlet.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news-aggregator-portlet/news-aggregator-portlet.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/news-aggregator-portlet/news-aggregator-portlet.info 12 Nov 2003 14:24:48 -0000 1.3 +++ openacs-4/packages/news-aggregator-portlet/news-aggregator-portlet.info 11 Dec 2003 21:40:08 -0000 1.4 @@ -10,6 +10,7 @@ Simon Carstensen 2003-05-15 + A portlet interface to News Aggregator Index: openacs-4/packages/notes/notes.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/notes.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/notes/notes.info 8 Oct 2003 16:05:26 -0000 1.6 +++ openacs-4/packages/notes/notes.info 11 Dec 2003 21:40:08 -0000 1.7 @@ -1,23 +1,24 @@ - + Note Notes f t - + oracle postgresql Vinod Kurup Rafael Schloming - A sample ACS Application that allows users to manage notes online. + Sample application for users to manage notes online. 2001-03-05 - OpenACS - This is a sample application for ACS 4.x. + OpenACS + This is a sample application for OpenACS 4.x to show how applications should be built, unfortunately it + has not kept pace with current best practices. Index: openacs-4/packages/notifications/notifications.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/notifications/notifications.info 10 Nov 2003 16:36:31 -0000 1.23 +++ openacs-4/packages/notifications/notifications.info 11 Dec 2003 21:40:08 -0000 1.24 @@ -8,13 +8,14 @@ t notifications - + OpenACS - Notification Management + Email notifications management 2003-11-07 - OpenACS + OpenACS + Provides an API for packages to provide subscription based email notifications and handle replies. Used by forums, bug-tracker, etc. The currently prefered package for email notifications. - + @@ -24,7 +25,7 @@ - + Index: openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 28 Aug 2003 09:41:58 -0000 1.12 +++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 11 Dec 2003 21:40:08 -0000 1.13 @@ -154,7 +154,8 @@ not null, -- this is to allow responses to notifications response_id constraint notif_reponse_id_fk - references acs_objects (object_id), + references acs_objects (object_id) + on delete cascade, notif_user integer constraint notif_user_id_fk references users(user_id), Index: openacs-4/packages/notifications/sql/oracle/notifications-replies-extra-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-replies-extra-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/sql/oracle/notifications-replies-extra-create.sql 6 Nov 2003 19:23:02 -0000 1.2 +++ openacs-4/packages/notifications/sql/oracle/notifications-replies-extra-create.sql 11 Dec 2003 21:40:08 -0000 1.3 @@ -1,8 +1,9 @@ create table notification_email_hold ( reply_id integer - references notification_replies(reply_id) - primary key, - to_addr text, - header text, - body text + constraint notification_email_hold_pk primary key + constraint notif_email_hold_reply_id_ref + references notification_replies(reply_id), + to_addr clob, + headers clob, + body clob ); Index: openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.4-5.0d1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.4-5.0d1.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.4-5.0d1.sql 6 Nov 2003 19:23:02 -0000 1.2 +++ openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.4-5.0d1.sql 11 Dec 2003 21:40:08 -0000 1.3 @@ -1,8 +1,9 @@ create table notification_email_hold ( reply_id integer - references notification_replies(reply_id) - primary key, - to_addr text, - header text, - body text + constraint notification_email_hold_pk primary key + constraint notif_email_hold_reply_id_ref + references notification_replies(reply_id), + to_addr clob, + headers clob, + body clob ); Index: openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-5.0.0a5-5.0.0a6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-5.0.0a5-5.0.0a6.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-5.0.0a5-5.0.0a6.sql 11 Dec 2003 21:40:08 -0000 1.2 @@ -0,0 +1,8 @@ +-- Add the on delete cascade to response_id column, +-- see Bug http://openacs.org/bugtracker/openacs/bug?filter%2estatus=resolved&filter%2eactionby=6815&bug%5fnumber=260 +-- @author Peter Marklund +alter table notifications drop constraint notif_reponse_id_fk; +alter table notifications add constraint notif_reponse_id_fk + foreign key (response_id) + references acs_objects (object_id) + on delete cascade; Index: openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 28 Aug 2003 09:41:58 -0000 1.11 +++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 11 Dec 2003 21:40:09 -0000 1.12 @@ -166,7 +166,8 @@ -- this is to allow responses to notifications response_id integer constraint notif_reponse_id_fk - references acs_objects (object_id), + references acs_objects (object_id) + on delete cascade, -- this is the user that caused the notification to go out notif_user integer constraint notif_user_id_fk Index: openacs-4/packages/notifications/sql/postgresql/notifications-replies-extra-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-replies-extra-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/notifications/sql/postgresql/notifications-replies-extra-create.sql 6 Nov 2003 19:23:02 -0000 1.2 +++ openacs-4/packages/notifications/sql/postgresql/notifications-replies-extra-create.sql 11 Dec 2003 21:40:09 -0000 1.3 @@ -1,7 +1,8 @@ create table notification_email_hold ( reply_id integer - references notification_replies(reply_id) - primary key, + constraint notification_email_hold_pk primary key + constraint notif_email_hold_reply_id_ref + references notification_replies(reply_id), to_addr text, headers text, body text Index: openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.4-5.0d1.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.4-5.0d1.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.4-5.0d1.sql 6 Nov 2003 19:23:02 -0000 1.1 +++ openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.4-5.0d1.sql 11 Dec 2003 21:40:09 -0000 1.2 @@ -1,8 +1,9 @@ create table notification_email_hold ( reply_id integer - references notification_replies(reply_id) - primary key, + constraint notification_email_hold_pk primary key + constraint notif_email_hold_reply_id_ref + references notification_replies(reply_id), to_addr text, - header text, + headers text, body text ); Index: openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-5.0.0a5-5.0.0a6.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-5.0.0a5-5.0.0a6.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-5.0.0a5-5.0.0a6.sql 11 Dec 2003 21:40:09 -0000 1.2 @@ -0,0 +1,15 @@ +-- Add on delete cascade to the notifications.response_id column foreign key constraint +-- see Bug http://openacs.org/bugtracker/openacs/bug?filter%2estatus=resolved&filter%2eactionby=6815&bug%5fnumber=260 +-- @author Peter Marklund +alter table notifications drop constraint notif_reponse_id_fk; +alter table notifications add constraint notif_reponse_id_fk + foreign key (response_id) + references acs_objects (object_id) + on delete cascade; + +-- Add on delete cascade to notification_user_map.notification_in foreign key constraint +alter table notification_user_map drop constraint notif_user_map_notif_id_fk; +alter table notification_user_map add constraint notif_user_map_notif_id_fk + foreign key (notification_id) + references notifications(notification_id) + on delete cascade; Index: openacs-4/packages/notifications/tcl/notification-email-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-email-procs-oracle.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/notifications/tcl/notification-email-procs-oracle.xql 11 Dec 2003 21:40:09 -0000 1.2 @@ -0,0 +1,16 @@ + + + oracle8.1.6 + + + + insert into notification_email_hold + (reply_id,to_addr,headers,body) + values + (:reply_id,empty_clob(),empty_clob(),empty_clob()) + returning to_addr, headers, body into :1, :2, :3 + + + + + Index: openacs-4/packages/notifications/tcl/notification-email-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-email-procs.tcl,v diff -u -N -r1.18 -r1.19 --- openacs-4/packages/notifications/tcl/notification-email-procs.tcl 6 Nov 2003 19:23:02 -0000 1.18 +++ openacs-4/packages/notifications/tcl/notification-email-procs.tcl 11 Dec 2003 21:40:09 -0000 1.19 @@ -182,20 +182,28 @@ @param queue_dir The location of the qmail mail queue in the file-system. } { + ns_log notice "load_qmail_mail_queue: checking $queue_dir/new/ for incoming mail" + if {[catch { set messages [glob "$queue_dir/new/*"] } errmsg]} { - ns_log Debug "load_qmail_mail_queue: queue dir = $queue_dir/new/*, no messages" - return [list] + if {[string match "no files matched glob pattern*" $errmsg ]} { + ns_log Debug "load_qmail_mail_queue: queue dir = $queue_dir/new/*, no messages" + } else { + ns_log Error "load_qmail_mail_queue: queue dir = $queue_dir/new/ error $errmsg" + } + return {} } set list_of_reply_ids [list] set new_messages_p 0 foreach msg $messages { ns_log Debug "load_qmail_mail_queue: opening file: $msg" - if [catch {set f [open $msg r]}] { - continue + if {[catch {set f [open $msg r]} errmsg]} { + # spit out an error message for failure to open and contiue to next message + ns_log Warning "load_qmail_mail_queue: error opening file $errmsg" + continue } set orig_file [read $f] close $f @@ -210,7 +218,7 @@ # walk through the headers and extract each one set is_auto_reply_p 0 - while ![empty_string_p $line] { + while {![empty_string_p $line]} { set next_line [lindex $file [expr $i + 1]] if {[regexp {^[ ]*$} $next_line match] && $i > 0} { set end_of_headers_p 1 @@ -219,24 +227,24 @@ if {[regexp {^([^:]+):[ ]+(.+)$} $line match name value]} { # join headers that span more than one line (e.g. Received) if { ![regexp {^([^:]+):[ ]+(.+)$} $next_line match] && !$end_of_headers_p} { - set multiline_header_p 1 - } else { - # we only want messages a person typed in themselves - nothing - # from any sort of auto-responder. - if { [string compare -nocase $name "Auto-Submitted"] == 0 } { - set is_auto_reply_p 1 - break - } elseif { [string compare -nocase $name "Subject"] == 0 && [string first "Out of Office AutoReply:" $value] == 0 } { - # added for BP - set is_auto_reply_p 1 - break - } else { - lappend headers [string tolower $name] $value - append orig_headers "$line\n" - } - } + set multiline_header_p 1 + } else { + # we only want messages a person typed in themselves - nothing + # from any sort of auto-responder. + if { [string compare -nocase $name "Auto-Submitted"] == 0 } { + set is_auto_reply_p 1 + break + } elseif { [string compare -nocase $name "Subject"] == 0 && [string first "Out of Office AutoReply:" $value] == 0 } { + # added for BP + set is_auto_reply_p 1 + break + } else { + lappend headers [string tolower $name] $value + append orig_headers "$line\n" + } + } - if {$end_of_headers_p} { + if {$end_of_headers_p} { incr i break } @@ -255,10 +263,11 @@ } } + # a break above just exited the while loop; now we need to skip # the rest of the foreach as well if { $is_auto_reply_p } { - ns_log Debug "load_qmail_mail_queue: message is from an auto-responder, skipping" + ns_log Debug "load_qmail_mail_queue: message $msg is from an auto-responder, skipping" if {[catch {ns_unlink $msg} errmsg]} { ns_log Warning "load_qmail_mail_queue: couldn't remove message $msg: $errmsg" } @@ -267,14 +276,17 @@ set body [parse_incoming_email $orig_file] + + # okay now we have a list of headers and the body, let's # put it into notifications stuff array set email_headers $headers - if [catch {set from $email_headers(from)}] { + + if {[catch {set from $email_headers(from)}]} { set from "" } - if [catch {set to $email_headers(to)}] { + if {[catch {set to $email_headers(to)}]} { set to "" } @@ -286,48 +298,60 @@ # We don't accept empty users for now if {[empty_string_p $from_user]} { - ns_log Notice "load_qmail_mail_queue: no user $from" - # bounce message here - bounce_mail_message -to_addr $email_headers(from) -from_addr $email_headers(to) -body $body -message_headers $orig_headers -reason "invalid sender. You must be a member of the site." + ns_log Notice "load_qmail_mail_queue: no user for from address: $from, to: $to. bouncing message." + # bounce message with an informative error. + bounce_mail_message -to_addr $email_headers(from) \ + -from_addr $email_headers(to) \ + -body $body \ + -message_headers $orig_headers \ + -reason "Invalid sender. You must be a member of the site and\nyour From address must match your registered address." + if {[catch {ns_unlink $msg} errmsg]} { - ns_log Warning "load_qmail_mail_queue: couldn't remove message $msg: $errmsg" + ns_log Warning "load_qmail_mail_queue: couldn't remove message $msg: $errmsg" } continue } set to_stuff [parse_reply_address -reply_address $to] - # We don't accept a bad incoming email address if {[empty_string_p $to_stuff]} { - ns_log Notice "load_qmail_mail_queue: bad to address $to" + ns_log Notice "load_qmail_mail_queue: bad to address $to from $from. bouncing message." + # bounce message here - bounce_mail_message -to_addr $email_headers(from) -from_addr $email_headers(to) -body $body -message_headers $orig_headers -reason "Invalid Address" + bounce_mail_message -to_addr $email_headers(from) \ + -from_addr $email_headers(to) \ + -body $body \ + -message_headers $orig_headers \ + -reason "Invalid To Address" if {[catch {ns_unlink $msg} errmsg]} { - ns_log Warning "load_qmail_mail_queue: couldn't remove message $msg: $errmsg" + ns_log Warning "load_qmail_mail_queue: couldn't remove message file $msg: $errmsg" } continue } set object_id [lindex $to_stuff 0] set type_id [lindex $to_stuff 1] - set to_addr "$to" + set to_addr $to - db_transaction { - set reply_id [notification::reply::new \ - -object_id $object_id \ - -type_id $type_id \ - -from_user $from_user \ - -subject $email_headers(subject) \ - -content $body] + db_transaction { + set reply_id [notification::reply::new \ + -object_id $object_id \ + -type_id $type_id \ + -from_user $from_user \ + -subject $email_headers(subject) \ + -content $body] set headers $orig_headers - db_dml holdinsert {} - catch {ns_unlink $msg} + db_dml holdinsert {} -clobs [list $to_addr $headers $body] + if {[catch {ns_unlink $msg} errmsg]} { + ns_log Error "load_qmail_mail_queue: unable to delete queued message $msg: $errmsg" + } + lappend list_of_reply_ids $reply_id - } on_error { + } on_error { ns_log Error "load_qmail_mail_queue: error inserting incoming email into the queue: $errmsg" - } + } } return $list_of_reply_ids Index: openacs-4/packages/notifications/tcl/reply-sweep-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/reply-sweep-init.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/reply-sweep-init.tcl 16 Jan 2003 13:53:10 -0000 1.3 +++ openacs-4/packages/notifications/tcl/reply-sweep-init.tcl 11 Dec 2003 21:40:09 -0000 1.4 @@ -17,4 +17,4 @@ if { $scan_replies_p == 1 } { ad_schedule_proc -thread t 60 notification::reply::sweep::scan_all_replies ad_schedule_proc -thread t 60 notification::reply::sweep::process_all_replies -} +} Index: openacs-4/packages/notifications/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/admin/index.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/notifications/www/admin/index.adp 25 Feb 2003 10:06:31 -0000 1.1 +++ openacs-4/packages/notifications/www/admin/index.adp 11 Dec 2003 21:40:09 -0000 1.2 @@ -4,4 +4,9 @@
  • Send out notifications now
  • + +
  • + Parameters +
  • + Index: openacs-4/packages/notifications/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/admin/index.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/notifications/www/admin/index.tcl 25 Feb 2003 10:06:31 -0000 1.1 +++ openacs-4/packages/notifications/www/admin/index.tcl 11 Dec 2003 21:40:09 -0000 1.2 @@ -2,3 +2,4 @@ Notifications admin page } +set parameters_url [export_vars -base "/shared/parameters" { { return_url [ad_return_url] } { package_id {[ad_conn package_id]} } }] Index: openacs-4/packages/openfts-driver/openfts-driver.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/openfts-driver.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/openfts-driver/openfts-driver.info 16 Jan 2003 13:54:04 -0000 1.6 +++ openacs-4/packages/openfts-driver/openfts-driver.info 11 Dec 2003 21:40:09 -0000 1.7 @@ -1,39 +1,22 @@ - + OpenFTS Driver OpenFTS Drivers f t - + postgresql Neophytos Demetriou + Full text search support for Search via OpenFTS. + Provides an implementation for the search packages service contract for searching on postgresql. - - - - - - - - - - - - - - - - - - - Index: openacs-4/packages/organizations/organizations.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/organizations.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/organizations/organizations.info 8 Oct 2003 16:05:26 -0000 1.2 +++ openacs-4/packages/organizations/organizations.info 11 Dec 2003 21:40:09 -0000 1.3 @@ -13,10 +13,16 @@ postgresql Jon Griffin - Implementation of HR-XML organizations spec. - Mayuli Enterprises LLC - Implementation of HR-XML organizations spec. + Implementation of HR-XML organizations datamodel. + Mayuli Enterprises, LLC + Provides the datamodel for an + implementation of the HR-XML organizations spec, but no API for + manipulating the data. Also note that the Oracle code is out of sync + with the Postgres code. The source code has comments in it indicating + what needs to be updated to make things work correctly [Jade Rubick]. + + Index: openacs-4/packages/organizations/status.txt =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/status.txt,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/organizations/status.txt 11 Dec 2003 21:40:09 -0000 1.2 @@ -0,0 +1,10 @@ +11/24/03 Jade Rubick + +Note that the Oracle code is out of sync with the Postgres code. The +source code has comments in it indicating what needs to be updated to +make things work correctly. + +The Postgres code is the reference version at this point. + +In general, getting things in sync will not be that difficult. The +/sql/oracle files will need to be updated, and that's about it. Index: openacs-4/packages/organizations/sql/oracle/organizations-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/oracle/organizations-create.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/organizations/sql/oracle/organizations-create.sql 14 Mar 2003 15:53:52 -0000 1.1 +++ openacs-4/packages/organizations/sql/oracle/organizations-create.sql 11 Dec 2003 21:40:09 -0000 1.2 @@ -50,5 +50,19 @@ notes varchar2(4000) ); +-- create an index? Postgres version does +-- create index organization_name_ix on organizations(name); +-- this is untested, copied from Postgres. Needs to be tested to work for +-- Oracle. +create table organization_type_map ( + organization_id integer + constraint org_type_map_org_id_fk + references organizations(organization_id), + organization_type_id integer + constraint org_type_map_type_fk + references organization_types(organization_type_id) +); + + @ 'organizations-plsql-create.sql' Index: openacs-4/packages/organizations/sql/oracle/organizations-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/oracle/organizations-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/organizations/sql/oracle/organizations-drop.sql 11 Dec 2003 21:40:09 -0000 1.2 @@ -0,0 +1 @@ +-- Yes, this is also missing a drop script! Index: openacs-4/packages/organizations/sql/oracle/organizations-plsql-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/oracle/organizations-plsql-create.sql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/organizations/sql/oracle/organizations-plsql-create.sql 30 Sep 2003 12:10:08 -0000 1.2 +++ openacs-4/packages/organizations/sql/oracle/organizations-plsql-create.sql 11 Dec 2003 21:40:09 -0000 1.3 @@ -42,6 +42,10 @@ / show errors + +-- behavior is different between oracle and postgres. Postgres +-- version adds in the first organization_type to the organization_type_map +-- table, to specify which type this organization is. create or replace package body organization as function new ( @@ -102,9 +106,12 @@ ) is begin + + -- these delete statements should not be necessary delete from acs_permissions where object_id = organization.del.p_organization_id; + -- need to remove items from organization_type_map, like postgres delete from organizations where organization_id = organization.del.p_organization_id; @@ -115,3 +122,5 @@ end organization; / show errors + +-- name function is missing in Oracle version!! Need to port from Postgres Index: openacs-4/packages/organizations/sql/postgresql/organizations-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/postgresql/organizations-create.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/organizations/sql/postgresql/organizations-create.sql 14 Mar 2003 15:55:17 -0000 1.1 +++ openacs-4/packages/organizations/sql/postgresql/organizations-create.sql 11 Dec 2003 21:40:10 -0000 1.2 @@ -27,7 +27,7 @@ insert into organization_types values (acs_object_id_seq.nextval,'Vendor'); insert into organization_types values (acs_object_id_seq.nextval,'Customer'); insert into organization_types values (acs_object_id_seq.nextval,'Prospect'); -insert into organization_types values (acs_object_id_seq.nextval,'Misc.'); +insert into organization_types values (acs_object_id_seq.nextval,'Other'); -- organization -- this will be a party @@ -52,4 +52,14 @@ ); create index organization_name_ix on organizations(name); + +create table organization_type_map ( + organization_id integer + constraint org_type_map_org_id_fk + references organizations(organization_id), + organization_type_id integer + constraint org_type_map_type_fk + references organization_types(organization_type_id) +); + \i organizations-plsql-create.sql Index: openacs-4/packages/organizations/sql/postgresql/organizations-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/postgresql/organizations-drop.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/organizations/sql/postgresql/organizations-drop.sql 11 Dec 2003 21:40:10 -0000 1.2 @@ -0,0 +1,41 @@ +-- @cvs-id $Id: organizations-drop.sql,v 1.2 2003/12/11 21:40:10 jeffd Exp $ + +select drop_package('organization'); + +-- drop permissions +delete from acs_permissions where object_id in (select organization_id from organizations); + +-- drop objects + +create function inline_0() +returns integer as ' +declare + object_rec record; +begin + for object_rec in select object_id from acs_objects where object_type=''organization'' + loop + perform acs_object__delete( object_rec.object_id ); + end loop; + return 0; +end;' language 'plpgsql'; + +select inline_0(); +drop function inline_0(); + +--drop table +drop table organization_type_map; + +drop table organizations cascade; + +--drop type +select acs_object_type__drop_type( + 'organization', + 't' + ); + + +drop table organization_types; + + + + Index: openacs-4/packages/organizations/sql/postgresql/organizations-plsql-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/organizations/sql/postgresql/organizations-plsql-create.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/organizations/sql/postgresql/organizations-plsql-create.sql 14 Mar 2003 15:55:17 -0000 1.1 +++ openacs-4/packages/organizations/sql/postgresql/organizations-plsql-create.sql 11 Dec 2003 21:40:10 -0000 1.2 @@ -10,16 +10,16 @@ returns integer as ' begin PERFORM acs_object_type__create_type ( - ''organization'', -- object_type - ''Organization'', -- pretty_name - ''Organization'', -- pretty_plural - ''party'', -- supertype - ''organizations'', -- table_name - ''organization_id'', -- id_column - ''organization'', -- package_name - ''f'', -- abstract_p - null, -- type_extension_table - null -- name_method + ''organization'', -- object_type + ''Organization'', -- pretty_name + ''Organization'', -- pretty_plural + ''party'', -- supertype + ''organizations'', -- table_name + ''organization_id'', -- id_column + ''organization'', -- package_name + ''f'', -- abstract_p + null, -- type_extension_table + ''organization__name'' -- name_method ); return 0; @@ -32,26 +32,39 @@ ------ start of oacs new proc -create or replace function organization__new ( varchar,varchar,text,integer,varchar, -varchar,varchar,integer,varchar,integer ) -returns integer as ' +select define_function_args('organization__new','legal_name,name,notes,organization_id,organization_type_id,reg_number,email,url,creation_user,creation_ip,context_id'); + +create or replace function organization__new ( + varchar, -- legal_name + varchar, -- name + text, -- notes + integer, -- organization_id + integer, -- organization_type_id + varchar, -- reg_number + varchar, -- email + varchar, -- url + integer, -- creation_user + varchar, -- creation_ip + integer -- context_id +) returns integer as ' declare - p_legal_name alias for $1; -- comment - p_name alias for $2; -- comment - p_notes alias for $3; -- comment - p_organization_id alias for $4; -- comment - p_reg_number alias for $5; -- comment - p_email alias for $6; -- email - p_url alias for $7; - p_creation_user alias for $8; -- comment - p_creation_ip alias for $9; - p_context_id alias for $10; -- comment + p_legal_name alias for $1; -- comment + p_name alias for $2; -- comment + p_notes alias for $3; -- comment + p_organization_id alias for $4; -- comment + p_organization_type_id alias for $5; -- comment + p_reg_number alias for $6; -- comment + p_email alias for $7; -- email + p_url alias for $8; + p_creation_user alias for $9; -- comment + p_creation_ip alias for $10; + p_context_id alias for $11; -- comment -- local vars v_organization_id organizations.organization_id%TYPE; begin v_organization_id := party__new ( - null, -- party_id + p_organization_id, -- party_id ''organization'', now(), p_creation_user, @@ -77,6 +90,14 @@ p_reg_number ); + insert into organization_type_map ( + organization_id, + organization_type_id + ) values ( + v_organization_id, + p_organization_type_id + ); + PERFORM acs_permission__grant_permission ( v_organization_id, p_creation_user, @@ -90,27 +111,41 @@ ------ end new proc + +------ start of oacs del proc +select define_function_args('organization__del','organization_id'); + create or replace function organization__del (integer) returns integer as ' declare p_organization_id alias for $1; v_return integer := 0; begin + -- these should not be necessary delete from acs_permissions where object_id = p_organization_id; + delete from organization_type_map + where organization_id = p_organization_id; + delete from organizations where organization_id = p_organization_id; raise NOTICE ''Deleting organization - %'',p_organization_id; - PERFORM party_delete(p_organization_id); + PERFORM party__delete(p_organization_id); return v_return; end;' language 'plpgsql'; +------ end del proc + + +------ start of oacs set proc +select define_function_args('organization__set','legal_name,name,notes,organization_id,reg_number'); + create or replace function organization__set (varchar,varchar,text,integer,varchar) returns integer as ' declare @@ -135,4 +170,25 @@ raise NOTICE ''Updating - organization - %'',organization_id; return v_return; -end;' language 'plpgsql'; \ No newline at end of file +end;' language 'plpgsql'; + +------ end set proc + + +------ start of oacs name proc +select define_function_args('organization___name','organization_id'); + +create or replace function organization__name (integer) +returns varchar as ' +declare + p_organization_id alias for $1; + v_organization_name organization.name%TYPE; +begin + select name into v_organization_name + from organizations + where organization_id = p_organization_id; + return v_organization_name; +end; +' language 'plpgsql'; +------ end name proc + Index: openacs-4/packages/page/page.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/page/page.info,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/page/page.info 23 Aug 2003 00:29:11 -0000 1.8 +++ openacs-4/packages/page/page.info 11 Dec 2003 21:40:10 -0000 1.9 @@ -1,21 +1,22 @@ - + Page Pages f f - + oracle postgresql Rafael Schloming - Creates a page. + Minimal site node package 2002-05-15 - OpenACS + OpenACS + a minimal package which exists primarily as a site-node placeholder for a path component (so that the context bar can be properly constructed Index: openacs-4/packages/payflowpro/payflowpro.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/payflowpro/Attic/payflowpro.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/payflowpro/payflowpro.info 23 Sep 2002 23:32:24 -0000 1.4 +++ openacs-4/packages/payflowpro/payflowpro.info 11 Dec 2003 21:40:10 -0000 1.5 @@ -16,7 +16,7 @@ PayFlowPro payment gateway. 2002-05-13 furfly.net, LLC - This is a payment gateway for Verisign's PayFlowPro. + This is a payment gateway for Verisign's PayFlowPro. Note that there are problems with the supplied libraries from verisign and it is anticipated that this package will be deprecated or removed see <a href="http://openacs.org/forums/message-view?message_id=149360">TIP 33</a> Index: openacs-4/packages/payment-gateway/payment-gateway.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/payment-gateway/payment-gateway.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/payment-gateway/payment-gateway.info 16 Jan 2003 13:54:22 -0000 1.5 +++ openacs-4/packages/payment-gateway/payment-gateway.info 11 Dec 2003 21:40:10 -0000 1.6 @@ -17,7 +17,7 @@ Payment Gateway Service Contract 2002-05-13 furfly.net, LLC - This service contract provides an API for modules to interact with a credit card payment service provider. + This service contract defines an API for modules to interact with a credit card payment service providers. Index: openacs-4/packages/photo-album/photo-album.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/photo-album.info,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/photo-album/photo-album.info 18 Nov 2003 02:11:39 -0000 1.9 +++ openacs-4/packages/photo-album/photo-album.info 11 Dec 2003 21:40:10 -0000 1.10 @@ -1,7 +1,7 @@ - + Photo Album Photo Albums f @@ -11,25 +11,19 @@ Jeff Davis Walter McGinnis Tom Baginski - A photo album application that provides photo display -and grouping functionality using the ACS Content Repository. + Organization, editing and display of user uploaded photos. 2003-09-26 - OpenACS + OpenACS A photo album application that provides photo display and grouping functionality using the ACS Content Repository. - +<p> Allows users to upload photos, store and edit attributes, and group -photos into albums and folders. Allows site administrators to set -permissions that control who can do and see what within a photo album -application. Includes sub-site support. - +photos into albums and folders. Supports permissioning, exif data, and user clipboards. +<p> Requires installation of ImageMagick and jhead on host machine. See design doc - for details. + -Heavily modified from the original Ars Digita version by -davis@xarg.net. - Index: openacs-4/packages/photo-album/www/pa_master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/photo-album/www/pa_master.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/photo-album/www/pa_master.tcl 10 Jun 2003 10:07:11 -0000 1.1 +++ openacs-4/packages/photo-album/www/pa_master.tcl 11 Dec 2003 21:40:10 -0000 1.2 @@ -1 +1,7 @@ -set context_bar [eval ad_context_bar $context_list] +set cmd [list ad_context_bar --] +foreach elem $context_list { + lappend cmd $elem +} +set context_bar [eval $cmd] + + Index: openacs-4/packages/postal-address/postal-address.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/postal-address/postal-address.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/postal-address/postal-address.info 13 Mar 2003 21:49:44 -0000 1.1 +++ openacs-4/packages/postal-address/postal-address.info 11 Dec 2003 21:40:10 -0000 1.2 @@ -13,63 +13,14 @@ postgresql Jon Griffin - This is an implementation of HR-XML's address standard. - Mayuli Enterprises LLC - This is an implementation of HR-XML's address standard.<p> -Originally part of Contacts-Lite, it is now a service. + An implementation of HR-XML's address standard. + Mayuli Enterprises, LLC + This is an implementation of HR-XML's address standard.<p>Originally part of Contacts-Lite, now a service. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: openacs-4/packages/press/press.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/press/press.info,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/press/press.info 31 Oct 2003 16:09:23 -0000 1.7 +++ openacs-4/packages/press/press.info 11 Dec 2003 21:40:10 -0000 1.8 @@ -1,20 +1,22 @@ - + Press Press f - + oracle postgresql - Sarah Barwig - Press allows publishers to display external press coverage of their site. + Sarah Barwig + Display external press coverage. 2001-01-17 - ArsDigita Corporation + OpenACS + Supports templated display of press coverage with templates to + support bibliographic style display and excerpts of print and web based external press converage. Index: openacs-4/packages/redirect/redirect.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/redirect/redirect.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/redirect/redirect.info 29 Sep 2003 13:17:37 -0000 1.1 +++ openacs-4/packages/redirect/redirect.info 11 Dec 2003 21:40:10 -0000 1.2 @@ -9,13 +9,9 @@ Tilmann Singer - Simple package that redirects from the URL it is mounted on to another URL. + Simple redirection package. 2003-09-29 - Simple package that redirects from the URL it is mounted on to another URL. Useful when you have moved content to a new place but don't want old links to break. - -The new URL can be entered with a parameter setting. - -Note that it does not pass through requests to another application, e.g. one that is running on apache. Use the gatekeeper package for this. + Redirects from the URL at which it is mounted on to another URL. Useful when you have moved content to a new place but don't want old links to break. The new URL can be entered with a parameter setting. Note that it does not pass through requests to another application, e.g. one that is running on apache. Use the gatekeeper package for this. Index: openacs-4/packages/ref-countries/ref-countries.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-countries/ref-countries.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/ref-countries/ref-countries.info 17 May 2003 11:05:58 -0000 1.4 +++ openacs-4/packages/ref-countries/ref-countries.info 11 Dec 2003 21:40:11 -0000 1.5 @@ -13,9 +13,9 @@ postgresql Jon Griffin - This is geo-spatial country data. - Mayuli Enterprises, LLC - Countries supplies the ISO 3166 Country data. + ISO 3166 country data. + Mayuli Enterprises, LLC + Countries supplies the ISO 3166 Country data for acs-reference. Index: openacs-4/packages/ref-currency/ref-currency.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-currency/ref-currency.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/ref-currency/ref-currency.info 17 May 2003 11:07:06 -0000 1.5 +++ openacs-4/packages/ref-currency/ref-currency.info 11 Dec 2003 21:40:11 -0000 1.6 @@ -13,8 +13,8 @@ postgresql Jon Griffin - This is the currency sub-module for acs-reference. - Mayuli Enterprises, LLC + Currency Data, ISO 4217 for acs-reference. + Mayuli Enterprises, LLC This is the currency sub-module for acs-reference. It provides ISO 4217 compatibility. Index: openacs-4/packages/ref-itu/ref-itu.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-itu/ref-itu.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/ref-itu/ref-itu.info 25 Oct 2003 14:31:40 -0000 1.4 +++ openacs-4/packages/ref-itu/ref-itu.info 11 Dec 2003 21:40:11 -0000 1.5 @@ -13,9 +13,9 @@ postgresql Jon Griffin - List of ITU-T Recommendation E.164 assigned country codes - Mayuli Enterprises LLC - List of ITU-T Recommendation E.164 assigned country codes + Telecom Country codes, ITU-T Recommendation E.164 for acs-reference. + Mayuli Enterprises, LLC + List of ITU-T Recommendation E.164 assigned country codes. Index: openacs-4/packages/ref-language/ref-language.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-language/ref-language.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/ref-language/ref-language.info 17 May 2003 11:07:51 -0000 1.6 +++ openacs-4/packages/ref-language/ref-language.info 11 Dec 2003 21:40:11 -0000 1.7 @@ -13,10 +13,9 @@ postgresql Jon Griffin - This is the ISO language reference data. - Mayuli Enterprises LLC - This is the ISO language reference data. -You should use this if you are using the reference data package as many other reference data packages are dependent on this. + ISO 639-1 language reference data for acs-reference. + Mayuli Enterprises, LLC + This is the ISO 639-1 language reference data (with languages names in english). Index: openacs-4/packages/ref-language/sql/common/languages.dat =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-language/sql/common/Attic/languages.dat,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/ref-language/sql/common/languages.dat 17 Jul 2003 01:10:41 -0000 1.1 +++ openacs-4/packages/ref-language/sql/common/languages.dat 11 Dec 2003 21:40:11 -0000 1.2 @@ -112,7 +112,7 @@ sv,Swedish sw,Swahili ta,Tamil -te,Tegulu +te,Telugu tg,Tajik th,Thai ti,Tigrinya Index: openacs-4/packages/ref-timezones/ref-timezones.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/ref-timezones.info,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/ref-timezones/ref-timezones.info 10 Nov 2003 14:28:56 -0000 1.11 +++ openacs-4/packages/ref-timezones/ref-timezones.info 11 Dec 2003 21:40:11 -0000 1.12 @@ -7,16 +7,16 @@ t t - + Jon Griffin - This is the timezone data for the reference data package. + Timezone data for acs-reference. 2003-11-07 - Mayuli Enterprises LLC - This is the timezone data for the reference data package. + Mayuli Enterprises, LLC + This is the timezone data for the acs-reference data package. Used by acs-lang (among others) for localized times. - - - + + + Index: openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql 18 Aug 2003 10:37:03 -0000 1.8 +++ openacs-4/packages/ref-timezones/sql/postgresql/ref-timezones-create.sql 11 Dec 2003 21:40:11 -0000 1.9 @@ -114,7 +114,7 @@ p_raw_date alias for $1; begin return "timestamptz" (p_raw_date || ''+00''); -end;' language 'plpgsql'; +end;' language 'plpgsql' stable strict; create or replace function timezone__new (varchar, varchar) returns integer as ' declare @@ -144,12 +144,13 @@ p_tz alias for $1; v_tz_id integer; begin - select tz_id into v_tz_id + + return tz_id from timezones where tz = p_tz; - return v_tz_id; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable strict; + create or replace function timezone__add_rule (varchar, varchar, integer, varchar, varchar, varchar, varchar, varchar) returns integer as ' declare p_tz alias for $1; @@ -211,7 +212,7 @@ from timezone_rules where tz_id = p_tz_id and v_base_time between utc_start and utc_end; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; create or replace function timezone__get_offset (integer, timestamptz) returns interval as ' @@ -227,7 +228,7 @@ where tz_id = p_tz_id and p_time between utc_start and utc_end; return "interval" (v_offset || ''seconds''); -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; create or replace function timezone__get_rawoffset (integer, timestamptz) returns interval as ' declare @@ -247,7 +248,7 @@ where tz_id = p_tz_id and p_time between utc_start and utc_end; return v_offset; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; create or replace function timezone__get_abbrev (integer, timestamptz) returns varchar as ' declare @@ -262,7 +263,7 @@ where tz_id = p_tz_id and p_time between local_start and local_end; return v_abbrev; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; -- Returns a formatted date with timezone info appended @@ -298,7 +299,7 @@ return v_date; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; -- Returns 't' if timezone is currently using DST create or replace function timezone__isdst_p (integer, timestamptz) returns boolean as ' @@ -314,4 +315,4 @@ where tz_id = p_tz_id and p_time between local_start and local_end; return v_isdst_p; -end;' language 'plpgsql'; +end;' language 'plpgsql' stable; Index: openacs-4/packages/ref-us-counties/ref-us-counties.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-us-counties/ref-us-counties.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/ref-us-counties/ref-us-counties.info 23 Sep 2002 23:32:28 -0000 1.4 +++ openacs-4/packages/ref-us-counties/ref-us-counties.info 11 Dec 2003 21:40:12 -0000 1.5 @@ -13,9 +13,9 @@ postgresql Jon Griffin - This is geo-spatial data of US Counties. - Mayuli Enterprises, LLC - Needs US States as well as other ref- packages. + US Counties geo-spatial data. + Mayuli Enterprises, LLC + Provides FIPS codes, name,state, population, land area, latitude and longitute, etc. Index: openacs-4/packages/ref-us-states/ref-us-states.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-us-states/ref-us-states.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/ref-us-states/ref-us-states.info 17 May 2003 11:12:39 -0000 1.6 +++ openacs-4/packages/ref-us-states/ref-us-states.info 11 Dec 2003 21:40:12 -0000 1.7 @@ -13,10 +13,9 @@ postgresql Jon Griffin - This is all the US States. - Mayuli Enterprises, LLC - This is all the US States. -It is needed by many other packages. + US States + Mayuli Enterprises, LLC + This is all the US States. Provides abbreviation, name, and FIPS state code. Index: openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info 17 May 2003 11:13:48 -0000 1.5 +++ openacs-4/packages/ref-us-zipcodes/ref-us-zipcodes.info 11 Dec 2003 21:40:12 -0000 1.6 @@ -13,9 +13,9 @@ postgresql Jon Griffin - This is US Zipcodes. Part of the ACS-Reference package - Mayuli Enterprises, LLC - This is needed by ecommerce among other things. + US Zipcodes + Mayuli Enterprises, LLC + Provides zipcode, name, FIPS state and county codes, latitude and longitude. Does not provide ZIP+4 data. Index: openacs-4/packages/robot-detection/robot-detection.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/robot-detection.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/robot-detection/robot-detection.info 28 Aug 2003 09:41:58 -0000 1.5 +++ openacs-4/packages/robot-detection/robot-detection.info 11 Dec 2003 21:40:12 -0000 1.6 @@ -1,21 +1,23 @@ - + Robot Detection Robot Detections t - + oracle postgresql - Roger Hsueh - Redirects web robots to a specified URL + Roger Hsueh + Redirect web robots to specified URLs 2001-01-26 - ArsDigita Corporation - With this package, you can automatically redirect web robots from search engines away from areas that require login and into a separate area which should have content suitable for indexing. + OpenACS + With this package, you can automatically redirect web robots from search engines away from areas that require login and into a separate area which provides content suitable for indexing. You should be aware that this is sometimes considered to be +<a href="http://www.google.com/webmasters/faq.html#cloaking">cloaking</a> so excercise care here. + Index: openacs-4/packages/robot-detection/sql/oracle/robot-detection-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/sql/oracle/robot-detection-create.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/robot-detection/sql/oracle/robot-detection-create.sql 20 Apr 2001 20:51:22 -0000 1.1 +++ openacs-4/packages/robot-detection/sql/oracle/robot-detection-create.sql 11 Dec 2003 21:40:12 -0000 1.2 @@ -28,5 +28,6 @@ -- insertion_date records when this row was actually inserted -- used to determine if we need to re-populate the table from -- the text file at Web Robots DB. - insertion_date date default sysdate not null + insertion_date date default sysdate not null, + modified_date date ); Index: openacs-4/packages/robot-detection/sql/postgresql/robot-detection-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/sql/postgresql/robot-detection-create.sql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/robot-detection/sql/postgresql/robot-detection-create.sql 2 May 2001 20:21:04 -0000 1.1 +++ openacs-4/packages/robot-detection/sql/postgresql/robot-detection-create.sql 11 Dec 2003 21:40:12 -0000 1.2 @@ -28,5 +28,6 @@ -- insertion_date records when this row was actually inserted -- used to determine if we need to re-populate the table from -- the text file at Web Robots DB. - insertion_date date default now() not null + insertion_date date default now() not null, + modified_date date ); Index: openacs-4/packages/rss-support/rss-support.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/rss-support.info,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/rss-support/rss-support.info 10 Nov 2003 16:36:31 -0000 1.12 +++ openacs-4/packages/rss-support/rss-support.info 11 Dec 2003 21:40:12 -0000 1.13 @@ -12,17 +12,24 @@ Dave Bauer Jerry Asher Andrew Grumet - Basic support for RSS generation (and parsing). RDF Site Summary (RSS) is a lightweight multipurpose extensible metadata description and syndication format. This package can be used to publish ACS objects in a manner useful to other websites and webservices. - + Service contracts and support for generating RSS feeds 2003-11-10 - For each item (news event, ticket, bboard message, ...) that you want to publish, you create a property list that describes that item (url to item, title of item, description of item, etc.). You pass a list of those items -(and some other parameters) to rss_gen, and it will generate your XML for you. - -<ul> -<li> <a href='http://www.google.com/search?q=rss+0.91'>RSS 0.91 specification</a> -<li> <a href='http://groups.yahoo.com/group/rss-dev/files/specification.html'>RSS 1.0 specification</a> -</ul> - + Basic support for RSS +generation and parsing. RDF Site Summary (RSS) is a lightweight +multipurpose extensible metadata description and syndication format. +This package can be used to publish site content in a manner useful to +other websites and webservices. <p> For each item (news event, +ticket, bboard message, ...) that you want to publish, you create a +property list that describes that item (url to item, title of item, +description of item, etc.). You pass a list of those items (and some +other parameters) to rss_gen, and it will generate your XML for you. +You can also implenent a set of functions that satisfy the RSS service +contracts and the RSS can be recreated from a scheduled procedure. + +<ul> +<li> <a href='http://www.google.com/search?q=rss+0.91'>RSS 0.91 specification</a> +<li> <a href='http://groups.yahoo.com/group/rss-dev/files/specification.html'>RSS 1.0 specification</a> +</ul> Index: openacs-4/packages/sample-gateway/sample-gateway.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/sample-gateway/sample-gateway.info,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/sample-gateway/sample-gateway.info 5 Jun 2002 02:32:58 -0000 1.1 +++ openacs-4/packages/sample-gateway/sample-gateway.info 11 Dec 2003 21:40:12 -0000 1.2 @@ -15,7 +15,7 @@ Janine Sisk Sample payment gateway. furfly.net, LLC - This is a sample payment gateway, suitable for copying to create a real one. + A sample payment gateway, suitable for testing and as a skeletion for a full implementation. Index: openacs-4/packages/schema-browser/schema-browser.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/schema-browser/schema-browser.info,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/schema-browser/schema-browser.info 15 Oct 2003 09:33:15 -0000 1.6 +++ openacs-4/packages/schema-browser/schema-browser.info 11 Dec 2003 21:40:12 -0000 1.7 @@ -1,41 +1,27 @@ - + Schema Browser Schema Browsers f t schema - + oracle postgresql - Mark Ciccarello - Joseph Bank - Schema browser, basically just a copy of the ACS 3.4 stuff packagized. + Mark Ciccarello + Joseph Bank + OpenACS datamodel browser. 2001-01-24 - ArsDigita Corporation + OpenACS + Lets you browse the tables and procedures in an OpenACS instance. - - - - - - - - - - - - - - - Index: openacs-4/packages/search/search.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/search.info,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/search/search.info 10 Nov 2003 14:28:56 -0000 1.9 +++ openacs-4/packages/search/search.info 11 Dec 2003 21:40:13 -0000 1.10 @@ -1,18 +1,21 @@ - + Search Search t f - - OpenACS + + OpenACS 2003-11-07 - OpenACS + Site wide search + OpenACS + Site wide search implemented with service contracts, currently + only supports postgres via the OpenFTS driver. - + Index: openacs-4/packages/shipping-gateway/shipping-gateway.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/shipping-gateway/shipping-gateway.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/shipping-gateway/shipping-gateway.info 19 Sep 2002 20:02:41 -0000 1.2 +++ openacs-4/packages/shipping-gateway/shipping-gateway.info 11 Dec 2003 21:40:13 -0000 1.3 @@ -13,29 +13,13 @@ postgresql Bart Teeuwisse - First stab at a service contract for shipping services like UPS, Fedex or home grown shipping rates. + Service contract definitions for for shipping services like UPS or Fedex. 2002-05-13 - First stab at a service contract for shipping services like UPS, Fedex or home grown shipping rates like value-based shipping rates. + First stab at a service contract to define an interface to shipping services like UPS, Fedex or home grown shipping rates like value-based shipping rates. - - - - - - - - - - - - - - - - Index: openacs-4/packages/simple-survey/simple-survey.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simple-survey/simple-survey.info,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/simple-survey/simple-survey.info 8 Oct 2003 16:05:26 -0000 1.11 +++ openacs-4/packages/simple-survey/simple-survey.info 11 Dec 2003 21:40:13 -0000 1.12 @@ -1,154 +1,27 @@ - + Simple Survey Simple Surveys f f - + oracle postgresql - Nicholas Strugnell - Ask users questions and record results. + Nicholas Strugnell + Ask users questions and record results. 2001-02-14 - ArsDigita Corporation - Simple survey is a survey builder. Surveys can contain questions with different types of answer several types: multiple choice (radio buttons), multiple answer (checkboxes) or free text entry. Multiple choice questions may also be scored on one or more variables. + OpenACS + Simple survey is a survey builder. Surveys can contain questions with different types of answer several types: multiple choice (radio buttons), multiple answer (checkboxes) or free text entry. Multiple choice questions may also be scored on one or more variables. +In general survey is a better choice than simple-survey. + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: openacs-4/packages/site-wide-search/site-wide-search.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/site-wide-search/site-wide-search.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/site-wide-search/site-wide-search.info 17 May 2003 11:32:49 -0000 1.4 +++ openacs-4/packages/site-wide-search/site-wide-search.info 11 Dec 2003 21:40:13 -0000 1.5 @@ -1,70 +1,26 @@ - + site-wide-search site-wide-search f - + oracle - Khy Huang - Provides search functionality for application data. Supports permissioning, subsites, and searching by keywords. + Khy Huang + Provides site wide search functionality for application data. oracle only. 2001-02-09 - ArsDigita Corporation + OpenACS Provides search functionality for application data. Supports permissioning, subsites, and searching by keywords. This version fixed a few bottle necks in the installation process. There are scripts to support news, bboards , and file-storage. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Index: openacs-4/packages/skin/skin.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/skin/skin.info,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/skin/skin.info 30 May 2003 08:17:14 -0000 1.7 +++ openacs-4/packages/skin/skin.info 11 Dec 2003 21:40:13 -0000 1.8 @@ -1,22 +1,22 @@ - + Skin Skins t f - + oracle postgresql Christian Brechbuhler - Demonstration of skins or cobranding. + Demonstration of themes or co-branding. 2002-05-15 - OpenACS - Show how the template system lets you give different looks to pages depending on the subsite under which they are mounted. + OpenACS + An example package to show how to theme via master templates. Index: openacs-4/packages/spam/spam.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/spam/spam.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/spam/spam.info 17 May 2003 11:34:41 -0000 1.5 +++ openacs-4/packages/spam/spam.info 11 Dec 2003 21:40:13 -0000 1.6 @@ -1,116 +1,32 @@ - + Spam System Spam Systems f t - + oracle postgresql Tilmann Singer Bill Schneider Mark Dalrymple - Port of the spam system to 4.1 + Send mail to collections of users. 2001-02-06 - OpenACS - Port of the spam system to 4.1. Provides a set of user-interface pages for sending e-mail to groups of users, selected based on some criteria in the database. Applications may link to the spam system with their own set of criteria (SQL queries). + OpenACS + Provides a UI for sending e-mail to groups of users, selected based on some criteria in the database. Applications may link to the spam system with their own set of criteria (SQL queries). Bulk-mail is now the prefered package for this functionality. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Index: openacs-4/packages/static-pages/static-pages.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/static-pages/static-pages.info,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/static-pages/static-pages.info 8 Oct 2003 16:05:26 -0000 1.15 +++ openacs-4/packages/static-pages/static-pages.info 11 Dec 2003 21:40:13 -0000 1.16 @@ -1,7 +1,7 @@ - + Static Pages Static Pages f @@ -14,9 +14,9 @@ Dave Bauer Andrew Piskorski - Static Pages makes it possible to search and comment on static pages. + Support searchable and commentable static site content. 2002-12-11 - OpenACS + OpenACS Static Pages loads the static pages of a site into the database so that their contents are available to other packages, such as site-wide-search. It also allows users to make comments on static pages. Index: openacs-4/packages/survey/survey.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/survey.info,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/survey/survey.info 10 Nov 2003 16:36:31 -0000 1.10 +++ openacs-4/packages/survey/survey.info 11 Dec 2003 21:40:14 -0000 1.11 @@ -10,12 +10,12 @@ Dave Bauer Luke Pond - New version of survey package for dotLRN/OpenACS4.5 + User defined surveys with reporting. OpenACS - New version of survey package for dotLRN/OpenACS4.5 + Expanded functionality survey package derived from simple-survey. - + Index: openacs-4/packages/survey/catalog/survey.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/catalog/survey.en_US.ISO-8859-1.xml,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/survey/catalog/survey.en_US.ISO-8859-1.xml 10 Nov 2003 22:55:41 -0000 1.7 +++ openacs-4/packages/survey/catalog/survey.en_US.ISO-8859-1.xml 11 Dec 2003 21:40:14 -0000 1.8 @@ -65,6 +65,7 @@ [inactive] Integer is + list Large Last Name limit to one @@ -217,6 +218,7 @@ Move Down Move Up Multiple Choice + multiple responses Name New Survey No @@ -231,6 +233,7 @@ One Survey: %name% oops Original + paragraph Plain Text Preformatted Text Presentation Type @@ -266,6 +269,7 @@ Survey Name Survey Name: %name% Surveys + table Text This survey is True or False Index: openacs-4/packages/survey/sql/oracle/survey-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/sql/oracle/survey-package-create.sql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/survey/sql/oracle/survey-package-create.sql 10 Oct 2003 14:41:45 -0000 1.4 +++ openacs-4/packages/survey/sql/oracle/survey-package-create.sql 11 Dec 2003 21:40:14 -0000 1.5 @@ -476,7 +476,7 @@ (select max(response_id) as response_id from survey_responses group by nvl(initial_response_id, response_id)) latest - where nvl(sr.inital_response_id,sr.response_id) = o.object_id + where nvl(sr.initial_response_id,sr.response_id) = o.object_id and sr.response_id= latest.response_id; create or replace view survey_ques_responses_latest as Index: openacs-4/packages/survey/tcl/survey-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/survey/tcl/survey-procs.xql 12 Mar 2003 01:05:25 -0000 1.3 +++ openacs-4/packages/survey/tcl/survey-procs.xql 11 Dec 2003 21:40:14 -0000 1.4 @@ -30,10 +30,10 @@ select s.*, o.creation_user, o.creation_date, p.first_names || ' ' || p.last_name as creator_name, - (case when enabled_p = 't' then '#survey.Enable#' else '#survey.Disable#' end) as enabled_display, - (case when single_response_p = 't' then '#survey.One_response#' else '#survey.Multiple_responses#' end) as single_response_display, - (case when editable_p = 'f' then '#survey.Non-Editable#' else '#survey.Editable#' end) as editable_display, - (case when single_section_p = 'f' then '#survey.Multiple_sections#' else '#survey.Single_section#' end) as single_section_display + (case when enabled_p = 't' then '#survey.enable#' else '#survey.disable#' end) as enabled_display, + (case when single_response_p = 't' then '#survey.one_response#' else '#survey.multiple_responses#' end) as single_response_display, + (case when editable_p = 'f' then '#survey.non-editable#' else '#survey.editable#' end) as editable_display, + (case when single_section_p = 'f' then '#survey.multiple_sections#' else '#survey.single_section#' end) as single_section_display from surveys s, acs_objects o, persons p where o.object_id = :survey_id and s.survey_id = o.object_id Index: openacs-4/packages/telecom-number/telecom-number.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/telecom-number/telecom-number.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/telecom-number/telecom-number.info 25 Oct 2003 14:33:17 -0000 1.2 +++ openacs-4/packages/telecom-number/telecom-number.info 11 Dec 2003 21:40:14 -0000 1.3 @@ -13,8 +13,8 @@ postgresql Jon Griffin - This is a mapping of HR-XML's telecom standard. - Mayuli Enterprises LLC + Datamodel and UI for the HR-XML telecom standard. + Mayuli Enterprises, LLC This is a mapping of HR-XML's telecom standard.<p> Originally part of contacts-lite, now stand-alone to allow for use in other packages. Index: openacs-4/packages/trackback/trackback.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/trackback/trackback.info,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/trackback/trackback.info 1 Oct 2003 12:47:54 -0000 1.2 +++ openacs-4/packages/trackback/trackback.info 11 Dec 2003 21:40:14 -0000 1.3 @@ -10,9 +10,12 @@ Dave Bauer - Support for sending and receiving trackback pings. + Support for sending and receiving trackback pings. 2003-09-30 - Implements the trackback ping specification: http://www.movabletype.org/docs/mttrackback.html + Implements the trackback ping specification +<a href="http://www.movabletype.org/docs/mttrackback.html">http://www.movabletype.org/docs/mttrackback.html</a>, +for use with lars-blogger. + Index: openacs-4/packages/user-preferences/user-preferences.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-preferences/user-preferences.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/user-preferences/user-preferences.info 10 Nov 2003 16:36:32 -0000 1.5 +++ openacs-4/packages/user-preferences/user-preferences.info 11 Dec 2003 21:40:14 -0000 1.6 @@ -10,6 +10,7 @@ OpenACS 2003-11-10 + A skeleton for how to implement user-preference storage OpenACS Index: openacs-4/packages/value-based-shipping/value-based-shipping.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/value-based-shipping/value-based-shipping.info,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/value-based-shipping/value-based-shipping.info 19 Sep 2002 20:02:38 -0000 1.4 +++ openacs-4/packages/value-based-shipping/value-based-shipping.info 11 Dec 2003 21:40:15 -0000 1.5 @@ -13,9 +13,13 @@ postgresql Bart Teeuwisse - This package calculates the total shipping charges based on the total value of the shipment. + Calculates the shipping charges based on the total value of the shipment. 2002-05-13 - This package calculates the total shipping charges for all available service levels based on the total value of the shipment. + + This package calculates the total shipping charges for all + available service levels based on the total value of the shipment. An + implementation of the shipping-gateway service contract. + Index: openacs-4/packages/version-control/version-control.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/version-control/version-control.info,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/version-control/version-control.info 30 Sep 2003 11:32:19 -0000 1.5 +++ openacs-4/packages/version-control/version-control.info 11 Dec 2003 21:40:15 -0000 1.6 @@ -1,21 +1,27 @@ - + Version Control Version Control f t - + oracle postgresql - Ron Henderson - CVS abstraction layer for packages that need access to version control functions. + Ron Henderson + CVS abstraction layer for packages that need access to version control. 2001-01-26 - ArsDigita Corporation + OpenACS + + Provides an API for talking to the version control system for the + site. It is hard-coded for the Concurrent Versions System (CVS). + There are procs to fetch various types of status information and procs + to execute certain version control operations on the underlying files. + Index: openacs-4/packages/weblogger-portlet/www/weblogger-portlet-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/weblogger-portlet/www/weblogger-portlet-oracle.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/weblogger-portlet/www/weblogger-portlet-oracle.xql 17 Oct 2003 00:39:55 -0000 1.3 +++ openacs-4/packages/weblogger-portlet/www/weblogger-portlet-oracle.xql 11 Dec 2003 21:40:15 -0000 1.4 @@ -19,7 +19,7 @@ from apm_packages p, pinds_blog_entries e, acs_objects o, - all_users u + acs_users_all u where p.package_id in ([join $list_of_package_ids ", "]) and e.package_id (+) = p.package_id and o.object_id (+) = e.entry_id Index: openacs-4/packages/weblogger-portlet/www/weblogger-portlet-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/weblogger-portlet/www/weblogger-portlet-postgresql.xql,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/weblogger-portlet/www/weblogger-portlet-postgresql.xql 17 Oct 2003 00:39:56 -0000 1.3 +++ openacs-4/packages/weblogger-portlet/www/weblogger-portlet-postgresql.xql 11 Dec 2003 21:40:15 -0000 1.4 @@ -19,7 +19,7 @@ from apm_packages p left outer join pinds_blog_entries e on (e.package_id = p.package_id) join acs_objects o on (o.object_id = e.entry_id) join - all_users u on (u.user_id = o.creation_user) + acs_users_all u on (u.user_id = o.creation_user) where p.package_id in ([join $list_of_package_ids ", "]) and e.entry_date > current_timestamp - interval '30 days' and e.draft_p = 'f' Index: openacs-4/packages/webmail/webmail.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/webmail/webmail.info,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/webmail/webmail.info 17 May 2003 12:43:52 -0000 1.3 +++ openacs-4/packages/webmail/webmail.info 11 Dec 2003 21:40:15 -0000 1.4 @@ -1,20 +1,20 @@ - + Webmail Webmail t - + oracle - Erik Bielefeldt + Erik Bielefeldt Web-based email service. 2001-02-15 - ArsDigita Corporation - Provides a web-based email service for ACS 4.x. Please follow the installation instructions in /webmail/www/doc/ that are provided with the package. + OpenACS + Provides a web-based email service for ACS 4.x, uses the database for message storage. Broken and oracle only. Index: openacs-4/packages/workflow/workflow.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/workflow.info,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/workflow/workflow.info 18 Nov 2003 17:57:56 -0000 1.12 +++ openacs-4/packages/workflow/workflow.info 11 Dec 2003 21:40:15 -0000 1.13 @@ -11,18 +11,23 @@ Lars Pind Peter Marklund - A Tcl API for creating workflows that support the Bug Tracker, CMS publication, simple approval, and much more. + A Tcl API for creating and managing workflows. 2003-11-18 Collaboraid - This package lets you define the process that your tickets, articles, documents, reports, claims, change requests, or any other object of interest, must go through to ensure consistent quality and to avoid that any cases falls through the cracks. -<p> + + This package lets you define the process that your tickets, articles, + documents, reports, claims, change requests, or any other + object of interest, must go through to ensure consistent quality and + to avoid that any cases falls through the cracks. + It supports the Bug Tracker, CMS publication, simple approval, and much more. +<p> For more information, see: <a href="http://www.collaboraid.biz/developer/workflow-spec">the workflow specification</a>. - - - - + + + + Index: openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql 3 Oct 2003 13:26:27 -0000 1.5 +++ openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql 11 Dec 2003 21:40:15 -0000 1.6 @@ -58,18 +58,10 @@ ) return integer is begin - for rec in (select cr.item_id - from cr_items cr, workflow_case_log wcl - where cr.item_id = wcl.entry_id - and wcl.case_id = delete_case_id) - loop - delete from workflow_case_log where entry_id = rec.item_id; - content_item.del(rec.item_id); - end loop; - -- All workflow data cascades from the case id - delete from workflow_cases - where object_id = delete_case_id; + delete + from workflow_cases + where object_id = workflow_case_pkg.del.delete_case_id; return 0; end del; Index: openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql 1 Dec 2003 09:53:19 -0000 1.9 +++ openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql 11 Dec 2003 21:40:15 -0000 1.10 @@ -1,4 +1,4 @@ ->-- Data model for the workflow package, part of the OpenACS system. +-- Data model for the workflow package, part of the OpenACS system. -- -- @author Lars Pind (lars@collaboraid.biz) -- @author Peter Marklund (peter@collaboraid.biz) Index: openacs-4/packages/workflow/sql/oracle/upgrade/upgrade-1.2d1-1.2b2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/oracle/upgrade/Attic/upgrade-1.2d1-1.2b2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/workflow/sql/oracle/upgrade/upgrade-1.2d1-1.2b2.sql 11 Dec 2003 21:40:15 -0000 1.2 @@ -0,0 +1,148 @@ +-- +-- Fixes case deletion, which can now be done completely through cascading delete +-- Also adds missing upgrade scripts from that bug fix +-- +-- @author Lars Pind (lars@collaboraid.biz) +-- +-- @cvs-id $Id: upgrade-1.2d1-1.2b2.sql,v 1.2 2003/12/11 21:40:15 jeffd Exp $ + +create or replace package body workflow_case_pkg +as + function get_pretty_state( + workflow_short_name in varchar, + object_id in integer + ) return varchar + is + v_state_pretty varchar(4000); + v_object_id integer; + begin + v_object_id := object_id; + + select s.pretty_name + into v_state_pretty + from workflows w, + workflow_cases c, + workflow_case_fsm cfsm, + workflow_fsm_states s + where w.short_name = workflow_short_name + and c.object_id = v_object_id + and c.workflow_id = w.workflow_id + and cfsm.case_id = c.case_id + and s.state_id = cfsm.current_state; + + return v_state_pretty; + + end get_pretty_state; + + function del( + delete_case_id in integer + ) return integer + is + begin + -- All workflow data cascades from the case id + delete + from workflow_cases + where object_id = workflow_case_pkg.del.delete_case_id; + + return 0; + end del; + +end workflow_case_pkg; +/ +show errors + + + +create or replace package body workflow_case_log_entry +as + function new( + entry_id in integer, + case_id in integer, + action_id in integer, + comment in varchar, + comment_mime_type in varchar, + creation_user in integer, + creation_ip in varchar, + content_type in varchar default 'workflow_case_log_entry' + ) return integer + is + v_name varchar2(4000); -- XXX aufflick fix this + v_action_short_name varchar2(4000); + v_action_pretty_past_tense varchar2(4000); + v_case_object_id integer; + v_item_id integer; + v_revision_id integer; + begin + select short_name, pretty_past_tense + into v_action_short_name, v_action_pretty_past_tense + from workflow_actions + where action_id = new.action_id; + + -- use case object as context_id + select object_id + into v_case_object_id + from workflow_cases + where case_id = new.case_id; + + -- build the unique name + if entry_id is not null then + v_item_id := entry_id; + else + select acs_object_id_seq.nextval into v_item_id from dual; + end if; + v_name := v_action_short_name || ' ' || v_item_id; + + v_item_id := content_item.new ( + item_id => v_item_id, + name => v_name, + parent_id => v_case_object_id, + title => v_action_pretty_past_tense, + creation_date => sysdate(), + creation_user => creation_user, + context_id => v_case_object_id, + creation_ip => creation_ip, + is_live => 't', + mime_type => comment_mime_type, + text => comment, + storage_type => 'text', + item_subtype => 'content_item', + content_type => content_type + ); + + -- insert the row into the single-column entry revision table + v_revision_id := content_item.get_live_revision (v_item_id); + + insert into workflow_case_log_rev (entry_rev_id) + values (v_revision_id); + + -- insert into workflow-case-log + -- raise_application_error(-20000, 'about to insert ' || v_item_id || ',' || new.case_id || ',' || new.action_id); + insert into workflow_case_log (entry_id, case_id, action_id) + values (v_item_id, new.case_id, new.action_id); + + -- return id of newly created item + return v_item_id; + end new; + +end workflow_case_log_entry; +/ +show errors + + + +-- Now change parent_id of existing cases + +begin + for rec in (select c.object_id, + l.entry_id + from workflow_cases c, + workflow_case_log l + where c.case_id = l.case_id) + loop + update cr_items + set parent_id = rec.object_id + where item_id = rec.entry_id; + end loop; +end; +/ +show errors Index: openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql 3 Oct 2003 13:26:27 -0000 1.8 +++ openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql 11 Dec 2003 21:40:15 -0000 1.9 @@ -36,16 +36,6 @@ delete_case_id alias for $1; rec record; begin - - for rec in select cr.item_id - from cr_items cr, workflow_case_log wcl - where cr.item_id = wcl.entry_id - and wcl.case_id = delete_case_id loop - - delete from workflow_case_log where entry_id = rec.item_id; - perform content_item__delete(rec.item_id); - end loop; - -- All workflow data cascades from the case id delete from workflow_cases where case_id = delete_case_id; Index: openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2d1-1.2b2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/upgrade/Attic/upgrade-1.2d1-1.2b2.sql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/workflow/sql/postgresql/upgrade/upgrade-1.2d1-1.2b2.sql 11 Dec 2003 21:40:16 -0000 1.2 @@ -0,0 +1,130 @@ +-- +-- Fixes case deletion, which can now be done completely through cascading delete +-- Also adds missing upgrade scripts from that bug fix +-- +-- @author Lars Pind (lars@collaboraid.biz) +-- +-- @cvs-id $Id: upgrade-1.2d1-1.2b2.sql,v 1.2 2003/12/11 21:40:16 jeffd Exp $ + +create or replace function workflow_case_pkg__delete (integer) +returns integer as ' +declare + delete_case_id alias for $1; + rec record; +begin + -- All workflow data cascades from the case id + delete from workflow_cases + where case_id = delete_case_id; + + return 0; +end;' language 'plpgsql'; + + + +create or replace function workflow_case_log_entry__new ( + integer, -- entry_id + varchar, -- content_type + integer, -- case_id + integer, -- action_id + varchar, -- comment + varchar, -- comment_mime_type + integer, -- creation_user + varchar -- creation_ip +) returns integer as ' +declare + p_item_id alias for $1; + p_content_type alias for $2; + p_case_id alias for $3; + p_action_id alias for $4; + p_comment alias for $5; + p_comment_mime_type alias for $6; + p_creation_user alias for $7; + p_creation_ip alias for $8; + + v_name varchar; + v_action_short_name varchar; + v_action_pretty_past_tense varchar; + v_case_object_id integer; + v_item_id integer; + v_revision_id integer; +begin + select short_name, pretty_past_tense + into v_action_short_name, v_action_pretty_past_tense + from workflow_actions + where action_id = p_action_id; + + -- use case object as context_id + select object_id + into v_case_object_id + from workflow_cases + where case_id = p_case_id; + + -- build the unique name + if p_item_id is not null then + v_item_id := p_item_id; + else + select nextval + into v_item_id + from acs_object_id_seq; + end if; + v_name := v_action_short_name || '' '' || v_item_id; + + v_item_id := content_item__new ( + v_item_id, -- item_id + v_name, -- name + v_case_object_id, -- parent_id + v_action_pretty_past_tense, -- title + now(), -- creation_date + p_creation_user, -- creation_user + v_case_object_id, -- context_id + p_creation_ip, -- creation_ip + ''t'', -- is_live + p_comment_mime_type, -- mime_type + p_comment, -- text + ''text'', -- storage_type + ''t'', -- security_inherit_p + ''CR_FILES'', -- storage_area_key + ''content_item'', -- item_subtype + p_content_type -- content_type + ); + + -- insert the row into the single-column entry revision table + select content_item__get_live_revision (v_item_id) + into v_revision_id; + + insert into workflow_case_log_rev (entry_rev_id) + values (v_revision_id); + + -- insert into workflow-case-log + insert into workflow_case_log (entry_id, case_id, action_id) + values (v_item_id, p_case_id, p_action_id); + + -- return id of newly created item + return v_item_id; +end;' language 'plpgsql'; + + +-- Now change parent_id of existing cases + +create or replace function inline_0() returns integer as ' +declare + rec record; +begin + for rec in select c.object_id, + l.entry_id + from workflow_cases c, + workflow_case_log l + where c.case_id = l.case_id + loop + update cr_items + set parent_id = rec.object_id + where item_id = rec.entry_id; + end loop; + + return 0; +end;' language 'plpgsql'; + +select inline_0(); + +drop function inline_0(); + Index: openacs-4/packages/workflow/tcl/case-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs-oracle.xql,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/workflow/tcl/case-procs-oracle.xql 18 Nov 2003 17:57:57 -0000 1.5 +++ openacs-4/packages/workflow/tcl/case-procs-oracle.xql 11 Dec 2003 21:40:16 -0000 1.6 @@ -129,7 +129,7 @@ begin - :1 := workflow_case.del(:case_id); + :1 := workflow_case_pkg.del(:case_id); end; Index: openacs-4/packages/wp-slim/wp-slim.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/wp-slim.info,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/wp-slim/wp-slim.info 8 Oct 2003 16:05:27 -0000 1.14 +++ openacs-4/packages/wp-slim/wp-slim.info 11 Dec 2003 21:40:16 -0000 1.15 @@ -1,18 +1,18 @@ - + Wimpy Point Wimpy Points f f - + Rocael Hernandez Rizzardini - Wimpy Point allows users to collaborate and share online presentations. + A collaborative online presentation package. 2003-03-27 - Openacs - Scalability test, permission revision, enhancements from WPII and other features added (Rocael). Ported (Jack). Fixed several bugs. Added new features (e.g. versioning and authorization). + OpenACS + Wimpy Point allows users to create online slide presentations and supports collaborative editing, customizable style sheets, printable output, and commentability. Index: openacs-4/packages/wp-slim/www/style-list-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/style-list-postgresql.xql,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/style-list-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.2 +++ openacs-4/packages/wp-slim/www/style-list-postgresql.xql 11 Dec 2003 21:40:16 -0000 1.3 @@ -1,6 +1,7 @@ +postgresql7.1 Index: openacs-4/tcl/0-acs-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/tcl/0-acs-init.tcl,v diff -u -N -r1.4 -r1.5 --- openacs-4/tcl/0-acs-init.tcl 29 Aug 2001 21:22:49 -0000 1.4 +++ openacs-4/tcl/0-acs-init.tcl 11 Dec 2003 21:40:16 -0000 1.5 @@ -17,8 +17,26 @@ ns_log "Notice" "Sourcing $bootstrap_file" if { [file isfile $bootstrap_file] } { + + # Check that the appropriate version of tDom (http://www.tdom.org) is installed + # and spit out a comment or try to install it if not. + if {[string equal {} [info commands domNode]]} { + if {[ns_info version] < 4} { + ns_log Error "0-acs-init.tcl: domNode command not found -- libtdom.so not loaded?" + } elseif {[ns_info version] >= 4} { + if {[catch {set version [package require tdom]} errmsg]} { + ns_log Error "0-acs-init.tcl: error loading tdom: $errmsg" + } else { + foreach {major minor point} [split $version .] { break } + if {$major == 0 + && ( $minor < 7 || ($minor == 7 && $point < 8))} { + ns_log Error "0-acs-init.tcl: please use tdom version 0.7.8 or greater (you have version $version)" + } + } + } + } + source $bootstrap_file } else { ns_log "Error" "$bootstrap_file does not exist. Aborting the OpenACS load process." } - Index: openacs-4/www/blank-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.adp,v diff -u -N -r1.3 -r1.4 --- openacs-4/www/blank-master.adp 30 Sep 2003 09:52:00 -0000 1.3 +++ openacs-4/www/blank-master.adp 11 Dec 2003 21:40:16 -0000 1.4 @@ -17,5 +17,7 @@ +Toggle translator mode + Index: openacs-4/www/blank-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/blank-master.tcl,v diff -u -N -r1.5 -r1.6 --- openacs-4/www/blank-master.tcl 30 Sep 2003 09:52:00 -0000 1.5 +++ openacs-4/www/blank-master.tcl 11 Dec 2003 21:40:16 -0000 1.6 @@ -81,3 +81,12 @@ } set translator_mode_p [lang::util::translator_mode_p] + +# Toggle translator mode link + +set acs_lang_url [apm_package_url_from_key "acs-lang"] +set lang_admin_p [permission::permission_p \ + -object_id [site_node::get_element -url $acs_lang_url -element object_id] \ + -privilege admin \ + -party_id [ad_conn untrusted_user_id]] +set toggle_translator_mode_url [export_vars -base "${acs_lang_url}admin/translator-mode-toggle" { { return_url [ad_return_url] } }] Index: openacs-4/www/site-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/site-master.adp,v diff -u -N -r1.9 -r1.10 --- openacs-4/www/site-master.adp 16 Oct 2003 20:38:34 -0000 1.9 +++ openacs-4/www/site-master.adp 11 Dec 2003 21:40:16 -0000 1.10 @@ -67,6 +67,15 @@ + +

    Change Locale + + + + Install Locales + + + - +

    Index: openacs-4/www/site-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/site-master.tcl,v diff -u -N -r1.9 -r1.10 --- openacs-4/www/site-master.tcl 23 Oct 2003 15:52:58 -0000 1.9 +++ openacs-4/www/site-master.tcl 11 Dec 2003 21:40:16 -0000 1.10 @@ -46,8 +46,9 @@ set sw_admin_p [acs_user::site_wide_admin_p -user_id [ad_conn untrusted_user_id]] if { $sw_admin_p } { - set admin_url "/acs-admin/" - set devhome_url "/acs-admin/developer" + set admin_url "/acs-admin/" + set devhome_url "/acs-admin/developer" + set locale_admin_url "/acs-lang/admin" } else { set subsite_admin_p [permission::permission_p \ -object_id [subsite::get_element -element object_id] \ @@ -67,7 +68,11 @@ # Context bar if { [template::util::is_nil no_context_p] } { if { ![template::util::is_nil context] } { - set context_bar [eval ad_context_bar -from_node $subsite_node_id $context] + set cmd [list ad_context_bar -from_node $subsite_node_id --] + foreach elem $context { + lappend cmd $elem + } + set context_bar [eval $cmd] } if [template::util::is_nil context_bar] { set context_bar [ad_context_bar -from_node $subsite_node_id] @@ -76,5 +81,14 @@ set context_bar {} } +# change locale +set num_of_locales [llength [lang::system::get_locales]] +if { $num_of_locales > 1 } { + set change_locale_url \ + "/acs-lang/?[export_vars { { package_id "[ad_conn package_id]" } }]" +} + + + # Curriculum bar set curriculum_bar_p [llength [site_node::get_children -all -filters { package_key "curriculum" } -node_id $subsite_node_id]]