Index: openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql 12 Feb 2002 00:02:13 -0000 1.7 +++ openacs-4/packages/edit-this-page/sql/postgresql/edit-this-page-create.sql 30 Nov 2002 17:32:08 -0000 1.8 @@ -57,7 +57,7 @@ -- the dynamic sql in acs_object__delete. so just use content_revision. v_content_type := ''content_revision''; - v_revision_id := acs_object__new(null, v_content_type); + v_revision_id := acs_object__new(null, v_content_type, now(), null, null, v_item_id); insert into cr_revisions (revision_id, item_id, title, publish_date, mime_type) @@ -124,13 +124,14 @@ end; ' language 'plpgsql'; -create function etp__create_new_revision(integer, varchar, integer) +create or replace function etp__create_new_revision(integer, varchar, integer) returns integer as ' declare p_package_id alias for $1; p_name alias for $2; p_user_id alias for $3; v_revision_id integer; + v_item_id integer; v_new_revision_id integer; v_content_type varchar; begin @@ -142,6 +143,11 @@ and i.parent_id = etp__get_folder_id(p_package_id) and r.item_id = i.item_id; + select item_id + into v_item_id + from cr_revisions + where revision_id = v_revision_id; + select object_type into v_content_type from acs_objects @@ -153,8 +159,8 @@ select acs_object_id_seq.nextval into v_new_revision_id from dual; - insert into acs_objects (object_id, object_type, creation_date, creation_user) - values (v_new_revision_id, v_content_type, now(), p_user_id); + insert into acs_objects (object_id, object_type, creation_date, creation_user, context_id) + values (v_new_revision_id, v_content_type, now(), p_user_id, v_item_id); insert into cr_revisions (revision_id, item_id, title, description, content, mime_type) select v_new_revision_id, item_id, title, description, content, mime_type Index: openacs-4/packages/edit-this-page/www/etp-trash.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/etp-trash.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/edit-this-page/www/etp-trash.xql 9 Nov 2001 03:38:17 -0000 1.3 +++ openacs-4/packages/edit-this-page/www/etp-trash.xql 30 Nov 2002 17:32:17 -0000 1.4 @@ -38,7 +38,7 @@ update cr_items - set parent_id = -400 + set parent_id = -400, live_revision = NULL where item_id = :item_id Index: openacs-4/packages/edit-this-page/www/etp.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/www/etp.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/edit-this-page/www/etp.tcl 4 Sep 2002 13:01:46 -0000 1.2 +++ openacs-4/packages/edit-this-page/www/etp.tcl 30 Nov 2002 17:32:17 -0000 1.3 @@ -20,6 +20,9 @@ etp::check_write_access +# lets make etp subsite aware +# get the cloest ancestor acs-subsite +set subsite_url [site_node_closest_ancestor_package_url -package_key "acs-subsite"] array set application_params [etp::get_application_params] set subtopic_object_name [etp::get_application_param index_object_name [ad_parameter subtopic_application "default"]] @@ -33,7 +36,9 @@ # the results aren't cached. set revision_id [etp::get_latest_revision_id $package_id $name] -db_1row get_current_page_attributes "" -column_array pa +if {![db_0or1row get_current_page_attributes "" -column_array pa]} { + ad_return_warning "Page $name does not exist" "No page by the name of $name exists" +} template::multirow create page_attributes name pretty_name value Index: openacs-4/packages/faq/faq.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/faq.info,v diff -u -r1.5 -r1.6 --- openacs-4/packages/faq/faq.info 17 Jul 2002 20:20:17 -0000 1.5 +++ openacs-4/packages/faq/faq.info 30 Nov 2002 17:32:33 -0000 1.6 @@ -7,15 +7,15 @@ f f - + oracle postgresql - Elizabeth Wirth Jennie Kim Housman + Elizabeth Wirth Port of FAQ module from 3.4 with a few enhancements. - 2001-03-15 + 2002-10-27 Ybos Corporation @@ -25,6 +25,7 @@ + @@ -40,7 +41,6 @@ - @@ -57,7 +57,6 @@ - Index: openacs-4/packages/faq/sql/oracle/faq-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/sql/oracle/faq-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/faq/sql/oracle/faq-create.sql 29 May 2002 23:05:24 -0000 1.2 +++ openacs-4/packages/faq/sql/oracle/faq-create.sql 30 Nov 2002 17:32:48 -0000 1.3 @@ -23,7 +23,8 @@ faq_name varchar (250) constraint faqs_faq_name_nn not null, - separate_p char(1) default 'f' check(separate_p in ('f','t')) + separate_p char(1) default 'f' check(separate_p in ('f','t')), + disabled_p char(1) default 'f' check(disabled_p in ('f','t')) ); Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/faq/sql/oracle/upgrade/upgrade-4.0-4.6.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/faq/sql/postgresql/faq-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/faq/sql/postgresql/faq-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/faq/sql/postgresql/faq-create.sql 17 Jul 2002 20:20:17 -0000 1.2 +++ openacs-4/packages/faq/sql/postgresql/faq-create.sql 30 Nov 2002 17:33:27 -0000 1.3 @@ -34,7 +34,8 @@ primary key, faq_name varchar (250) constraint faqs_faq_name_nn not null, - separate_p boolean check(separate_p in ('f','t')) + separate_p boolean check(separate_p in ('f','t')), + disabled_p char(1) default 'f' check(disabled_p in ('f','t')) ); Index: openacs-4/packages/file-manager/www/file-upload-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-manager/www/file-upload-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/file-manager/www/file-upload-2.tcl 18 Sep 2002 12:12:43 -0000 1.3 +++ openacs-4/packages/file-manager/www/file-upload-2.tcl 30 Nov 2002 17:33:45 -0000 1.4 @@ -23,10 +23,10 @@ } if {![empty_string_p $title] && [empty_string_p [file ext $title]]} { - incr errcnt - append errmsg " + ad_return_complaint "
  • The title you supply must have one of the following extensions:
    [ad_parameter Extensions file-manager]" + ad_script_abort } # Done with error checking Index: openacs-4/packages/file-storage/file-storage.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v diff -u -r1.17 -r1.18 --- openacs-4/packages/file-storage/file-storage.info 17 Sep 2002 21:03:22 -0000 1.17 +++ openacs-4/packages/file-storage/file-storage.info 30 Nov 2002 17:34:00 -0000 1.18 @@ -7,18 +7,18 @@ f f - + oracle postgresql Jowell S. Sabino This application allows users to collaboratively maintain documents on the web server - 2000-12-29 + 2002-10-27 OpenACS Now allows storage of files on the filesystem or database. - + @@ -32,6 +32,7 @@ + @@ -41,6 +42,7 @@ + @@ -120,8 +122,6 @@ - - @@ -152,11 +152,11 @@ - - - - + + + + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-4.2-4.6.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.2-4.6.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/file-storage/www/folder-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.adp,v diff -u -r1.12 -r1.13 --- openacs-4/packages/file-storage/www/folder-chunk.adp 18 Nov 2002 18:01:05 -0000 1.12 +++ openacs-4/packages/file-storage/www/folder-chunk.adp 30 Nov 2002 17:34:29 -0000 1.13 @@ -10,10 +10,10 @@ - + - + #file-storage.folder# Index: openacs-4/packages/file-storage/www/folder-contents.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/folder-contents.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/file-storage/www/folder-contents.adp 5 Nov 2002 17:19:59 -0000 1.4 +++ openacs-4/packages/file-storage/www/folder-contents.adp 30 Nov 2002 17:34:29 -0000 1.5 @@ -8,6 +8,7 @@
  • I#file-storage.Not_i##file-storage.lt_ncluding_items_from_s# + ( #file-storage.exclude# Index: openacs-4/packages/forums/forums.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/forums.info,v diff -u -r1.13 -r1.14 --- openacs-4/packages/forums/forums.info 23 Sep 2002 23:32:17 -0000 1.13 +++ openacs-4/packages/forums/forums.info 30 Nov 2002 17:34:39 -0000 1.14 @@ -7,7 +7,7 @@ f f - + oracle postgresql @@ -35,6 +35,7 @@ + @@ -49,11 +50,12 @@ + - - + + @@ -107,6 +109,8 @@ + + @@ -116,9 +120,9 @@ - - + + Index: openacs-4/packages/forums/sql/oracle/forums-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-forums-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/sql/oracle/forums-forums-create.sql 24 Jun 2002 22:37:52 -0000 1.3 +++ openacs-4/packages/forums/sql/oracle/forums-forums-create.sql 30 Nov 2002 17:34:49 -0000 1.4 @@ -68,7 +68,8 @@ check (enabled_p in ('t','f')), package_id integer constraint forums_package_id_nn - not null + not null, + last_post date ); create view forums_forums_enabled Index: openacs-4/packages/forums/sql/oracle/forums-forums-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-forums-package-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/sql/oracle/forums-forums-package-create.sql 3 Jun 2002 23:58:45 -0000 1.3 +++ openacs-4/packages/forums/sql/oracle/forums-forums-package-create.sql 30 Nov 2002 17:34:49 -0000 1.4 @@ -73,8 +73,6 @@ values (v_forum_id, name, charter, presentation_type, posting_policy, package_id); - acs_object.update_last_modified(nvl(context_id, package_id)); - return v_forum_id; end new; Index: openacs-4/packages/forums/sql/oracle/forums-messages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-messages-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 24 Jun 2002 22:37:52 -0000 1.3 +++ openacs-4/packages/forums/sql/oracle/forums-messages-create.sql 30 Nov 2002 17:34:49 -0000 1.4 @@ -50,6 +50,7 @@ check (open_p in ('t','f')), tree_sortkey raw(240), max_child_sortkey raw(100), + last_child_post date, constraint forums_mess_sk_forum_un unique (tree_sortkey, forum_id) ); Index: openacs-4/packages/forums/sql/oracle/forums-messages-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/oracle/forums-messages-package-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/sql/oracle/forums-messages-package-create.sql 3 Jun 2002 23:58:45 -0000 1.3 +++ openacs-4/packages/forums/sql/oracle/forums-messages-package-create.sql 30 Nov 2002 17:34:49 -0000 1.4 @@ -80,9 +80,11 @@ ) return forums_messages.message_id%TYPE is v_message_id acs_objects.object_id%TYPE; + v_sortkey forums_messages.tree_sortkey%TYPE; v_forum_policy forums_forums.posting_policy%TYPE; v_state forums_messages.state%TYPE; begin + v_message_id := acs_object.new( object_id => message_id, object_type => object_type, @@ -113,8 +115,21 @@ values (v_message_id, forum_id, subject, content, html_p, user_id, posting_date, parent_id, v_state); - acs_object.update_last_modified(forum_id); + -- DRB: Can't use root_message_id() here because it triggers a "mutating table" error + select tree_sortkey into v_sortkey + from forums_messages + where message_id = v_message_id; + + update forums_forums + set last_post = posting_date + where forum_id = forums_message.new.forum_id; + + update forums_messages + set last_child_post = posting_date + where forum_id = forums_message.new.forum_id + and tree_sortkey = tree.ancestor_key(v_sortkey, 1); + return v_message_id; end new; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/sql/oracle/upgrade-0.1d-0.2d.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 10 Jul 2002 18:30:36 -0000 1.4 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-create.sql 30 Nov 2002 17:35:03 -0000 1.5 @@ -22,11 +22,6 @@ select acs_privilege__create_privilege('forum_post',null,null); select acs_privilege__create_privilege('forum_moderate',null,null); - -- temporarily drop this trigger to avoid a data-change violation - -- on acs_privilege_hierarchy_index while updating the child privileges. - - drop trigger acs_priv_hier_ins_del_tr on acs_privilege_hierarchy; - -- add children select acs_privilege__add_child('create','forum_create'); select acs_privilege__add_child('write','forum_write'); @@ -37,13 +32,6 @@ select acs_privilege__add_child('forum_write','forum_read'); select acs_privilege__add_child('forum_write','forum_post'); - -- re-enable the trigger before the last insert to force the - -- acs_privilege_hierarchy_index table to be updated. - - create trigger acs_priv_hier_ins_del_tr after insert or delete - on acs_privilege_hierarchy for each row - execute procedure acs_priv_hier_ins_del_tr (); - -- the last one that will cause all the updates select acs_privilege__add_child('read','forum_read'); @@ -81,7 +69,8 @@ check (enabled_p in ('t','f')), package_id integer constraint forums_package_id_nn - not null + not null, + last_post timestamp ); create view forums_forums_enabled Index: openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 5 Aug 2002 20:00:08 -0000 1.6 +++ openacs-4/packages/forums/sql/postgresql/forums-forums-package-create.sql 30 Nov 2002 17:35:03 -0000 1.7 @@ -43,8 +43,6 @@ values (v_forum_id, p_name, p_charter, p_presentation_type, p_posting_policy, p_package_id); - perform acs_object__update_last_modified(coalesce(p_context_id, p_package_id)); - return v_forum_id; end; ' language 'plpgsql'; Index: openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 24 Jun 2002 22:37:52 -0000 1.5 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-create.sql 30 Nov 2002 17:35:03 -0000 1.6 @@ -50,6 +50,7 @@ check (open_p in ('t','f')), tree_sortkey varbit, max_child_sortkey varbit, + last_child_post timestamp, constraint forums_mess_sk_forum_un unique (tree_sortkey, forum_id) ); 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 -r1.8 -r1.9 --- openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 20 Aug 2002 21:39:42 -0000 1.8 +++ openacs-4/packages/forums/sql/postgresql/forums-messages-package-create.sql 30 Nov 2002 17:35:03 -0000 1.9 @@ -69,9 +69,16 @@ values (v_message_id, p_forum_id, p_subject, p_content, p_html_p, p_user_id, v_posting_date, p_parent_id, v_state); - perform acs_object__update_last_modified(p_forum_id); + update forums_forums + set last_post = v_posting_date + where forum_id = p_forum_id; + update forums_messages + set last_child_post = v_posting_date + where message_id = forums_message__root_message_id(v_message_id); + return v_message_id; + end; ' language 'plpgsql'; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/sql/postgresql/upgrade-0.1d-0.2d.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/tcl/forums-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/forums-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/forums/tcl/forums-procs.tcl 25 Oct 2002 13:00:01 -0000 1.8 +++ openacs-4/packages/forums/tcl/forums-procs.tcl 30 Nov 2002 17:35:17 -0000 1.9 @@ -66,6 +66,26 @@ db_1row select_forum {} -column_array row } + ad_proc -public posting_policy_set { + {-posting_policy:required} + {-forum_id:required} + } { + # JCD: this is potentially bad since we are + # just assuming registered_users is the + # right group to be granting forum_write to. + + if {![string equal closed $posting_policy]} { + permission::grant -object_id $forum_id \ + -party_id [acs_magic_object registered_users] \ + -privilege forum_write + } else { + permission::revoke -object_id $forum_id \ + -party_id [acs_magic_object registered_users] \ + -privilege forum_write + } + + } + ad_proc -public new_questions_allow { {-forum_id:required} } { 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 -r1.4 -r1.5 --- openacs-4/packages/forums/tcl/forums-security-procs.tcl 25 Oct 2002 13:00:01 -0000 1.4 +++ openacs-4/packages/forums/tcl/forums-security-procs.tcl 30 Nov 2002 17:35:17 -0000 1.5 @@ -13,8 +13,12 @@ ad_proc -private do_abort {} { do an abort if security violation } { - ad_returnredirect "not-allowed" - return -code error + if { [ad_conn user_id] == 0 } { + ad_redirect_for_registration + } else { + ad_returnredirect "not-allowed" + } + ad_script_abort } ad_proc -public can_read_forum_p { Index: openacs-4/packages/forums/tcl/messages-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/tcl/messages-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/forums/tcl/messages-procs.tcl 18 Nov 2002 18:01:07 -0000 1.13 +++ openacs-4/packages/forums/tcl/messages-procs.tcl 30 Nov 2002 17:35:17 -0000 1.14 @@ -77,7 +77,6 @@ append new_content "Forum: $message(forum_name)
    \n" append new_content "Thread: $message(root_subject)
    \n" append new_content "Author: $message(user_name)
    \n" - append new_content "Posted: $message(posting_date)
    " append new_content "\n
    \n" append new_content $message(content) append new_content "

    -------------------
    " @@ -87,25 +86,24 @@ set html_version $new_content set text_version "" - append text_version " -Forum: $message(forum_name) -Thread: $message(root_message_id) -Author: $message(user_name) ($message(user_email)) -Posted: $message(posting_date) ----------------------------------- -[ad_html_to_text $message(content)] ---------------------------------- -To post a reply to this email or view this message go to: -${url}message-view?message_id=$message(root_message_id) + + append text_version "Forum: $message(forum_name) +Thread: $message(root_subject) +Author: $message(user_name) ($message(user_email))\n\n" -To view Forum $message(forum_name) go to: -${url}forum-view?forum_id=$message(forum_id) -To email the author($message(user_name)) privately: -mailto:$message(user_email) + if { $message(html_p) } { + append text_version [ad_html_to_text $message(content)] + } else { + append text_version [wrap_string $message(content)] + } + append text_version "\n\n-- +To post a reply to this email or view this message go to: +${url}message-view?message_id=$message(root_message_id) " + set new_content $text_version - ns_log notice "requesting a notification with subject $message(forum_name) $message(subject)" + ns_log debug "forums: requesting a notification forum $message(forum_name) subject $message(subject)" # Do the notification for the forum 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 -r1.6 -r1.7 --- openacs-4/packages/forums/www/forum-view-oracle.xql 18 Nov 2002 18:01:08 -0000 1.6 +++ openacs-4/packages/forums/www/forum-view-oracle.xql 30 Nov 2002 17:35:39 -0000 1.7 @@ -14,13 +14,11 @@ from forums_messages_approved fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when acs_objects.last_modified > (sysdate - 1) then 't' else 'f' end as new_p - from forums_messages_approved fm, - acs_objects + to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, + case when fm.last_child_post > (sysdate - 1) then 't' else 'f' end as new_p + from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null - and fm.message_id = acs_objects.object_id order by fm.posting_date desc @@ -37,13 +35,11 @@ from forums_messages fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree.left(fm.tree_sortkey) and tree.right(fm.tree_sortkey)) as n_messages, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when acs_objects.last_modified > (sysdate - 1) then 't' else 'f' end as new_p - from forums_messages fm, - acs_objects + to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, + case when fm.last_child_post > (sysdate - 1) then 't' else 'f' end as new_p + from forums_messages fm where fm.forum_id = :forum_id and fm.parent_id is null - and fm.message_id = acs_objects.object_id order by fm.posting_date desc 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 -r1.5 -r1.6 --- openacs-4/packages/forums/www/forum-view-postgresql.xql 18 Nov 2002 18:01:08 -0000 1.5 +++ openacs-4/packages/forums/www/forum-view-postgresql.xql 30 Nov 2002 17:35:39 -0000 1.6 @@ -14,13 +14,11 @@ from forums_messages_approved fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when acs_objects.last_modified > (now() - 1) then 't' else 'f' end as new_p - from forums_messages_approved fm, - acs_objects + to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, + case when fm.last_child_post > (now() - 1) then 't' else 'f' end as new_p + from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null - and fm.message_id = acs_objects.object_id order by fm.posting_date desc @@ -37,13 +35,11 @@ from forums_messages fm1 where fm1.forum_id = :forum_id and fm1.tree_sortkey between tree_left(fm.tree_sortkey) and tree_right(fm.tree_sortkey)) as n_messages, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when acs_objects.last_modified > (now() - 1) then 't' else 'f' end as new_p - from forums_messages fm, - acs_objects + to_char(fm.last_child_post, 'YYYY-MM-DD HH24:MI:SS') as last_child_post_ansi, + case when fm.last_child_post > (now() - 1) then 't' else 'f' end as new_p + from forums_messages_approved fm where fm.forum_id = :forum_id and fm.parent_id is null - and fm.message_id = acs_objects.object_id order by fm.posting_date desc Index: openacs-4/packages/forums/www/forum-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/forum-view.adp,v diff -u -r1.16 -r1.17 --- openacs-4/packages/forums/www/forum-view.adp 18 Nov 2002 18:01:08 -0000 1.16 +++ openacs-4/packages/forums/www/forum-view.adp 30 Nov 2002 17:35:39 -0000 1.17 @@ -70,7 +70,7 @@ @messages.user_name@ @messages.n_messages@ - @messages.last_modified_pretty@ + @messages.last_child_post_pretty@ 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 -r1.10 -r1.11 --- openacs-4/packages/forums/www/forum-view.tcl 18 Nov 2002 18:01:08 -0000 1.10 +++ openacs-4/packages/forums/www/forum-view.tcl 30 Nov 2002 17:35:39 -0000 1.11 @@ -66,8 +66,8 @@ set query messages_select_moderator } -db_multirow -extend { last_modified_pretty } messages $query {} { - set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] +db_multirow -extend { last_post_pretty } messages $query {} { + set last_post_pretty [lc_time_fmt $last_post_ansi "%x %X"] } set notification_chunk [notification::display::request_widget \ Index: openacs-4/packages/forums/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/www/index-oracle.xql 18 Nov 2002 18:01:08 -0000 1.3 +++ openacs-4/packages/forums/www/index-oracle.xql 30 Nov 2002 17:35:39 -0000 1.4 @@ -10,17 +10,15 @@ from forums_messages where forums_messages.forum_id = forums_forums_enabled.forum_id and 1 = tree.tree_level(forums_messages.tree_sortkey)) as n_threads, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when last_modified > (sysdate - 1) then 't' else 'f' end as new_p - from forums_forums_enabled, - acs_objects + to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi, + case when last_post > (sysdate - 1) then 't' else 'f' end as new_p + from forums_forums_enabled where forums_forums_enabled.package_id = :package_id and ( forums_forums_enabled.posting_policy = 'open' or forums_forums_enabled.posting_policy = 'moderated' - or 't' = acs_permission.permission_p(:user_id, forums_forums_enabled.forum_id, 'forum_read') + or 't' = acs_permission.permission_p(forums_forums_enabled.forum_id, :user_id, 'forum_read') ) - and forums_forums_enabled.forum_id = acs_objects.object_id order by forums_forums_enabled.name Index: openacs-4/packages/forums/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/index-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/forums/www/index-postgresql.xql 18 Nov 2002 18:01:08 -0000 1.3 +++ openacs-4/packages/forums/www/index-postgresql.xql 30 Nov 2002 17:35:39 -0000 1.4 @@ -10,17 +10,15 @@ from forums_messages where forums_messages.forum_id = forums_forums_enabled.forum_id and 1 = tree_level(forums_messages.tree_sortkey)) as n_threads, - to_char(acs_objects.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, - case when last_modified > (now() - 1) then 't' else 'f' end as new_p - from forums_forums_enabled, - acs_objects + to_char(last_post, 'YYYY-MM-DD HH24:MI:SS') as last_post_ansi, + case when last_post > (now() - 1) then 't' else 'f' end as new_p + from forums_forums_enabled where forums_forums_enabled.package_id = :package_id and ( forums_forums_enabled.posting_policy = 'open' or forums_forums_enabled.posting_policy = 'moderated' - or 't' = acs_permission__permission_p(:user_id, forums_forums_enabled.forum_id, 'forum_read') + or 't' = acs_permission__permission_p(forums_forums_enabled.forum_id, :user_id,'forum_read') ) - and forums_forums_enabled.forum_id = acs_objects.object_id order by forums_forums_enabled.name Index: openacs-4/packages/forums/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.adp,v diff -u -r1.15 -r1.16 --- openacs-4/packages/forums/www/index.adp 18 Nov 2002 18:01:08 -0000 1.15 +++ openacs-4/packages/forums/www/index.adp 30 Nov 2002 17:35:39 -0000 1.16 @@ -60,8 +60,8 @@ - @forums.last_modified_pretty@ - + @forums.last_post_pretty@ +   Index: openacs-4/packages/forums/www/message-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-chunk.adp,v diff -u -r1.13 -r1.14 --- openacs-4/packages/forums/www/message-chunk.adp 18 Nov 2002 18:01:08 -0000 1.13 +++ openacs-4/packages/forums/www/message-chunk.adp 30 Nov 2002 17:35:39 -0000 1.14 @@ -1,16 +1,17 @@ + - - - - @message.subject@ - - - @message.subject@ - - - + + + @message.subject@ + + + @message.subject@ + + + + @message.user_name@ @message.posting_date_pretty@ Index: openacs-4/packages/forums/www/message-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-chunk.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/forums/www/message-chunk.tcl 25 Oct 2002 13:00:02 -0000 1.5 +++ openacs-4/packages/forums/www/message-chunk.tcl 30 Nov 2002 17:35:39 -0000 1.6 @@ -24,5 +24,10 @@ if {![exists_and_not_null moderate_p]} { set moderate_p 0 } if {![exists_and_not_null forum_moderated_p]} {set forum_moderated_p 0} - - +# JCD: display subject only if changed from the root subject +if {![info exists root_subject]} { + set display_subject_p 1 +} else { + regsub {^(Response to |\s*Re:\s*)*} $message(subject) {} subject + set display_subject_p [expr ![string equal $subject $root_subject]] +} Index: openacs-4/packages/forums/www/message-email.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-email.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/forums/www/message-email.tcl 25 Oct 2002 13:00:02 -0000 1.5 +++ openacs-4/packages/forums/www/message-email.tcl 30 Nov 2002 17:35:39 -0000 1.6 @@ -65,6 +65,8 @@ element set_properties message subject -value "\[[_ forums.Fwd] $message(subject)\]" element set_properties message message_id -value $message_id +set message(subject) [ad_quotehtml $message(subject)] + set context [list [list "./forum-view?forum_id=$message(forum_id)" "$message(forum_name)"]] if {![empty_string_p $message(parent_id)]} { lappend context [list "./message-view?message_id=$message(root_message_id)" "[_ forums.Entire_Thread]"] 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 -r1.17 -r1.18 --- openacs-4/packages/forums/www/message-post.tcl 18 Nov 2002 18:01:08 -0000 1.17 +++ openacs-4/packages/forums/www/message-post.tcl 30 Nov 2002 17:35:39 -0000 1.18 @@ -9,6 +9,7 @@ } -query { {forum_id ""} {parent_id ""} + {html_p "f"} } -validate { forum_id_or_parent_id { if {[empty_string_p $forum_id] && [empty_string_p $parent_id]} { @@ -53,7 +54,7 @@ element create message html_p \ -label [_ forums.Format] \ -datatype text \ - -widget select \ + -widget radio \ -options [list [list [_ forums.text] f] [list [_ forums.html] t]] element create message parent_id \ @@ -100,7 +101,7 @@ set exported_vars [export_form_vars message_id forum_id parent_id subject content html_p confirm_p] set message(html_p) $html_p - set message(subject) $subject + set message(subject) [ad_quotehtml $subject] set message(content) $content set message(user_id) $user_id set message(user_name) [db_string select_name {}] @@ -177,7 +178,10 @@ forum::message::get -message_id $parent_id -array parent_message set forum_id $parent_message(forum_id) set subject "[_ forums.Re] $parent_message(subject)" + set parent_message(subject) [ad_quotehtml $parent_message(subject)] + # trim multiple leading Re: + regsub {^(\s*Re:\s*)*} $subject {Re: } subject } forum::security::require_post_forum -forum_id $forum_id Index: openacs-4/packages/forums/www/message-view-flat.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/Attic/message-view-flat.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/forums/www/message-view-flat.adp 25 Oct 2002 13:00:02 -0000 1.7 +++ openacs-4/packages/forums/www/message-view-flat.adp 30 Nov 2002 17:35:39 -0000 1.8 @@ -31,10 +31,10 @@ - + - + Index: openacs-4/packages/forums/www/message-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/forums/www/message-view.tcl 18 Nov 2002 18:01:08 -0000 1.13 +++ openacs-4/packages/forums/www/message-view.tcl 30 Nov 2002 17:35:39 -0000 1.14 @@ -27,6 +27,7 @@ # Load up the message information forum::message::get -message_id $message_id -array message +set message(subject) [ad_quotehtml $message(subject)] form create search -action search @@ -88,10 +89,12 @@ set order_by "tree_sortkey" } -db_multirow -extend { posting_date_pretty } responses $query {} { +db_multirow -extend { posting_date_pretty } responses $query {} { + set subject [ad_quotehtml $subject] set posting_date_pretty [lc_time_fmt $posting_date_ansi "%x %X"] } + # If this is a top-level thread, we allow subscriptions here if {[empty_string_p $message(parent_id)]} { set notification_chunk [notification::display::request_widget \ Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/www/not-allowed.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/www/not-allowed.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/www/admin/forum-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-edit.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/forums/www/admin/forum-edit.tcl 11 Nov 2002 19:23:17 -0000 1.10 +++ openacs-4/packages/forums/www/admin/forum-edit.tcl 30 Nov 2002 17:35:58 -0000 1.11 @@ -16,8 +16,7 @@ -label [_ forums.Forum_ID] -datatype integer -widget hidden element create forum name \ - -label [_ forums.Name] -datatype text -widget text -html {size 60} -validate { {expr ![empty_string_p [string trim $value]]} {Forum Name can not be blank} - } + -label [_ forums.Name] -datatype text -widget text -html {size 60} -validate { {expr ![empty_string_p [string trim $value]]} {Forum Name can not be blank} } element create forum charter \ -label [_ forums.Charter] -datatype text -widget textarea -html {cols 60 rows 10 wrap soft} -optional @@ -39,6 +38,9 @@ -charter $charter \ -presentation_type $presentation_type \ -posting_policy $posting_policy + + forum::posting_policy_set -posting_policy $posting_policy \ + -forum_id $forum_id # Users can create new threads? if {$new_threads_p} { Index: openacs-4/packages/forums/www/admin/forum-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/admin/forum-new.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/forums/www/admin/forum-new.tcl 25 Oct 2002 13:00:03 -0000 1.10 +++ openacs-4/packages/forums/www/admin/forum-new.tcl 30 Nov 2002 17:35:58 -0000 1.11 @@ -65,6 +65,9 @@ -package_id $package_id \ ] + forum::posting_policy_set -posting_policy $posting_policy \ + -forum_id $forum_id + # Users can create new threads? if {$new_threads_p} { forum::new_questions_allow -forum_id $forum_id Index: openacs-4/packages/forums/www/moderate/message-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-delete.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/forums/www/moderate/message-delete.tcl 18 Nov 2002 18:01:09 -0000 1.7 +++ openacs-4/packages/forums/www/moderate/message-delete.tcl 30 Nov 2002 17:36:14 -0000 1.8 @@ -19,6 +19,7 @@ # Select the stuff forum::message::get -message_id $message_id -array message +set message(subject) [ad_quotehtml $message(subject)] # Confirmed? if {$confirm_p} { Index: openacs-4/packages/forums/www/moderate/message-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/moderate/message-edit.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/forums/www/moderate/message-edit.tcl 25 Oct 2002 13:00:04 -0000 1.4 +++ openacs-4/packages/forums/www/moderate/message-edit.tcl 30 Nov 2002 17:36:14 -0000 1.5 @@ -22,13 +22,19 @@ -label [_ forums.Subject] \ -datatype text \ -widget text \ - -html {size 60} + -html {size 60} \ + -validate { {expr ![empty_string_p [string trim $value]]} {Please enter a subject} } element create message content \ -label [_ forums.Body] \ -datatype text \ -widget textarea \ - -html {rows 20 cols 60 wrap soft} + -html {rows 20 cols 60 wrap soft} \ + -validate { + empty {expr ![empty_string_p [string trim $value]]} {Please enter a message} + html { expr {( [string match [set l_html_p [ns_queryget html_p f]] "t"] && [empty_string_p [set v_message [ad_html_security_check $value]]] ) || [string match $l_html_p "f"] } } + {} + } element create message html_p \ -label [_ forums.Format]2 \ @@ -58,6 +64,7 @@ element set_properties message content -value $message(content) element set_properties message html_p -value $message(html_p) +set message(subject) [ad_quotehtml $message(subject)] ad_return_template Index: openacs-4/packages/general-comments/tcl/general-comments-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/tcl/general-comments-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 7 Nov 2002 08:32:48 -0000 1.6 +++ openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 30 Nov 2002 17:36:30 -0000 1.7 @@ -43,7 +43,7 @@ } else { set content_select [db_map content_select] ;# ", r.content" } - ns_log notice "content_select: $content_select" + # ns_log notice "content_select: $content_select" set html "" db_foreach get_comments " Index: openacs-4/packages/glossary/www/glossary-add-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/glossary/www/glossary-add-edit.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/glossary/www/glossary-add-edit.adp 5 Sep 2002 10:20:04 -0000 1.2 +++ openacs-4/packages/glossary/www/glossary-add-edit.adp 30 Nov 2002 17:36:40 -0000 1.3 @@ -33,7 +33,7 @@

    -Worflow Policy: +Workflow Policy: Not defined, Please set 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 -r1.9 -r1.10 --- openacs-4/packages/lars-blogger/lars-blogger.info 30 Sep 2002 21:20:49 -0000 1.9 +++ openacs-4/packages/lars-blogger/lars-blogger.info 30 Nov 2002 17:36:49 -0000 1.10 @@ -35,17 +35,21 @@ + + + + @@ -57,14 +61,11 @@ - + - - - @@ -73,18 +74,14 @@ - - - - - - + + @@ -99,6 +96,7 @@ + @@ -109,7 +107,7 @@ - + Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 14 Sep 2002 21:43:34 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 30 Nov 2002 17:36:59 -0000 1.3 @@ -11,12 +11,12 @@ 'Blog Entry', -- pretty_name 'Blog Entries', -- pretty_plural 'acs_object', -- supertype - 'PINDS_BLOG_ENTRIES', -- table_name - 'ENTRY_ID', -- id_column + 'pinds_blog_entries', -- table_name + 'entry_id', -- id_column null, -- package_name 'f', -- abstract_p null, -- type_extension_table - 'PINDS_BLOG_ENTRY__TITLE' -- name_method + 'pinds_blog_entry__title' -- name_method ); create table pinds_blog_entries ( Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-sc-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-sc-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/postgresql/upgrade/lars-blogger-sc-index.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.6.4d-0.7d.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.6.4d-0.7d.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.6.4d-0.7d.sql 24 Sep 2002 15:24:21 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.6.4d-0.7d.sql 30 Nov 2002 17:37:08 -0000 1.3 @@ -2,18 +2,19 @@ -- upgrade-0.6.4d-0.7d.sql -- -- @author Vinod Kurup (vinod@kurup.com) +-- @author Bart Teeuwisse (bart.teeuwisse@thecodemill.biz) -- -- @cvs-id $Id$ -- --- the only change is in the name of a proc that we send to --- asc_sc_impl_alias. So, we just delete the old alias --- and create a new one with the proper proc name (lars_blog...) +-- Change the name of a proc that we send to asc_sc_impl_alias. +-- Delete the old alias and create a new one with the proper proc name +-- (lars_blog...) select acs_sc_impl_alias__delete( - 'RssGenerationSubscriber', -- impl_contract_name + 'RssGenerationSubscriber', -- impl_contract_name 'pinds_blog_entries', -- impl_name - 'lastUpdated' -- impl_operation_name + 'lastUpdated' -- impl_operation_name ); @@ -25,3 +26,6 @@ 'TCL' -- impl_pl ); +-- Index the existing published blog entries + +\i lars-blogger-sc-index.sql Index: openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.7d-0.8.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.7d-0.8.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.7d-0.8.sql 14 Sep 2002 21:43:35 -0000 1.1 +++ openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.7d-0.8.sql 30 Nov 2002 17:37:08 -0000 1.2 @@ -2,10 +2,15 @@ -- upgrade-0.7d-0.8.sql -- -- @author Lars Pind +-- @author Bart Teeuwisse (bart.teeuwisse@thecodemill.biz) -- -- @cvs-id $Id$ -- -- added notifications \i ../notifications-init.sql + +-- Index the existing published blog entries + +\i lars-blogger-sc-index.sql Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/tcl/pinds-blog-entry-sc-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 30 Nov 2002 17:37:17 -0000 1.2 @@ -19,6 +19,8 @@ posted_date, to_char(posted_date, 'YYYY-MM-DD') as posted_date_string, to_char(posted_date, 'HH:MI') as posted_time_string, + -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 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 -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 30 Nov 2002 17:37:17 -0000 1.2 @@ -18,8 +18,11 @@ posted_date, to_char(posted_date, 'YYYY-MM-DD') as posted_date_string, to_char(posted_date, 'HH:MI') as posted_time_string, + 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 where package_id = :package_id and draft_p = 'f' @@ -31,8 +34,10 @@ - select coalesce (date_part('epoch',max(posted_date)),0) as last_update - from pinds_blog_entries + select coalesce (date_part('epoch', + max(posted_date::timestamp with time zone) + ),0) as last_update + from pinds_blog_entries where package_id = :package_id and draft_p = 'f' and deleted_p = 'f' 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 -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 14 Sep 2002 16:40:33 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 30 Nov 2002 17:37:17 -0000 1.3 @@ -43,6 +43,8 @@ set counter 0 db_foreach blog_rss_items { *SQL* } { + set TZoffset [format "%+03d:%02d" $tzoffset_hour $tzoffset_minute] + set entry_url "[ad_url]${package_url}archive/${entry_archive_url}#blog-entry-$entry_id" set content [ns_adp_parse -string $content] @@ -56,7 +58,7 @@ set description $content_as_text } - lappend items [list link $entry_url title $title description $description value $content timestamp "${posted_date_string}T${posted_time_string}-0600"] + lappend items [list link $entry_url title $title description $description value $content timestamp "${posted_date_string}T${posted_time_string}$TZoffset"] if { $counter == 0 } { set column_array(channel_lastBuildDate) $entry_date_pretty incr counter @@ -83,7 +85,9 @@ @author Lars Pind (lars@pinds.com) } { db_0or1row get_last_update { - select coalesce (date_part('epoch',max(posted_date)),0) as last_update + select coalesce (date_part('epoch', + max(posted_date::timestamp with time zone) + ),0) as last_update from pinds_blog_entries where package_id = :package_id and draft_p = 'f' @@ -92,5 +96,3 @@ return $last_update } - - Index: openacs-4/packages/lars-blogger/www/blog-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/blog-postgresql.xql 14 Sep 2002 18:05:12 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/blog-postgresql.xql 30 Nov 2002 17:37:27 -0000 1.4 @@ -20,7 +20,7 @@ select entry_id, to_char(entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, to_char(entry_date, 'YYYY/MM/DD/') as entry_archive_url, - entry_date, + to_char(entry_date, 'YYYY-MM-DD') as entry_date, title, content, draft_p, Index: openacs-4/packages/lars-blogger/www/blog.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/lars-blogger/www/blog.adp 16 Sep 2002 15:04:27 -0000 1.9 +++ openacs-4/packages/lars-blogger/www/blog.adp 30 Nov 2002 17:37:27 -0000 1.10 @@ -27,15 +27,16 @@

    - Visit @blog_name@ home - @blog_name@
    + Visit @blog_name@ home + @blog_name@
    - Visit the archive for @blog_name@ - Archive
    + Visit the archive for @blog_name@ + Archive
    - Add an entry to @blog_name@ + Add an entry to @blog_name@ Add entry

    \ No newline at end of file Index: openacs-4/packages/lars-blogger/www/entry-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-chunk.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/entry-chunk.adp 14 Sep 2002 21:43:37 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/entry-chunk.adp 30 Nov 2002 17:37:27 -0000 1.3 @@ -2,14 +2,15 @@

    @blog.title@

    - @blog.content@ -
    +@blog.content@ +

    +
    -
    +
    Posted by @blog.poster_first_names@ @blog.poster_last_name@ at @blog.posted_time_pretty@      @@ -40,7 +41,6 @@
    -


    Index: openacs-4/packages/lars-blogger/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/lars-blogger/www/index.adp 16 Sep 2002 15:04:27 -0000 1.9 +++ openacs-4/packages/lars-blogger/www/index.adp 30 Nov 2002 17:37:27 -0000 1.10 @@ -1,9 +1,7 @@ @page_title@ - - - + @context_bar@ Index: openacs-4/packages/lars-blogger/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/lars-blogger/www/index.tcl 16 Sep 2002 09:25:51 -0000 1.4 +++ openacs-4/packages/lars-blogger/www/index.tcl 30 Nov 2002 17:37:27 -0000 1.5 @@ -17,7 +17,7 @@ set page_title [lars_blog_name] if { ![empty_string_p [ad_parameter "rss_file_url"]] } { - set rss_file_url "[ad_url][ad_parameter "rss_file_url"]" + set rss_file_url "[ad_conn url]/[ad_parameter "rss_file_url"]" } set admin_p [ad_permission_p [ad_conn package_id] admin] @@ -58,4 +58,4 @@ set archive_date "" } -ad_return_template \ No newline at end of file +ad_return_template Index: openacs-4/packages/lars-blogger/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/admin/index.adp 16 Sep 2002 13:01:34 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/admin/index.adp 30 Nov 2002 17:37:43 -0000 1.4 @@ -2,7 +2,8 @@ @title@ Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/admin/subscribers.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/admin/subscribers.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/rss/index.vuh'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/news/news.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/news.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/news/news.info 31 May 2002 12:50:14 -0000 1.6 +++ openacs-4/packages/news/news.info 30 Nov 2002 17:38:21 -0000 1.7 @@ -7,19 +7,19 @@ f f - + oracle postgresql Stefan Deusch News application - 2001-03-07 - ArsDigita Corporation - News publication tool for corporate and website news in HTML and plain text format. + 2002-10-27 + OpenACS + News publication tool for corporate and website news in HTML and plain text format. Beta release. - + @@ -32,10 +32,12 @@ + + @@ -55,7 +57,6 @@ - @@ -103,19 +104,18 @@ - - - - - - + + + + + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news/sql/oracle/upgrade/upgrade-4.1.0b-4.6.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news/sql/postgresql/upgrade/upgrade-4.1.0b-4.6.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/news/tcl/news-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/news/tcl/news-procs-oracle.xql 25 Oct 2001 11:39:29 -0000 1.2 +++ openacs-4/packages/news/tcl/news-procs-oracle.xql 30 Nov 2002 17:39:09 -0000 1.3 @@ -44,6 +44,7 @@ select site_node.url(node_id) as url_stub from site_nodes where object_id=:package_id + and rownum = 1 Index: openacs-4/packages/news/tcl/news-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/news/tcl/news-procs-postgresql.xql 25 Oct 2001 11:39:29 -0000 1.2 +++ openacs-4/packages/news/tcl/news-procs-postgresql.xql 30 Nov 2002 17:39:09 -0000 1.3 @@ -39,6 +39,7 @@ select site_node__url(node_id) as url_stub from site_nodes where object_id=:package_id + limit 1 Index: openacs-4/packages/news/www/item-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/Attic/item-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/news/www/item-oracle.xql 16 Oct 2001 10:10:19 -0000 1.2 +++ openacs-4/packages/news/www/item-oracle.xql 30 Nov 2002 17:39:19 -0000 1.3 @@ -10,7 +10,7 @@ publish_title, html_p, publish_date, - '' || item_creator || '' as creator_link + '' || item_creator || '' as creator_link from news_items_live_or_submitted where item_id = :item_id Index: openacs-4/packages/news/www/item-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/Attic/item-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/news/www/item-postgresql.xql 15 Oct 2001 13:41:03 -0000 1.1 +++ openacs-4/packages/news/www/item-postgresql.xql 30 Nov 2002 17:39:19 -0000 1.2 @@ -11,7 +11,7 @@ html_p, publish_date, publish_body, - '' || item_creator || '' as creator_link + '' || item_creator || '' as creator_link from news_items_live_or_submitted where item_id = :item_id Index: openacs-4/packages/news/www/admin/revision-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/news/www/admin/revision-oracle.xql 16 Oct 2001 10:10:19 -0000 1.2 +++ openacs-4/packages/news/www/admin/revision-oracle.xql 30 Nov 2002 17:39:28 -0000 1.3 @@ -15,7 +15,7 @@ archive_date, creation_ip, creation_date, - '' || item_creator || '' as creator_link + '' || item_creator || '' as creator_link from news_item_revisions where item_id = :item_id and revision_id = :revision_id Index: openacs-4/packages/news/www/admin/revision-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/admin/revision-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/news/www/admin/revision-postgresql.xql 15 Oct 2001 13:41:03 -0000 1.1 +++ openacs-4/packages/news/www/admin/revision-postgresql.xql 30 Nov 2002 17:39:28 -0000 1.2 @@ -16,7 +16,7 @@ creation_ip, creation_date, publish_body, - '' || item_creator || '' as creator_link + '' || item_creator || '' as creator_link from news_item_revisions where item_id = :item_id and revision_id = :revision_id Index: openacs-4/packages/notes/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notes/www/index-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/notes/www/index-oracle.xql 3 May 2001 18:23:35 -0000 1.1 +++ openacs-4/packages/notes/www/index-oracle.xql 30 Nov 2002 17:39:52 -0000 1.2 @@ -1,5 +1,6 @@ +oracle8.1.6 Index: openacs-4/packages/notifications/notifications.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v diff -u -r1.11 -r1.12 --- openacs-4/packages/notifications/notifications.info 23 Sep 2002 23:32:23 -0000 1.11 +++ openacs-4/packages/notifications/notifications.info 30 Nov 2002 17:40:04 -0000 1.12 @@ -87,7 +87,7 @@ - + Index: openacs-4/packages/notifications/tcl/delivery-method-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/delivery-method-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 20 Sep 2002 21:19:00 -0000 1.5 +++ openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 30 Nov 2002 17:40:18 -0000 1.6 @@ -1,7 +1,13 @@ ad_library { Notification Delivery Methods + + Functions to support notification delivery methods. A delivery method is a means by which + a notification is sent to a user. "Email" is a common one, but others, like "sms", may exist. + The delivery method integration is done via acs-service-contract: any new delivery method must implement + this service contract. + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ @@ -13,6 +19,8 @@ ad_proc -private get_impl_key { {-delivery_method_id:required} } { + Return the service contract implementation key for notification delivery methods + } { return [db_string select_impl_key {}] } @@ -24,7 +32,9 @@ {-subject:required} {-content:required} } { - do the delivery of certain content to a particular user + do the delivery of certain content to a particular user using a particular delivery method. + This is just a wrapper proc that sets up the call to the service contract implementation for + a given delivery method. } { #need to check if its ok to notify this user in this way. For now just checks if they are an approved user. if { ![notification::security::can_notify_user -user_id $to_user_id -delivery_method_id $delivery_method_id] } { @@ -45,7 +55,11 @@ ad_proc -public scan_replies { {-delivery_method_id:required} } { - scan for replies + scan for replies. + + Every delivery method allows for replies. This is the wrapper proc that + indicates to the delivery method service contract implementation that it's time to + scan for replies. } { # Get the implementation key set impl_key [get_impl_key -delivery_method_id $delivery_method_id] Index: openacs-4/packages/notifications/tcl/interval-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/interval-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/notifications/tcl/interval-procs.tcl 24 May 2002 20:42:42 -0000 1.1 +++ openacs-4/packages/notifications/tcl/interval-procs.tcl 30 Nov 2002 17:40:18 -0000 1.2 @@ -1,7 +1,12 @@ ad_library { - Notification Intervals + Notification Intervals. + Procs to manage notification intervals. Intervals are the duration of time between notifications. + Possible intervals range from "instantaneous" to "weekly". + + CURRENTLY DEPRECATED AND USELESS. + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ Index: openacs-4/packages/notifications/tcl/notification-display-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-display-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/notifications/tcl/notification-display-procs.tcl 8 Nov 2002 10:04:22 -0000 1.5 +++ openacs-4/packages/notifications/tcl/notification-display-procs.tcl 30 Nov 2002 17:40:18 -0000 1.6 @@ -1,7 +1,10 @@ ad_library { - Notifications Display Procs + Notifications Display Procs. + Notifications is mostly a service package, but it does have some level of user interface. + These procs enable other packages to simply display information about notifications. + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ @@ -17,7 +20,7 @@ {-url:required} {-user_id ""} } { - Produce a widget for requesting notifications + Produce a widget for requesting notifications of a given type. } { if {[empty_string_p $user_id]} { set user_id [ad_conn user_id] @@ -47,6 +50,8 @@ {-user_id:required} {-pretty_name} } { + Returns the URL that allows one to subscribe to a notification type on a particular object. + } { set type_id [notification::type::get_type_id -short_name $type] set root_path [apm_package_url_from_key [notification::package_key]] @@ -59,6 +64,8 @@ {-request_id:required} {-url:required} } { + Returns the URL that allows one to unsubscribe from a particular request. + } { set root_path [apm_package_url_from_key [notification::package_key]] set unsubscribe_url "${root_path}request-delete?request_id=$request_id&return_url=[ns_urlencode $url]" 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 -r1.10 -r1.11 --- openacs-4/packages/notifications/tcl/notification-email-procs.tcl 8 Nov 2002 10:04:22 -0000 1.10 +++ openacs-4/packages/notifications/tcl/notification-email-procs.tcl 30 Nov 2002 17:40:18 -0000 1.11 @@ -22,11 +22,19 @@ } ad_proc -public address_domain {} { - return [get_parameter -name "EmailDomain"] + set domain [get_parameter -name "EmailDomain"] + if { [empty_string_p $domain] } { + # No domain set up, let's use the default from the system info + # This may not find anything, but at least it's worth a try + if { ![regexp {^(https?://)?(www\.)?([^/]*)} [ad_url] match ignore ignore domain] } { + ns_log Warning "notification::email::address_domain: Couldn't find an email domain for notifications." + } + } + return $domain } ad_proc -public manage_notifications_url {} { - return "[ad_url]/[apm_package_url_from_key [notification::package_key]]manage" + return "[ad_url][apm_package_url_from_key [notification::package_key]]manage" } ad_proc -public reply_address_prefix {} { Index: openacs-4/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 30 May 2002 06:26:09 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -2,6 +2,14 @@ Notifications + Core procs for managing notifications. Important concepts: +
      +
    • notification: a single message that needs to be sent to users. +
    • intervals: the duration of time between notifications. Ranges from "instantaneous" to "weekly". +
    • delivery method: the means by which a notification is delivered. "email" is the obvious one, but "sms" might be another. +
    • notification type: a category of notifications, like forum_notification for forum postings, or forum_statistics for regular updates on forum statistics (this latest one is for illustration purposes only and doesn't currently exist in the forums package). +
    + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ @@ -11,34 +19,53 @@ namespace eval notification { ad_proc -public package_key {} { + The package key + } { return "notifications" } ad_proc -public get_interval_id { {-name:required} } { + obtain the interval ID for an interval with the given name. + Interval names are unique, but are not the primary key. + } { return [db_string select_interval_id {} -default ""] } ad_proc -public get_delivery_method_id { {-name:required} } { + obtain the delivery method ID with the given name. + Delivery method names are unique, but are not the primary key. + } { return [db_string select_delivery_method_id {} -default ""] } ad_proc -public get_all_intervals {} { + return a list of all available intervals in a list of lists format, + with the following fields: name, interval_id, n_seconds. + } { return [db_list_of_lists select_all_intervals {}] } ad_proc -public get_intervals { {-type_id:required} } { + return a list of intervals that are associated with a given notification type + (not all intervals are available to all notification types). + The fields for each interval is: name, interval_id, n_seconds. + } { return [db_list_of_lists select_intervals {}] } ad_proc -public get_delivery_methods { {-type_id:required} } { + return a list of delivery methods associated with a given notification type + (not all delivery methods are available to all notification types). + The fields are: pretty_name, delivery_method_id + } { return [db_list_of_lists select_delivery_methods {}] } Index: openacs-4/packages/notifications/tcl/notification-reply-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-reply-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 29 Jun 2002 00:21:11 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -1,7 +1,10 @@ ad_library { - Notification Replies + Notification Replies. + When a user replies to a notification, this reply must be stored and handled appropriately. + These procs help to manage such handling. + @creation-date 2002-06-02 @author Ben Adida @cvs-id $Id$ @@ -19,7 +22,7 @@ {-content:required} {-reply_date ""} } { - create a new reply + store a new reply } { set extra_vars [ns_set create] oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {reply_id object_id type_id from_user subject content reply_date} @@ -33,7 +36,7 @@ {-reply_id:required} {-array:required} } { - Get the information for the reply + Get the information for the reply in a Tcl array } { # Select the info into the upvar'ed Tcl Array upvar $array row @@ -43,7 +46,7 @@ ad_proc -public delete { {-reply_id:required} } { - delete a reply + delete a reply, usually after it's been processed. } { db_exec_plsql delete_reply {} } Index: openacs-4/packages/notifications/tcl/notification-request-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-request-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notification-request-procs.tcl 4 Jun 2002 06:44:02 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notification-request-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -2,6 +2,10 @@ Notification Requests + When a user wishes to receive notifications of a certain type on a given object, + he issues a notification request. This request is recorded specifically for that user. + These procs help to manage such requests. + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ @@ -19,7 +23,7 @@ {-delivery_method_id:required} {-format "text"} } { - create a new request + create a new request for a given user, notification type, object, interval and delivery method. } { set request_id [get_request_id -type_id $type_id -object_id $object_id -user_id $user_id] @@ -40,15 +44,18 @@ {-object_id:required} {-user_id:required} } { - Checks if a particular notification request exists + Checks if a particular notification request exists, and if so return the request ID. + Note that the primary key on notification requests is notification_type, object, user. + Interval and delivery method are specific parameters, but do not impact the uniqueness: + a user can choose only one interval and delivery method for a given notification type and object. } { return [db_string select_request_id {} -default {}] } ad_proc -public delete { {-request_id:required} } { - delete a request + delete a request for notifications by request ID. } { # do the delete db_exec_plsql delete_request {} @@ -58,7 +65,7 @@ {-object_id:required} } { remove all requests for a particular object ID - usually because the object is getting deleted + usually because the object is getting deleted. } { # Do it db_exec_plsql delete_all_requests {} Index: openacs-4/packages/notifications/tcl/notification-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-type-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notification-type-procs.tcl 29 Jun 2002 00:21:11 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notification-type-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -2,6 +2,10 @@ Notification Types + Notifications are categorized by type. These procs manage the types. + Notification types are a service contract in order to handle notification replies appropriately + (handling a forum reply is not the same as handling a calendar reply). + @creation-date 2002-05-24 @author Ben Adida @cvs-id $Id$ @@ -13,6 +17,8 @@ ad_proc -public get_impl_key { {-type_id:required} } { + return the service contract implementation key for a given notification type. + } { return [db_string select_impl_key {}] } @@ -23,7 +29,7 @@ {-pretty_name:required} {-description ""} } { - create a new notification type + create a new notification type. Must provide a service contract implementation ID. } { set extra_vars [ns_set create] oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {type_id sc_impl_id short_name pretty_name description} @@ -36,12 +42,16 @@ ad_proc -public get_type_id { {-short_name:required} } { + return the notification type ID given a short name. Short names are unique but not primary keys. + } { return [db_string select_type_id {} -default {}] } ad_proc -public delete { {-short_name:required} } { + remove a notification type. This is very rare (and thus not even implemented right now). + } { set type_id [get_type_id -short_name $short_name] # do the delete @@ -52,6 +62,8 @@ {-short_name:required} {-column_array:required} } { + select information about the notification type into the given tcl Array + } { # Select the data into the upvar'ed array upvar $column_array row db_1row select_notification_type {} -column_array row @@ -61,6 +73,10 @@ {-type_id:required} {-interval_id:required} } { + Intervals must be enabled on a per notification type basis. For example, weekly notifications + may not be enabled for full forum posts, as that might be too much email (system choice) + This enables a given interval for a given notification type. + } { # Perform the insert if necessary db_dml insert_interval_map {} } @@ -69,6 +85,10 @@ {-type_id:required} {-interval_id:required} } { + Intervals must be enabled on a per notification type basis. For example, weekly notifications + may not be enabled for full forum posts, as that might be too much email (system choice) + This disables a given interval for a given notification type. + } { # perform the delete if necessary db_dml delete_interval_map {} } @@ -77,6 +97,10 @@ {-type_id:required} {-delivery_method_id:required} } { + Delivery methods must be enabled on a per notification type basis. For example, full forum posts + may not be enabled for SMS delivery, as that would be too long. + This enables a given delivery method for a given notification type. + } { # perform the insert if necessary db_dml insert_delivery_method_map {} } @@ -85,6 +109,10 @@ {-type_id:required} {-delivery_method_id:required} } { + Delivery methods must be enabled on a per notification type basis. For example, full forum posts + may not be enabled for SMS delivery, as that would be too long. + This disables a given delivery method for a given notification type. + } { # perform the delete if necessary db_dml delete_delivery_method_map {} } @@ -93,6 +121,9 @@ {-type_id:required} {-reply_id:required} } { + The wrapper procedure for processing a given reply. This calls down to the service contract + implementation to specifically handle a reply. + } { # Get the impl key set impl_key [get_impl_key -type_id $type_id] Index: openacs-4/packages/notifications/tcl/notifications-security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notifications-security-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/notifications-security-procs.tcl 20 Sep 2002 23:17:36 -0000 1.3 +++ openacs-4/packages/notifications/tcl/notifications-security-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -1,6 +1,8 @@ ad_library { Notifications Security Library + + Manage permissions for notifications. @creation-date 2002-05-27 @author Ben Adida @@ -14,6 +16,7 @@ {-user_id:required} {-delivery_method_id ""} } { + Can a user be notified for a given delivery method. This proc can be expanded to deal with cases when we don't want to send a notification. For instance we could check email_bouncing_p or if a user is on vacation. Right now it just makes sure its an @@ -25,7 +28,10 @@ ad_proc -public can_notify_object_p { {-user_id ""} {-object_id:required} - } { + } { + This checks if a user can request notification on a given object. + Probably should just check read permission. RIGHT NOW HACKED to 1. + } { # hack return 1 } @@ -34,12 +40,16 @@ {-user_id ""} {-object_id:required} } { + Require the ability to notify on an object. + } { } ad_proc -public can_admin_request_p { {-user_id ""} {-request_id:required} } { + Checks if a user can manage a given notification request. RIGHT NOW HACKED to 1. + } { # hack return 1 } @@ -48,6 +58,8 @@ {-user_id ""} {-request_id:required} } { + Require the ability to admin a request + } { } Index: openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl 29 Jun 2002 00:21:11 -0000 1.3 +++ openacs-4/packages/notifications/tcl/reply-sweep-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 @@ -1,7 +1,9 @@ ad_library { - Notification Reply Sweeps + Notification Reply Sweeps. + Procs that make sure that replies are being processed. + @creation-date 2002-06-02 @author Ben Adida @cvs-id $Id$ @@ -11,7 +13,7 @@ namespace eval notification::reply::sweep { ad_proc -public scan_all_replies {} { - # Go through all the delivery methods and do the right thing + Go through all the delivery methods and scan replies for that delivery method. } { ns_log Notice "NOTIF- scan_all_replies starting" @@ -26,7 +28,7 @@ } ad_proc -public process_all_replies {} { - # Go through the replies in the DB and dispatch correctly + Go through the replies in the DB and dispatch correctly to the right processor. } { ns_log Notice "NOTIF- process_all_replies starting" Index: openacs-4/packages/notifications/tcl/sweep-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 8 Nov 2002 10:04:22 -0000 1.10 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 30 Nov 2002 17:40:18 -0000 1.11 @@ -11,12 +11,13 @@ namespace eval notification::sweep { ad_proc -public schedule_all {} { - This schedules all the notification procs + This schedules all the notification procs. + DEPRECATED. } { } ad_proc -public cleanup_notifications {} { - Clean up the notifications that are done + Clean up the notifications that have been sent out. } { # Get the list of the ones to kill set notification_id_list [db_list select_notification_ids {}] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/www/index.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/notifications/www/manage-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/www/Attic/manage-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/notifications/www/manage-postgresql.xql 20 Sep 2002 21:19:01 -0000 1.1 +++ openacs-4/packages/notifications/www/manage-postgresql.xql 30 Nov 2002 17:40:36 -0000 1.2 @@ -9,28 +9,8 @@ (select pretty_name from notification_types where notification_types.type_id = - notification_requests.type_id) as type, - case when (select short_name - from notification_types - where notification_types.type_id = - notification_requests.type_id) = 'forums_forum_notif' - then - (select name - from forums_forums - where forum_id = - notification_requests.object_id) - when (select short_name - from notification_types - where notification_types.type_id = - notification_requests.type_id) = 'forums_message_notif' - then - (select subject - from forums_messages - where message_id = - notification_requests.object_id) - else - acs_object__name(notification_requests.object_id) - end as object_name, + notification_requests.type_id) as type, + acs_object__name(notification_requests.object_id) as object_name, (select name from notification_intervals where notification_intervals.interval_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 -r1.4 -r1.5 --- openacs-4/packages/openfts-driver/openfts-driver.info 23 Sep 2002 23:32:23 -0000 1.4 +++ openacs-4/packages/openfts-driver/openfts-driver.info 30 Nov 2002 17:40:53 -0000 1.5 @@ -37,7 +37,7 @@ - +
    Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/openfts-driver/sql/postgresql/load.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/openfts-driver/tcl/openfts-driver-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/tcl/openfts-driver-init.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/openfts-driver/tcl/openfts-driver-init.tcl 1 Sep 2001 20:33:52 -0000 1.1 +++ openacs-4/packages/openfts-driver/tcl/openfts-driver-init.tcl 30 Nov 2002 17:41:28 -0000 1.2 @@ -9,8 +9,8 @@ if { [llength $files] == 0 } { error "Unable to locate $openfts_tcl_src_path." } - + ns_log Notice "sourcing files from ${openfts_tcl_src_path}" foreach file [lsort $files] { source $file } -} \ No newline at end of file +} Index: openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl 13 Sep 2002 11:10:34 -0000 1.4 +++ openacs-4/packages/openfts-driver/tcl/openfts-driver-procs.tcl 30 Nov 2002 17:41:28 -0000 1.5 @@ -23,17 +23,16 @@ array set self [Search::OpenFTS::new ofts] if ![array size self] { + Search::OpenFTS::DESTROY error "Search failed." + return } set opt(rejected) [list] - if { ![info exists opt(txttid)] || [string equal $opt(txttid) ""] } { - set opt(txttid) $self(TXTTID) - } + foreach {out condition order} [Search::OpenFTS::get_sql self $query opt] break - foreach {out tables condition order} [Search::OpenFTS::get_sql self $query opt] break - + set result(stopwords) $opt(rejected) if { ![string length $condition] } { return [array get result] } @@ -42,17 +41,12 @@ } else { set order "" } - if { ![info exists tables] } { - set tables "" - } if { [info exists out] && [string length $out] > 0 } { set out ",\n $out" } else { set out "" } - set txttbl [split $opt(txttid) .] - set date_range_condition "" if { $df != "" } { append date_range_condition "'$df' <= last_modified and" @@ -64,20 +58,20 @@ set permission_check_enabled_p [ad_parameter -package_id [apm_package_id_from_key openfts-driver] permission_check_enabled_p] set permission_check_condition "" if { $permission_check_enabled_p } { - append permission_check_condition "and acs_permission__permission_p( $opt(txttid), $user_id, 'read') = 't'" + append permission_check_condition "and acs_permission__permission_p( $self(TXTID), $user_id, 'read') = 't'" } set sql_count " select count(*) - from [lindex $txttbl 0]$tables + from $self(TABLE) where $date_range_condition $condition $permission_check_condition" set sql_sort " - select $opt(txttid) as object_id$out - from [lindex $txttbl 0]$tables + select $self(TXTID) as object_id$out + from $self(TABLE) where $date_range_condition $condition @@ -86,11 +80,12 @@ limit $limit offset $offset" - set result(stopwords) $opt(rejected) set result(count) [db_exec_plsql sql_count $sql_count] if { $result(count) > 0} { db_foreach sql_sort $sql_sort {lappend result(ids) $object_id} } + Search::OpenFTS::DESTROY + return [array get result] } @@ -115,7 +110,8 @@ array set idx [Search::OpenFTS::Index::new] Search::OpenFTS::Index::index idx $tid $txt $title - + Search::OpenFTS::DESTROY + return } @@ -130,6 +126,7 @@ array set idx [Search::OpenFTS::Index::new] Search::OpenFTS::Index::delete idx $tid + Search::OpenFTS::DESTROY return } @@ -147,6 +144,7 @@ openfts_driver__unindex $tid openfts_driver__index $tid $txt $title $keywords + Search::OpenFTS::DESTROY return } @@ -175,8 +173,10 @@ array set fts [Search::OpenFTS::new ofts] - return [Search::OpenFTS::get_headline fts opts] + set summary [Search::OpenFTS::get_headline fts opts] + Search::OpenFTS::DESTROY + return $summary } Index: openacs-4/packages/openfts-driver/www/admin/destroy.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/www/admin/destroy.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/openfts-driver/www/admin/destroy.tcl 5 Sep 2002 11:21:38 -0000 1.3 +++ openacs-4/packages/openfts-driver/www/admin/destroy.tcl 30 Nov 2002 17:41:39 -0000 1.4 @@ -1,37 +1,17 @@ -catch { - set ngroups [db_exec_plsql get_ngroups "select mod from fts_conf where did = -2"] - set table_name [lindex [split [db_exec_plsql get_txttid "select mod from fts_conf where did = -1"] .] 0] -} + +set PREFIX "" +array set idx [Search::OpenFTS::Index::new $PREFIX] +Search::OpenFTS::Index::drop idx catch { - db_dml drop_fts_conf "drop table fts_conf;" + db_dml drop_table "drop table $idx(TABLE)" } - - catch { - db_dml drop_trigger "drop trigger ${table_name}_utrg;" + db_dml drop_function "drop function $idx(TABLE)_utrg ()" } - catch { - db_dml drop_function "drop function ${table_name}_utrg ();" -} - -catch { - db_dml drop_table "drop table ${table_name};" -} - -catch { - for { set __i 1 } { $__i <= $ngroups } { incr __i } { - db_dml drop_index "drop table index${__i};" - } -} - -catch { db_dml drop_fts_unknown_lexem "drop table fts_unknown_lexem;" } -catch { - db_dml drop_s_fts_unknown_lexem "drop sequence s_fts_unknown_lexem;" -} -ad_returnredirect "./" \ No newline at end of file +ad_returnredirect "./" Index: openacs-4/packages/openfts-driver/www/admin/initialize-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/www/admin/initialize-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/openfts-driver/www/admin/initialize-2.tcl 5 Sep 2002 11:21:38 -0000 1.3 +++ openacs-4/packages/openfts-driver/www/admin/initialize-2.tcl 30 Nov 2002 17:41:39 -0000 1.4 @@ -8,41 +8,44 @@ table_name table_id dict - parser numbergroup ignore_headline ignore_id_index map use_index_table - use_index_array } -array set opt " -txttid ${table_name}.${table_id} -numbergroup $numbergroup -parser $parser -use_index_array $use_index_array -use_index_table $use_index_table -dict [list $dict] -map [list $map] -ignore_id_index [list $ignore_id_index] -ignore_headline [list $ignore_headline] -" +set DICT_UNKNOWN_LEXEM_TABLE "fts_unknown_lexem" +if [catch { + db_dml create_table "create table $table_name ( ${table_id} int not null primary key, path varchar unique, fts_index txtidx, last_modified timestamp );" +} err] { + error "$err" + return +} +set dat " + txttid ${table_name}.${table_id} + use_index_table $use_index_table + txtidx_field fts_index + numbergroup $numbergroup + ignore_id_index [list $ignore_id_index] + ignore_headline [list $ignore_headline] + map [list $map] + dict [list $dict]" +ns_log Notice "dat = $dat" +array set opt $dat + + + array set idx [Search::OpenFTS::Index::init opt] if {[array size idx] == 0} { error "QQQ: Init failed" - exit + return } -db_dml create_table "create table $table_name ( \ - $table_id int not null primary key, \ - $use_index_array int\[\], \ - last_modified timestamp default now() not null);" - db_dml create_function "create function ${table_name}_utrg () returns opaque as ' \ begin \ new.last_modified := now(); \ @@ -53,7 +56,7 @@ for each row execute procedure ${table_name}_utrg ();" - Search::OpenFTS::Index::create_index idx +Search::OpenFTS::DESTROY ad_returnredirect "./" Index: openacs-4/packages/openfts-driver/www/admin/initialize.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/www/admin/initialize.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/openfts-driver/www/admin/initialize.tcl 5 Sep 2002 11:21:38 -0000 1.2 +++ openacs-4/packages/openfts-driver/www/admin/initialize.tcl 30 Nov 2002 17:41:39 -0000 1.3 @@ -24,17 +24,12 @@ template::element create openfts_init_form dict \ -html "size 40" \ -label "Dictionaries" \ - -value "Search::OpenFTS::Dict::PorterEng Search::OpenFTS::Dict::UnknownDict" + -value "Search::OpenFTS::Dict::PorterEng {mod Search::OpenFTS::Dict::UnknownDict param {table fts_unknown_lexem}}" -template::element create openfts_init_form parser \ - -html "size 40" \ - -label "Parser" \ - -value Search::OpenFTS::Parser - template::element create openfts_init_form numbergroup \ -html "size 40" \ -label "Number of index tables" \ - -value 13 + -value 10 template::element create openfts_init_form ignore_headline \ -html "size 40" \ @@ -56,9 +51,9 @@ -label "use_index_table" \ -value 1 -template::element create openfts_init_form use_index_array \ +template::element create openfts_init_form txtidx_field \ -html "size 40" \ - -label "use_index_array" \ + -label "txtidx_field" \ -value fts_index template::element create openfts_init_form submit \ Index: openacs-4/packages/openfts-driver/www/doc/INSTALL =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/openfts-driver/www/doc/INSTALL,v diff -u -r1.3 -r1.4 --- openacs-4/packages/openfts-driver/www/doc/INSTALL 15 Sep 2001 21:31:50 -0000 1.3 +++ openacs-4/packages/openfts-driver/www/doc/INSTALL 30 Nov 2002 17:41:50 -0000 1.4 @@ -1,13 +1,11 @@ -Last updated: September 12, 2001 +Last updated: Oct 11, 2002 Maintainer: Neophytos Demetriou (k2pts@cytanet.com.cy) - Make sure you have installed all headers (for example, spi.h) using "gmake install-all-headers" during the PostgreSQL installation. - If you have not installed intarray, please do so now. intarray - is under the contrib directory of the PostgreSQL source code. -- Download Search-OpenFTS-tcl-0.2.tar.gz from http://openfts.sourceforge.net/ - and save it to /tmp/Search-OpenFTS-tcl-0.2.tar.gz +- Download Search-OpenFTS-tcl-0.3.1.tar.gz from http://openfts.sourceforge.net/ + and save it to /tmp/Search-OpenFTS-tcl-0.3.1.tar.gz - Log in as the root user: @@ -16,33 +14,13 @@ - Untar the archive file: cd /usr/local/src - tar -xzvf /tmp/Search-OpenFTS-tcl-0.2.tar.gz + tar -xzvf /tmp/Search-OpenFTS-tcl-0.3.1.tar.gz - Install the OpenFTS AOLServer module: - chown -R nsadmin.web Search-OpenFTS-tcl-0.2/ - cd Search-OpenFTS-tcl-0.2/ - ./configure --with-aolserver-src=AOLSERVER_SRC_DIR - make - cd aolserver - make - cp nsfts.so AOLSERVER_BIN_DIR - -- Edit nsd.tcl file and add entry for nsfts module: + Follow the directions in Search-OpenFTS-tcl-0.3.1/AOLSERVER.INSTALL - ns_param nssock ${bindir}/nssock.so - ns_param nslog ${bindir}/nslog.so - ... - ns_param nsfts ${bindir}/nsfts.so - - - -- Load intarray and func_pgsql - - Edit load.sql under the openfts-driver/sql/postgresql directory. - psql -f load.sql your-database-name - - Install and mount the openfts-driver package - Restart AOLserver 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 -r1.3 -r1.4 --- openacs-4/packages/payment-gateway/payment-gateway.info 19 Sep 2002 20:02:42 -0000 1.3 +++ openacs-4/packages/payment-gateway/payment-gateway.info 30 Nov 2002 17:42:00 -0000 1.4 @@ -5,7 +5,7 @@ Payment Gateway Payment Gateways f - f + t