Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/ChangeLog'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/bboard.info'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-packages.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/bboard-views.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/index_sync.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0-4.0.1.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.1-4.0.2.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b3-4.0.2b4.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b5-4.0.2b6.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0.2b6-4.0.2b7.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/oracle/upgrade-4.0b-4.0.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.9 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-packages.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/sql/postgresql/bboard-views.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-init.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.13 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.10 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/tcl/bboard-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/attachment-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/attachment.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-delete.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-edit-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-edit.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-new-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-new.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-new.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-subscribe.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/category-unsubscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-by-category.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-delete.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-edit-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-edit.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-move-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-move.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-move.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-move.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-new-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-new.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-subscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-unsubscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum-view.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/forum.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/index-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/index.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/index.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-approve.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-approve.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-attach-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-attach.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-delete.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-edit-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-edit-3.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-edit.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-list.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-mail.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-move.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new-3-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new-3.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-new.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-preview.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-reject.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-subscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-threaded-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.6 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-threaded.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message-unsubscribe.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/message.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/messages-by-user.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/search-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/search-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/search.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.5 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/search.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/simple-message-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/simple-message-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/simple-message.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/simple-message.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/subscriptions.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/test.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/design.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/index.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/requirements.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/configuration.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/design.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/index.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/installation.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/intro.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/notes.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/requirements.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/support.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard/www/doc/xml/top.xml'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/bboard-portlets.info'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/sql/oracle/bboard-portlets-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/sql/postgresql/bboard-portlets-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/tcl/bboard-portlets-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/contrib/obsolete-packages/bboard-portlets/www/summarize.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/postgresql/wf-ticket-tracker-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/postgresql/wf-ticket-tracker-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/postgresql/wf-ticket-tracker-create.sql 17 May 2003 12:45:36 -0000 1.4 +++ openacs-4/contrib/obsolete-packages/wf-ticket-tracker/sql/postgresql/wf-ticket-tracker-create.sql 28 Aug 2003 09:41:58 -0000 1.5 @@ -46,8 +46,8 @@ new__creation_user alias for $7; new__creation_ip alias for $8; v_creation_date timestamptz; - v_ticket_id number; - v_case_id number; + v_ticket_id integer; + v_case_id integer; begin if (new__creation_date is null) or (new__creation_date = 0) then v_creation_date = now(); 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 -r1.7 -r1.8 --- openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 17 May 2003 09:36:01 -0000 1.7 +++ openacs-4/packages/acs-admin/tcl/apm-admin-procs.tcl 28 Aug 2003 09:41:37 -0000 1.8 @@ -12,24 +12,24 @@ Build a dynamic section dimensional slider. } { set sections [db_list apm_parameter_sections { - select distinct(section_name) - from apm_parameters - where package_key = :package_key + select distinct(section_name) + from apm_parameters + where package_key = :package_key }] if { [llength $sections] > 1 } { - set i 0 - lappend section_list [list $package_key $package_key [list "where" "section_name is null"]] - foreach section $sections { - incr i - if { ![empty_string_p $section] } { - lappend section_list [list "section_$i" $section [list "where" "section_name = '[db_quote $section]'"]] - } - } - lappend section_list [list all "All" [list] ] - return [list [list section_name "Section:" $package_key $section_list]] + set i 0 + lappend section_list [list $package_key $package_key [list "where" "section_name is null"]] + foreach section $sections { + incr i + if { ![empty_string_p $section] } { + lappend section_list [list "section_$i" $section [list "where" "section_name = '[db_quote $section]'"]] + } + } + lappend section_list [list all "All" [list] ] + return [list [list section_name "Section:" $package_key $section_list]] } else { - return "" + return "" } } @@ -46,17 +46,17 @@ set apm_url "/acs-admin/apm" if { [llength $args] == 0 } { - set title $apm_title + set title $apm_title set context_bar [ad_context_bar $title] } else { - set title [lindex $args end] + set title [lindex $args end] set context [concat [list [list $apm_url $apm_title]] $args] set context_bar [eval ad_context_bar $context] } set header [ad_header $title ""] append body "$header\n" if {![empty_string_p $form]} { - append body "
" + append body "" } return "$body\n @@ -70,132 +70,160 @@ set out "" set line_length 0 foreach element $cmd { - if { $line_length + [string length $element] > 72 } { - append out "\\\n " - set line_length 4 - } - append out "$element " - incr line_length [expr { [string length $element] + 1 }] + if { $line_length + [string length $element] > 72 } { + append out "\\\n " + set line_length 4 + } + append out "$element " + incr line_length [expr { [string length $element] + 1 }] } append out "\n" } -ad_proc -private apm_package_selection_widget {pkg_info_list {to_install ""} {to_enable ""}} { +ad_proc -private apm_package_selection_widget { + -install_enable:boolean + pkg_info_list + {to_install ""} + {to_enable ""} +} { Provides a widget for selecting packages. Displays dependency information if available. + + @param intall_enable Set this flag if you want separate install and enable checkboxes to be displayed. If you don't set it, + only the enable checkbox will be displayed, and the resulting page is expected to assume that enable also means install. } { if {[empty_string_p $pkg_info_list]} { - return "" + return "" } set checkbox_count 0 set counter 0 set band_colors { white "#ececec" } set widget "
- +[ad_decode $install_enable_p 1 "" ""] " foreach pkg_info $pkg_info_list { - - incr counter - set package_key [pkg_info_key $pkg_info] - set spec_file [pkg_info_spec $pkg_info] - array set package [apm_read_package_info_file $spec_file] - set version_name $package(name) - ns_log Debug "Selection widget: $package_key, Dependency: [pkg_info_dependency_p $pkg_info]" + + incr counter + set package_key [pkg_info_key $pkg_info] + set spec_file [pkg_info_spec $pkg_info] + array set package [apm_read_package_info_file $spec_file] + set version_name $package(name) + ns_log Debug "Selection widget: $package_key, Dependency: [pkg_info_dependency_p $pkg_info]" - append widget " " - if { ![string compare [pkg_info_dependency_p $pkg_info] "t"]} { - # Dependency passed. - if { ([lsearch -exact $to_install $package_key] != -1) } { - append widget " " - } else { - append widget " " - } - if { [lsearch -exact $to_enable $package_key] != -1 } { - append widget " - - - - - " - } elseif { ![string compare [pkg_info_dependency_p $pkg_info] "f"] } { - #Dependency failed. - append widget " " - append widget " - - - + append widget " " + if { ![string compare [pkg_info_dependency_p $pkg_info] "t"]} { + # Dependency passed. + + if { $install_enable_p } { + if { ([lsearch -exact $to_install $package_key] != -1) } { + append widget " " + } else { + append widget " " + } + } + if { [lsearch -exact $to_enable $package_key] != -1 } { + append widget " + + + + + " + } elseif { ![string compare [pkg_info_dependency_p $pkg_info] "f"] } { + #Dependency failed. + if { $install_enable_p } { + append widget " " + } + append widget " + + + - - " - } else { - # No dependency information. - # See if the install is already installed with a higher version number. - if {[apm_package_registered_p $package_key]} { - set higher_version_p [apm_higher_version_installed_p $package_key $version_name] - } else { - set higher_version_p 2 - } - if {$higher_version_p == 2 } { - set comment "New install." - } elseif {$higher_version_p == 1 } { - set comment "Upgrade." - } elseif {$higher_version_p == 0} { - set comment "Package version already installed." - } else { - set comment "Installing older version of package." - } - - append widget " " + " + foreach comment [pkg_info_comment $pkg_info] { + append widget "$comment
" + } + append widget " + + + " + } else { + # No dependency information. + # See if the install is already installed with a higher version number. + if {[apm_package_registered_p $package_key]} { + set higher_version_p [apm_higher_version_installed_p $package_key $version_name] + } else { + set higher_version_p 2 + } + if {$higher_version_p == 2 } { + set comment "New install." + } elseif {$higher_version_p == 1 } { + set comment "Upgrade." + } elseif {$higher_version_p == 0} { + set comment "Package version already installed." + } else { + set comment "Installing older version of package." + } + + append widget " " - if { ([lsearch -exact $to_install $package_key] != -1) } { + if { ([lsearch -exact $to_install $package_key] != -1) } { set install_checked "checked" } else { set install_checked "" } - if { ([lsearch -exact $to_enable $package_key] != -1) } { + if { ([lsearch -exact $to_enable $package_key] != -1) } { set enable_checked "checked" } else { set enable_checked "" } - append widget " - - + if { $install_enable_p } { + append widget " + " + } else { + append widget " + " + } + + append widget " + - - " - } - incr checkbox_count 2 + + " + } + incr checkbox_count 2 } append widget "
InstallEnablePackageDirectoryComment
InstallEnablePackageDirectoryComment
$package(package-name) $package(name)/packages/$package(package.key)/Dependencies satisfied.
$package(package-name) $package(name)/packages/$package(package.key)/
$package(package-name) $package(name)/packages/$package(package.key)/Dependencies satisfied.
$package(package-name) $package(name)/packages/$package(package.key)/ - " - foreach comment [pkg_info_comment $pkg_info] { - append widget "$comment
" - } - append widget " -
$package(package-name) $package(name)$package(package-name) $package(name) /packages/$package(package.key)/$comment
$comment
" return $widget Index: openacs-4/packages/acs-admin/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/Attic/index-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/index-oracle.xql 27 Apr 2001 04:09:35 -0000 1.1 +++ openacs-4/packages/acs-admin/www/index-oracle.xql 28 Aug 2003 09:41:37 -0000 1.2 @@ -5,7 +5,7 @@ - select site_node.url(node_id) || 'admin/' as subsite_admin_url, instance_name + select site_node.url(node_id) || 'admin/' as admin_url, instance_name from site_nodes s, apm_packages p where s.object_id = p.package_id and p.package_key = 'acs-subsite' Index: openacs-4/packages/acs-admin/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/Attic/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-admin/www/index-postgresql.xql 27 Apr 2001 04:09:35 -0000 1.1 +++ openacs-4/packages/acs-admin/www/index-postgresql.xql 28 Aug 2003 09:41:37 -0000 1.2 @@ -5,7 +5,7 @@ - select site_node__url(node_id) || 'admin/' as subsite_admin_url, instance_name + select site_node__url(node_id) || 'admin/' as admin_url, instance_name from site_nodes s, apm_packages p where s.object_id = p.package_id and p.package_key = 'acs-subsite' Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-admin/www/index.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-admin/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/index.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/index.tcl 17 May 2003 09:36:15 -0000 1.6 +++ openacs-4/packages/acs-admin/www/index.tcl 28 Aug 2003 09:41:37 -0000 1.7 @@ -5,52 +5,24 @@ @cvs-id $Id$ } -set title "[ad_conn instance_name] for [ad_system_name]" +set page_title "[ad_conn instance_name] for [ad_system_name]" -set page " -[ad_admin_header $title] -

$title

-[ad_context_bar] -
- -[ad_conn instance_name] is used to administer the site-wide services of the ArsDigita Community System. - - -

-" - -db_foreach subsite_admin_urls { - select site_node.url(node_id) || 'admin/' as subsite_admin_url, +db_multirow subsites subsite_admin_urls { + select site_node.url(node_id) || 'admin/' as admin_url, instance_name from site_nodes s, apm_packages p where s.object_id = p.package_id and p.package_key = 'acs-subsite' -} { - lappend subsite_admin_list "$instance_name Administration" -} if_no_rows { - set subsite_admin_widget "No subsites are available on this system." } -if {! [exists_and_not_null subsite_admin_widget] } { - set subsite_admin_widget " -To administer a particular subsite, please select from the list below. -

    " - foreach url $subsite_admin_list { - append subsite_admin_widget "\n
  • $url
  • " +db_multirow -extend { admin_url } packages installed_packages { + select package_key, + pretty_name as pretty_name + from apm_package_types +} { + if { [apm_package_installed_p $package_key] && [file exists "[acs_package_root_dir $package_key]/www/sitewide-admin/"] } { + set admin_url "package/$package_key/" + } else { + continue } - append subsite_admin_widget " -

\n" -} - -append page " -$subsite_admin_widget -

-[ad_admin_footer] -" - -ns_return 200 text/html $page +} Index: openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 17 May 2003 09:36:29 -0000 1.7 +++ openacs-4/packages/acs-admin/www/apm/packages-install-2.tcl 28 Aug 2003 09:41:37 -0000 1.8 @@ -14,6 +14,9 @@ # Install and enable are sets of keys; need to turn them back into spec files. set spec_files [ad_get_client_property apm spec_files] +# LARS HACK: I got rid of the separate install/enable checkboxes +set install $enable + # Clear out previous client properties. ad_set_client_property -clob t apm pkg_install_list "" ad_set_client_property -clob t apm pkg_enable_list "" Index: openacs-4/packages/acs-admin/www/apm/packages-install.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/packages-install.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/acs-admin/www/apm/packages-install.tcl 17 May 2003 09:36:29 -0000 1.15 +++ openacs-4/packages/acs-admin/www/apm/packages-install.tcl 28 Aug 2003 09:41:37 -0000 1.16 @@ -11,7 +11,7 @@ } ad_return_top_of_page "[apm_header "Package Installation"] -

Please wait while the installer loads ........

+

Please wait while the installer searches your system for packages to install ...

" @@ -74,31 +74,18 @@ ns_write "

Select Packages to Install

- Please select the set of packages you'd like to install - and enable. +

Please select the set of packages you'd like to install.

" -
    -
  • To install a package is to load its data model. -
  • To enable a package is to make it available to users. -
- - If you think you might want to use a package later (but not right away), - install it but don't enable it.

" - - if { [llength $not_compatible_list] > 0 } { - ns_write "

If there's a package that you can't find in the list below, it may be because it's incompatible with your system.

" - } - ns_write " + " + } + ns_write [ad_footer] + ad_script_abort + } else { + init $statement_name $name $query + } } else { set opts(row_ids) $row_ids set opts(context_ids) [cache get $cache_key:context_ids] @@ -92,21 +143,55 @@ set opts(group_count) [get_group $name $opts(page_count)] } -ad_proc -private template::paginator::init { statement_name name query } { +ad_proc -private template::paginator::init { statement_name name query {print_p 0} } { Initialize a paginated query. Only called by create. } { get_reference # query for an ordered list of all row identifiers to cache # perform the query in the calling scope so bind variables have effect - upvar 3 __paginator_ids ids + upvar 2 __paginator_ids ids + set ids [list] if { [info exists properties(contextual)] } { # query contains two columns, one for ID and one for context cue - uplevel 3 "set __paginator_ids \[db_list_of_lists $statement_name \"$query\"\]" + uplevel 2 " + set full_statement_name \[db_qd_get_fullname $statement_name\] + + # Can't use db_foreach here, since we need to use the ns_set directly. + db_with_handle db { + set selection \[db_exec select \$db \$full_statement_name {$query}\] + + set __paginator_ids \[list\] + set total_so_far 1 + + while { \[db_getrow \$db \$selection\] } { + set this_result \[list\] + for { set i 0 } { \$i < \[ns_set size \$selection\] } { incr i } { + lappend this_result \[ns_set value \$selection \$i\] + } + if { $print_p } { + if { \$total_so_far % 250 == 0 } { + ns_write \"…\$total_so_far \" + } + if { \$total_so_far % 3000 == 0 } { + ns_write \"
\" + } + } + incr total_so_far + lappend __paginator_ids \$this_result + } + + if { $print_p } { + ns_write \"…\[expr \$total_so_far - 1\]\" + } + + } + " + set i 0 set page_size $properties(pagesize) set context_ids [list] @@ -120,7 +205,7 @@ } incr i } - + set properties(context_ids) $context_ids cache set $name:$query:context_ids $context_ids $properties(timeout) @@ -130,14 +215,41 @@ } set properties(row_ids) $row_ids + cache set $name:$query:row_ids $row_ids $properties(timeout) - } else { - # no extra column specified for paging by contextual cues - uplevel 3 "set __paginator_ids \[db_list $statement_name \"$query\"\]" + uplevel 2 " + # Can't use db_foreach here, since we need to use the ns_set directly. + db_with_handle db { + set selection \[db_exec select \$db $statement_name \"$query\"\] + set __paginator_ids \[list\] + set total_so_far 1 + + while { \[db_getrow \$db \$selection\] } { + set this_result \[list\] + for { set i 0 } { \$i < \[ns_set size \$selection\] } { incr i } { + lappend this_result \[ns_set value \$selection \$i\] + } + if { $print_p } { + if { \$total_so_far % 250 == 0 } { + ns_write \"...\$total_so_far \" + } + if { \$total_so_far % 3000 == 0 } { + ns_write \"
\" + } + } + incr total_so_far + lappend __paginator_ids \$this_result + } + if { $print_p } { + ns_write \"...\[expr \$total_so_far - 1\]\" + } + } + " + set properties(row_ids) $ids cache set $name:$query:row_ids $ids $properties(timeout) } @@ -243,6 +355,19 @@ return $ids } +ad_proc -public template::paginator::get_all_row_ids { name } { + Gets a list of IDs in the master ID list + generated by the initial query submitted for pagination. IDs are + typically primary key values. + + @param name The reference to the paginator object. + + @return A Tcl list of row identifiers. +} { + get_reference + return $properties(row_ids) +} + ad_proc -public template::paginator::get_pages { name group } { Gets a list of pages in a group, truncating if appropriate at the end. @@ -268,7 +393,7 @@ set start [expr ($group - 1) * $group_size + 1] set end [expr $start + $group_size] - if { $end > $page_count } { set end $page_count } + if { $end > $page_count } { set end [expr $page_count] } set pages [list] @@ -344,6 +469,9 @@ upvar 2 $datasource:rowcount rowcount set rowcount 0 + upvar 2 $datasource:columns columns + set columns { page context } + foreach page $pages { incr rowcount @@ -376,6 +504,9 @@ upvar 2 $datasource:rowcount rowcount set rowcount 0 + upvar 2 $datasource:columns columns + set columns { page } + foreach page $pages { incr rowcount @@ -458,10 +589,28 @@ get_reference upvar 2 $datasource info + if { $page > $properties(page_count) } { + set page $properties(page_count) + } + + set group [get_group $name $page] + set groupsize $properties(groupsize) + set info(page_count) $properties(page_count) + set info(group_count) $properties(group_count) + set info(current_page) $page + set info(current_group) $group - array set info [list next_page {} previous_page {} \ - next_group {} previous_group {}] + array set info { + next_page {} + previous_page {} + next_group {} + previous_group {} + next_page_context {} + previous_page_context {} + next_group_context {} + previous_group_context {} + } if { $page > 1 } { set info(previous_page) [expr $page - 1] @@ -471,8 +620,6 @@ set info(next_page) [expr $page + 1] } - set group [get_group $name $page] - set groupsize $properties(groupsize) if { $group > 1 } { set info(previous_group) [expr ($group - 2) * $groupsize + 1] @@ -481,6 +628,15 @@ if { $group < $properties(group_count) } { set info(next_group) [expr $group * $groupsize + 1] } + + # If the paginator is contextual, set the context + if { [info exists properties(context_ids)] } { + foreach elm { next_page previous_page next_group previous_group } { + if { [exists_and_not_null info($elm)] } { + set info(${elm}_context) [lindex $properties(context_ids) [expr $info($elm) -1]] + } + } + } } ad_proc -public template::paginator::get_data { statement_name name datasource query id_column page } { @@ -505,7 +661,9 @@ template::util::list_to_lookup $ids row_order # substitute the current page set - set query [uplevel 2 "db_map ${statement_name}_partial"] + if { [empty_string_p $query] } { + set query [uplevel 2 "db_map ${statement_name}_partial"] + } # DEDS: quote the ids so that we are not # necessarily limited to integer keys @@ -558,6 +716,57 @@ } +ad_proc -public template::paginator::get_query { name id_column page } { + Returns a query with the data for the rows on the current page. + + @param name The reference to the paginator object. + @param query The query to execute, containing IN (CURRENT_PAGE_SET). + @param id_column The name of the ID column in the display query (required + to order rows properly). +} { + set ids [get_row_ids $name $page] + + if { ![empty_string_p $ids] } { + # calculate the base row number for the page + upvar 2 __page_firstrow firstrow + set firstrow [get_row $name $page] + + # build a hash of row order to order the rows on the page + upvar 2 __page_order row_order + template::util::list_to_lookup $ids row_order + + set query "CURRENT_PAGE_SET" + + # DEDS: quote the ids so that we are not + # necessarily limited to integer keys + set quoted_ids [list] + foreach one_id $ids { + lappend quoted_ids "'[DoubleApos $one_id]'" + } + set in_list [join $quoted_ids ","] + if { ! [regsub CURRENT_PAGE_SET $query $in_list query] } { + error "Token CURRENT_PAGE_SET not found." + } + + if { [llength $in_list] == 0 } { + uplevel 2 "set $datasource:rowcount 0" + return + } + + # Return the query with CURRENT_PAGE_SET slugged + return $query + } else { + return "null" + } +} + +ad_proc -public template::paginator::reset { name query } { + Resets the cache for a query. +} { + cache flush $name:$query:context_ids + cache flush $name:$query:row_ids +} + ad_proc -private template::paginator::get_reference {} { Get a reference to the paginator properties (internal helper) } { Index: openacs-4/packages/acs-templating/tcl/query-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/query-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 17 May 2003 10:05:27 -0000 1.13 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 28 Aug 2003 09:41:45 -0000 1.14 @@ -673,7 +673,7 @@ } extend { - upvar $name:columns columns + upvar $multirow_level_up $name:columns columns foreach column_name $args { lappend columns $column_name } Index: openacs-4/packages/acs-templating/tcl/tag-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-init.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-templating/tcl/tag-init.tcl 17 May 2003 10:05:27 -0000 1.10 +++ openacs-4/packages/acs-templating/tcl/tag-init.tcl 28 Aug 2003 09:41:45 -0000 1.11 @@ -218,7 +218,7 @@ set ${name}(groupnum_last_p) 1 } else { upvar 0 ${name}:\[expr \$$i + 1\] $name:next - set ${name}(groupnum_last_p) \[expr !\[string equal \${${name}:next($column)} \$${name}($column)\]\] + set ${name}(groupnum_last_p) \[expr !\[string equal \[set \"${name}:next(${column})\"\] \$${name}($column)\]\] } " @@ -231,7 +231,7 @@ break } upvar 0 ${name}:\[expr \$$i + 1\] $name:next - if { !\[string equal \${${name}:next($column)} \$${name}($column)\] } { + if { !\[string equal \[set \"${name}:next(${column})\"\] \$${name}(${column})\] } { break } incr $i Index: openacs-4/packages/acs-templating/tcl/tag-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/tag-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-templating/tcl/tag-procs.tcl 23 Aug 2003 00:26:26 -0000 1.8 +++ openacs-4/packages/acs-templating/tcl/tag-procs.tcl 28 Aug 2003 09:41:45 -0000 1.9 @@ -156,11 +156,16 @@ } nil { - # substitute array variables - regsub {^"@([a-zA-z0-9_]+)\.([a-zA-z0-9_]+)@"$} $arg1 {\1(\2)} arg1 - # substitute regular variables - regsub {^"@([a-zA-z0-9_:]+)@"$} $arg1 {\1} arg1 - append condition "\[template::util::is_nil $arg1\]" + if { [string first @ $arg1] == -1 } { + # We're assuming this is a static string, not a variable + append condition "\[empty_string_p $arg1\]" + } else { + # substitute array variables + regsub {^"@([a-zA-z0-9_]+)\.([a-zA-z0-9_]+)@"$} $arg1 {\1(\2)} arg1 + # substitute regular variables + regsub {^"@([a-zA-z0-9_:]+)@"$} $arg1 {\1} arg1 + append condition "\[template::util::is_nil $arg1\]" + } set next $i } Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v diff -u -r1.20 -r1.21 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 19 May 2003 12:30:32 -0000 1.20 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 28 Aug 2003 09:41:45 -0000 1.21 @@ -30,6 +30,7 @@ @see template::widget::numericRange @see template::widget::password @see template::widget::radio + @see template::util::richtext @see template::widget::search @see template::widget::select @see template::widget::submit @@ -239,6 +240,21 @@ return [input submit element $tag_attributes] } +ad_proc -public template::widget::attachment { element_reference tag_attributes } { + + upvar $element_reference element + + set output [input file element $tag_attributes] + + set element(name) $element(attach_name) + set element(label) $element(attach_label) + set element(html) $element(attach_html) + + append output [submit element $tag_attributes] + + return $output +} + ad_proc -public template::widget::checkbox { element_reference tag_attributes } { upvar $element_reference element @@ -378,7 +394,9 @@ if { [string equal $value {}] } { return [list] } if { [string equal $value ":search:"] } { - unset element(options) + if { [info exists element(options)] } { + unset element(options) + } template::element::set_error $element(form_id) $element_id " Please enter a search string." return [list] @@ -402,7 +420,9 @@ # no search results so return text entry back to the user - unset element(options) + if { [info exists element(options)] } { + unset element(options) + } template::element::set_error $element(form_id) $element_id " No matches were found for \"$value\".
Please Index: openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml,v diff -u -r1.8 -r1.9 --- openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml 24 Jun 2003 12:01:29 -0000 1.8 +++ openacs-4/packages/attachments/catalog/attachments.en_US.ISO-8859-1.xml 28 Aug 2003 09:41:45 -0000 1.9 @@ -19,7 +19,7 @@ %contents.content_size% byte Created by the attachments packge document to %pretty_object_name%. - don't know how to deal with this attachment type + Don't know how to deal with attachment type %content_type% Error: Attachment root folder and fs root folder different! Error: empty folder_id! Folder %folder_name% is empty Index: openacs-4/packages/attachments/tcl/attachments-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/Attic/attachments-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/attachments/tcl/attachments-procs-oracle.xql 30 Aug 2002 14:44:08 -0000 1.2 +++ openacs-4/packages/attachments/tcl/attachments-procs-oracle.xql 28 Aug 2003 09:41:46 -0000 1.3 @@ -4,8 +4,7 @@ - select item_id, - acs_object.name(item_id) + select item_id from attachments where object_id = :object_id and approved_p = 't' @@ -15,7 +14,6 @@ select item_id, - acs_object.name(item_id), approved_p from attachments where object_id = :object_id Index: openacs-4/packages/attachments/tcl/attachments-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/tcl/attachments-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/attachments/tcl/attachments-procs.tcl 7 Nov 2002 15:11:49 -0000 1.10 +++ openacs-4/packages/attachments/tcl/attachments-procs.tcl 28 Aug 2003 09:41:46 -0000 1.11 @@ -144,9 +144,14 @@ set lst [db_list_of_lists select_attachments {}] set lst_with_urls [list] - foreach el $lst { - set append_lst [list [goto_attachment_url -object_id $object_id -attachment_id [lindex $el 0] -base_url $base_url]] - lappend lst_with_urls [concat $el $append_lst] + foreach item_id $lst { + if { [content_extlink::extlink_p -item_id $item_id] } { + set label [content_extlink::extlink_name -item_id $item_id] + } else { + set label [fs::get_object_name -object_id $item_id] + } + set append_lst [list [goto_attachment_url -object_id $object_id -attachment_id $item_id -base_url $base_url]] + lappend lst_with_urls [concat [list $item_id $label] $append_lst] } return $lst_with_urls @@ -161,9 +166,14 @@ set lst [db_list_of_lists select_attachments {}] set lst_with_urls [list] - foreach el $lst { - set append_lst [list [goto_attachment_url -object_id $object_id -attachment_id [lindex $el 0] -base_url $base_url]] - lappend lst_with_urls [concat $el $append_lst] + foreach item_id $lst { + if { [content_extlink::extlink_p -item_id $item_id] } { + set label [content_extlink::extlink_name -item_id $item_id] + } else { + set label [fs::get_object_name -object_id $item_id] + } + set append_lst [list [goto_attachment_url -object_id $object_id -attachment_id $item_id -base_url $base_url]] + lappend lst_with_urls [concat [list $item_id $label] $append_lst] } return $lst_with_urls Index: openacs-4/packages/attachments/www/go-to-attachment.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/go-to-attachment.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/attachments/www/go-to-attachment.tcl 17 May 2003 10:13:01 -0000 1.5 +++ openacs-4/packages/attachments/www/go-to-attachment.tcl 28 Aug 2003 09:41:46 -0000 1.6 @@ -12,27 +12,28 @@ permission::require_permission -object_id $object_id -privilege read # Get information about attachment -if {![db_0or1row select_attachment_data {}]} { - ad_return_complaint "[_ attachments.lt_No_such_attachment_fo]" +set content_type [item::get_type $attachment_id] +if { [string length $content_type] == 0 } { + ad_return_complaint 1 [_ attachments.lt_No_such_attachment_fo] return } -switch $object_type { +switch $content_type { content_extlink { ad_returnredirect [db_string select_url {}] ad_script_abort return } - content_item { + file_storage_object { set title [db_string select_attachment_title {}] ad_returnredirect "download/[ad_urlencode $title]?object_id=$object_id&attachment_id=$attachment_id" ad_script_abort return } default { - ad_return_complaint "[_ attachments.lt_dont_know_how_to_deal]" + ad_return_complaint 1 [_ attachments.lt_dont_know_how_to_deal [list content_type $content_type]] return } } Index: openacs-4/packages/attachments/www/go-to-attachment.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/go-to-attachment.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/attachments/www/go-to-attachment.xql 17 May 2003 10:13:02 -0000 1.3 +++ openacs-4/packages/attachments/www/go-to-attachment.xql 28 Aug 2003 09:41:46 -0000 1.4 @@ -1,17 +1,6 @@ - - - select object_type - from attachments, acs_objects - where - attachments.object_id = :object_id and - attachments.item_id = :attachment_id and - attachments.item_id = acs_objects.object_id - - - select url Index: openacs-4/packages/attachments/www/simple-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/simple-add-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/attachments/www/simple-add-2.tcl 17 May 2003 10:13:02 -0000 1.3 +++ openacs-4/packages/attachments/www/simple-add-2.tcl 28 Aug 2003 09:41:46 -0000 1.4 @@ -24,11 +24,13 @@ ad_require_permission $folder_id write db_transaction { - - # Create and attach the URL - attachments::attach -object_id $object_id \ - -attachment_id [content_simple::new -url $url -label $title -description $description -parent_id $folder_id] + # Create the URL (for now) + set url_id [content_extlink::new -url $url -label $title -description $description -parent_id $folder_id] + + # Attach the URL + attachments::attach -object_id $object_id -attachment_id $url_id + } ad_returnredirect "$return_url" Index: openacs-4/packages/bug-tracker/bug-tracker.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/bug-tracker.info,v diff -u -r1.12 -r1.13 --- openacs-4/packages/bug-tracker/bug-tracker.info 14 Apr 2003 13:33:29 -0000 1.12 +++ openacs-4/packages/bug-tracker/bug-tracker.info 28 Aug 2003 09:45:29 -0000 1.13 @@ -7,18 +7,22 @@ f f - + + + postgresql + oracle + Lars Pind Tracks bugs and features, versions and maintainers, in software projects. Contains the best of SDM, Bugzilla, FogBUGZ, and bughost.com. 2003-02-28 Musea Technologies - + - + - + @@ -27,6 +31,7 @@ + Index: openacs-4/packages/bug-tracker/lib/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/master.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/lib/master.adp 22 May 2003 14:23:42 -0000 1.5 +++ openacs-4/packages/bug-tracker/lib/master.adp 28 Aug 2003 09:45:29 -0000 1.6 @@ -1,10 +1,13 @@ -@title;noquote@ +@title@ -@signatory;noquote@ -@focus;noquote@ +@signatory@ +@focus@ /packages/bug-tracker/lib/version-bar - @context_bar;noquote@ + @context_bar@ - @context;noquote@ + @context@ - +

- + Index: openacs-4/packages/bug-tracker/lib/nav-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/nav-bar.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/lib/nav-bar.adp 11 Sep 2002 14:03:20 -0000 1.2 +++ openacs-4/packages/bug-tracker/lib/nav-bar.adp 28 Aug 2003 09:45:29 -0000 1.3 @@ -17,7 +17,7 @@ @links.name@ |  - Index: openacs-4/packages/bug-tracker/lib/nav-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/nav-bar.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/lib/nav-bar.tcl 5 Mar 2003 17:39:52 -0000 1.6 +++ openacs-4/packages/bug-tracker/lib/nav-bar.tcl 28 Aug 2003 09:45:29 -0000 1.7 @@ -14,6 +14,8 @@ set admin_p [permission::permission_p -object_id $package_id -privilege admin] set create_p [expr { [ad_conn user_id] == 0 || [permission::permission_p -object_id [ad_conn package_id] -privilege create] }] +bug_tracker::get_pretty_names -array pretty_names + set notification_url [lindex $notification_link 0] set notification_label [lindex $notification_link 1] set notification_title [lindex $notification_link 2] Index: openacs-4/packages/bug-tracker/lib/version-bar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/version-bar.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/lib/version-bar.adp 5 Mar 2003 17:39:52 -0000 1.2 +++ openacs-4/packages/bug-tracker/lib/version-bar.adp 28 Aug 2003 09:45:29 -0000 1.3 @@ -1,29 +1,20 @@ - - - - - - - - - -
- @user_first_names@ @user_last_name@ - Not logged in (log in) -
- - - Your version: @user_version_name@ - - | Current: @current_version_name@ - - - (current) - - - - Current version: @current_version_name@ - - -
+ +

+ + Your version: @user_version_name@ + + | Current: @current_version_name@ + + + (current) + + + + + Current version: @current_version_name@ + + +
+ + Index: openacs-4/packages/bug-tracker/lib/version-bar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/lib/version-bar.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/lib/version-bar.tcl 5 Mar 2003 17:39:52 -0000 1.4 +++ openacs-4/packages/bug-tracker/lib/version-bar.tcl 28 Aug 2003 09:45:29 -0000 1.5 @@ -1,5 +1,12 @@ # Version bar, to be included on all pages +# Is this project using multiple versions? +set versions_p [bug_tracker::versions_p] + +if { !$versions_p } { + return +} + # Project info set current_version_id [bug_tracker::conn current_version_id] @@ -14,12 +21,7 @@ set user_version_id [bug_tracker::conn user_version_id] set user_version_name [bug_tracker::conn user_version_name] -set user_first_names [bug_tracker::conn user_first_names] -set user_last_name [bug_tracker::conn user_last_name] -# Is this project using multiple versions? -set versions_p [bug_tracker::versions_p] - set package_url [ad_conn package_url] set user_version_url "[ad_conn package_url]prefs?[export_vars -url { return_url }]" Index: openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql 14 Apr 2003 13:34:03 -0000 1.2 +++ openacs-4/packages/bug-tracker/sql/oracle/bug-tracker-create-packages.sql 28 Aug 2003 09:45:29 -0000 1.3 @@ -56,6 +56,10 @@ bug_id in integer ); + function name ( + bug_id in integer + ) return varchar2; + end bt_bug; / show errors @@ -148,9 +152,15 @@ name => 'bug_tracker_' || bt_project.new.package_id, label => v_instance_name, description => null, - parent_id => v_root_folder_id + parent_id => v_root_folder_id, + context_id => bt_project.new.package_id, + creation_user => v_creation_user, + creation_ip => v_creation_ip ); + -- Set package_id column. Oddly enoguh, there is no API to set it + update cr_folders set package_id = bt_project.new.package_id where folder_id = v_folder_id; + -- register our content type content_folder.register_content_type ( folder_id => v_folder_id, @@ -212,6 +222,9 @@ bt_patch.delete(rec.patch_id); end loop; + -- delete the content folder + content_folder.delete(v_folder_id); + -- delete the projects keywords bt_project.keywords_delete( project_id => project_id, @@ -224,10 +237,6 @@ delete from bt_user_prefs where project_id = bt_project.delete.project_id; delete from bt_projects where project_id = bt_project.delete.project_id; - - -- delete the content folder - content_folder.delete(v_folder_id); - end delete; procedure keywords_delete ( @@ -415,7 +424,7 @@ from workflow_cases where object_id = bt_bug.delete.bug_id; - foo := workflow_case.delete(v_case_id); + foo := workflow_case_pkg.delete(v_case_id); -- Every bug may have notifications attached to it -- and there is one column in the notificaitons datamodel that doesn't @@ -430,6 +439,20 @@ return; end delete; + function name ( + bug_id in integer + ) return varchar2 + is + v_name bt_bugs.summary%TYPE; + begin + select summary + into v_name + from bt_bugs + where bug_id = name.bug_id; + + return v_name; + end name; + end bt_bug; / show errors Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/oracle/upgrade-1.2d10-1.2d11.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/oracle/upgrade/upgrade-1.2d8-1.2d9.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/oracle/upgrade/upgrade-1.2d9-1.2d10.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql 14 Apr 2003 13:34:44 -0000 1.8 +++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-create.sql 28 Aug 2003 09:45:29 -0000 1.9 @@ -56,9 +56,18 @@ ''bug_tracker_''||p_package_id, -- name v_instance_name, -- label null, -- description - content_item_globals.c_root_folder_id -- parent_bi + content_item_globals.c_root_folder_id, -- parent_id + p_package_id, -- context_id + null, -- folder_id + now(), -- creation_date + v_creation_user, -- creation_user + v_creation_ip, -- creation_ip, + ''t'' -- security_inherit_p ); + -- Set package_id column. Oddly enoguh, there is no API to set it + update cr_folders set package_id = p_package_id where folder_id = v_folder_id; + -- register our content type PERFORM content_folder__register_content_type ( v_folder_id, -- folder_id @@ -122,8 +131,12 @@ perform bt_patch__delete(rec.patch_id); end loop; + -- delete the content folder + raise notice ''about to delete content_folder.''; + perform content_folder__delete(v_folder_id); + -- delete the projects keywords - perform bt_projects__keywords_delete(p_project_id, ''t''); + perform bt_project__keywords_delete(p_project_id, ''t''); -- These tables should really be set up to cascade delete from bt_versions where project_id = p_project_id; @@ -132,10 +145,6 @@ delete from bt_projects where project_id = p_project_id; - -- delete the content folder - raise notice ''about to delete content_folder.''; - perform content_folder__delete(v_folder_id); - return 0; end; ' language 'plpgsql'; @@ -305,7 +314,7 @@ fix_for_version integer, fixed_in_version integer, -- denormalized from acs_objects - creation_date timestamp, + creation_date timestamptz, creation_user integer, -- constraint constraint bt_bug_parent_id_bug_number_un @@ -391,7 +400,7 @@ varchar, -- user_agent text, -- comment_content varchar, -- comment_format - timestamp, -- creation_date + timestamptz, -- creation_date integer, -- creation_user varchar, -- creation_ip varchar, -- item_subtype @@ -437,7 +446,7 @@ -- create the content item v_bug_id := content_item__new( - v_bug_number, -- name + v_bug_number::varchar, -- name v_folder_id, -- parent_id p_bug_id, -- item_id null, -- locale @@ -496,7 +505,7 @@ from workflow_cases where object_id = p_bug_id; - perform workflow_case__delete(v_case_id); + perform workflow_case_pkg__delete(v_case_id); -- Every bug may have notifications attached to it -- and there is one column in the notificaitons datamodel that doesn''t @@ -532,7 +541,7 @@ varchar, -- resolution varchar, -- user_agent varchar, -- summary - timestamp, -- creation_date + timestamptz, -- creation_date integer, -- creation_user varchar -- creation_ip ) returns int @@ -557,7 +566,7 @@ v_revision_id := content_revision__new( p_summary, -- title null, -- description - now(), -- publish_date + current_timestamp, -- publish_date null, -- mime_type null, -- nls_language null, -- new_data @@ -659,8 +668,8 @@ actor integer not null constraint bt_patch_actions_actor_fk references users(user_id), - action_date timestamp not null - default now(), + action_date timestamptz not null + default current_timestamp, comment_text text, comment_format varchar(30) default 'plain' not null constraint bt_patch_actions_comment_format_ck @@ -715,7 +724,7 @@ v_patch_id := acs_object__new( p_patch_id, -- object_id ''bt_patch'', -- object_type - now(), -- creation_date + current_timestamp, -- creation_date p_creation_user, -- creation_user p_creation_ip, -- creation_ip p_project_id, -- context_id @@ -802,3 +811,4 @@ create index bt_patch_bug_map_patch_id_idx on bt_patch_bug_map(patch_id); create index bt_patch_bug_map_bug_id_idx on bt_patch_bug_map(bug_id); + Index: openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql 5 Mar 2003 17:40:28 -0000 1.5 +++ openacs-4/packages/bug-tracker/sql/postgresql/bug-tracker-drop.sql 28 Aug 2003 09:45:29 -0000 1.6 @@ -56,5 +56,9 @@ drop function bt_patch__new(integer,integer,integer,text,text,text,text,integer,integer,varchar); drop table bt_patch_actions; drop table bt_patches; +drop sequence t_bt_patch_number_seq; +drop view bt_patch_number_seq; +delete from acs_objects where object_type = 'bt_patch'; + select acs_object_type__drop_type('bt_patch', 't'); Index: openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d3-0.7d4.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d3-0.7d4.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d3-0.7d4.sql 29 Aug 2002 17:13:06 -0000 1.2 +++ openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d3-0.7d4.sql 28 Aug 2003 09:45:29 -0000 1.3 @@ -101,8 +101,8 @@ actor integer not null constraint bt_bug_actions_actor_fk references users(user_id), - action_date timestamp not null - default now(), + action_date timestamptz not null + default current_timestamp, comment text, comment_format varchar(30) default 'plain' not null constraint bt_bug_actions_comment_format_ck Index: openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d5-0.8.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d5-0.8.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d5-0.8.sql 5 Mar 2003 17:40:28 -0000 1.2 +++ openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.7d5-0.8.sql 28 Aug 2003 09:45:29 -0000 1.3 @@ -52,8 +52,8 @@ actor integer not null constraint bt_patch_actions_actor_fk references users(user_id), - action_date timestamp not null - default now(), + action_date timestamptz not null + default current_timestamp, comment text, comment_format varchar(30) default 'plain' not null constraint bt_patch_actions_comment_format_ck Index: openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql 5 Mar 2003 17:40:28 -0000 1.1 +++ openacs-4/packages/bug-tracker/sql/postgresql/upgrade-0.9d1-1.2d2.sql 28 Aug 2003 09:45:29 -0000 1.2 @@ -384,11 +384,12 @@ from bt_projects where project_id = p_project_id; - -- Delete the bugs - for rec in select item_id from cr_items where parent_id = v_folder_id - loop - perform bt_bug__delete(rec.item_id); - end loop; + -- This gets done in tcl before we are called ... for now + -- Delete the bugs + -- for rec in select item_id from cr_items where parent_id = v_folder_id + -- loop + -- perform bt_bug__delete(rec.item_id); + -- end loop; -- Delete the patches for rec in select patch_id from bt_patches where project_id = p_project_id @@ -401,7 +402,7 @@ perform content_folder__delete(v_folder_id); -- delete the projects keywords - perform bt_projects__keywords_delete(p_project_id, ''t''); + perform bt_project__keywords_delete(p_project_id, ''t''); -- These tables should really be set up to cascade delete from bt_versions where project_id = p_project_id; @@ -1476,6 +1477,7 @@ -- ******* Drop temporary upgrade tables drop table code_keyword_map_temp; +drop table bug_type_keyword_map_temp; drop table bt_bugs_temp; drop table project_temp; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d10-1.2d11.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d5-1.2d6.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d6-1.2d7.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d8-1.2d9.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/sql/postgresql/upgrade-1.2d9-1.2d10.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/bug-tracker/tcl/bug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 5 Mar 2003 17:40:50 -0000 1.2 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.tcl 28 Aug 2003 09:45:29 -0000 1.3 @@ -42,20 +42,20 @@ upvar $array row db_1row select_bug_data {} -column_array row - + # Get the case ID, so we can get state information set case_id [workflow::case::get_id \ - -object_id $bug_id \ - -workflow_short_name [bug_tracker::bug::workflow_short_name]] - + -object_id $bug_id \ + -workflow_short_name [bug_tracker::bug::workflow_short_name]] + # Derived fields set row(bug_number_display) "#$row(bug_number)" set row(component_name) [bug_tracker::component_get_name -component_id $row(component_id)] set row(found_in_version_name) [bug_tracker::version_get_name -version_id $row(found_in_version)] set row(fix_for_version_name) [bug_tracker::version_get_name -version_id $row(fix_for_version)] set row(fixed_in_version_name) [bug_tracker::version_get_name -version_id $row(fixed_in_version)] - - + + # Get state information workflow::case::fsm::get -case_id $case_id -array case -action_id $action_id set row(pretty_state) $case(pretty_state) @@ -65,7 +65,6 @@ set row(state_short_name) $case(state_short_name) set row(hide_fields) $case(state_hide_fields) set row(entry_id) $case(entry_id) - } ad_proc -public bug_tracker::bug::insert { @@ -129,6 +128,7 @@ {-ip_address ""} {-item_subtype "bt_bug"} {-content_type "bt_bug_revision"} + {-keyword_ids {}} } { Create a new bug, then send out notifications, starts workflow, etc. @@ -155,6 +155,10 @@ -content_type $content_type \ ] + foreach keyword_id $keyword_ids { + cr::keyword::item_assign -item_id $bug_id -keyword_id $keyword_id + } + workflow::case::new \ -workflow_id [workflow::get_id -object_id $package_id -short_name [workflow_short_name]] \ -object_id $bug_id \ @@ -240,7 +244,7 @@ # Update the keywords foreach {category_id category_name} [bug_tracker::category_types] { - if { [info exists row($category_id)] } { + if { [exists_and_not_null row($category_id)] } { cr::keyword::item_assign -singular -item_id $bug_id -keyword_id $row($category_id) } # LARS: @@ -278,7 +282,7 @@ @return 3-tuple of url, label and title. } { set user_id [ad_conn user_id] - set return_url [util_get_current_url] + set return_url [ad_return_url] # Get the type id set type "workflow_case" @@ -299,12 +303,12 @@ -url $return_url \ -user_id $user_id \ -pretty_name "this bug"] - set label "Watch this bug" - set title "Request notifications for all activity on this bug" + set label "Watch this [bug_tracker::conn bug]" + set title "Request notifications for all activity on this [bug_tracker::conn bug]" } else { set url [notification::display::unsubscribe_url -request_id $request_id -url $return_url] - set label "Stop watching this bug" - set title "Unsubscribe to notifications for activity on this bug" + set label "Stop watching this [bug_tracker::conn bug]" + set title "Unsubscribe to notifications for activity on this [bug_tracker::conn bug]" } return [list $url $label $title] } @@ -420,115 +424,6 @@ } } -# set spec { -# bug { -# pretty_name "Bug" -# package_key "bug-tracker" -# object_type "bt_bug" -# callbacks { -# bug-tracker.FormatLogTitle -# bug-tracker.BugNotificationInfo -# } -# roles { -# submitter { -# pretty_name "Submitter" -# callbacks { -# workflow.Role_DefaultAssignees_CreationUser -# } -# } -# assignee { -# pretty_name Assignee -# callbacks { -# bug-tracker.ComponentMaintainer -# bug-tracker.ProjectMaintainer -# workflow.Role_PickList_CurrentAssignees -# workflow.Role_AssigneeSubquery_RegisteredUsers -# } -# } -# } -# states { -# open { -# pretty_name "Open" -# hide_fields { resolution fixed_in_version } -# } -# resolved { -# pretty_name "Resolved" -# } -# closed { -# pretty_name "Closed" -# } -# } -# actions { -# open { -# pretty_name Open -# pretty_past_tense Opened -# new_state "open" -# initial_action_p t -# } -# comment { -# pretty_name Comment -# pretty_past_tense Commented -# allowed_roles { submitter assignee } -# privileges { read write } -# always_enabled_p t -# } -# edit { -# pretty_name Edit -# pretty_past_tense Edited -# allowed_roles { submitter assignee } -# privileges { write } -# always_enabled_p t -# edit_fields { -# component_id -# bug_type -# summary -# severity -# priority -# found_in_version -# role_assignee -# fix_for_version -# resolution -# fixed_in_version -# } -# } -# reassign { -# pretty_name Reassign -# pretty_past_tense Reassigned -# allowed_role { submitter assignee } -# privileges { write } -# enabled_states { open resolved } -# edit_fields { role_assignee } -# } -# resolve { -# pretty_name Resolve -# pretty_past_tense Resolved -# assigned_role "assignee" -# enabled_states { resolved } -# assigned_states { open } -# new_state "resolved" -# privileges { write } -# edit_fields { resolution fixed_in_version } -# callbacks { bug-tracker.CaptureResolutionCode } -# } -# close { -# pretty_name Close -# pretty_past_tense Closed -# assigned_role "submitter" -# assigned_states { resolved } -# new_state "closed" -# privileges { write } -# } -# reopen { -# pretty_name Reopen -# pretty_past_tense Reopened -# allowed_roles { submitter } -# enabled_states { resolved closed } -# new_state "open" -# privileges { write } -# } -# } -# } -# } set workflow_id [workflow::fsm::new_from_spec -spec $spec] return $workflow_id @@ -607,7 +502,10 @@ action_id entry_id } { - db_dml insert_resolution_code {} + workflow::case::add_log_data \ + -entry_id $entry_id \ + -key "resolution" \ + -value [db_string select_resolution_code {}] } ##### Index: openacs-4/packages/bug-tracker/tcl/bug-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/tcl/bug-procs.xql 5 Mar 2003 17:40:50 -0000 1.1 +++ openacs-4/packages/bug-tracker/tcl/bug-procs.xql 28 Aug 2003 09:45:29 -0000 1.2 @@ -22,25 +22,14 @@
- + - insert into workflow_case_log_data - (entry_id, key, value) - select :entry_id, 'resolution', resolution + select resolution from bt_bugs where bug_id = :object_id - - - select value - from workflow_case_log_data - where entry_id = :entry_id - and key = 'resolution' - - - select c.maintainer Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql 5 Mar 2003 17:40:50 -0000 1.1 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-oracle.xql 28 Aug 2003 09:45:29 -0000 1.2 @@ -151,7 +151,7 @@ begin - workflow_case.delete(:case_id); + workflow_case_pkg.delete(:case_id); end; Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql 5 Mar 2003 17:40:50 -0000 1.1 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs-postgresql.xql 28 Aug 2003 09:45:29 -0000 1.2 @@ -145,7 +145,7 @@ - select workflow_case__delete(:case_id); + select workflow_case_pkg__delete(:case_id); Index: openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl,v diff -u -r1.18 -r1.19 --- openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 5 Mar 2003 17:40:50 -0000 1.18 +++ openacs-4/packages/bug-tracker/tcl/bug-tracker-procs.tcl 28 Aug 2003 09:45:29 -0000 1.19 @@ -4,7 +4,7 @@ @creation-date 2002-05-03 @author Lars Pind - @cvs-id $Id$ + @cvs-id bug-tracker-procs.tcl,v 1.13.2.7 2003/03/05 18:13:39 lars Exp } @@ -959,7 +959,6 @@ {-comment:required} {-format:required} } { - ns_log Notice "LARS: Format=$format, comment=$comment, formatted = [ad_html_text_convert -from $format -to text/html -- $comment]" return [ad_html_text_convert -from $format -to text/html -- $comment] } @@ -1276,6 +1275,7 @@ {action_id} fix_for_version:integer assignee:integer + enabled_action_assignee:integer action_id:integer component_id:integer keyword:integer,multiple @@ -1382,6 +1382,38 @@ } append human_readable_filter " where [join $keyword_human " and "]" } + + if { [info exists filter_enabled_action_assignee] } { + lappend where_clauses { + exists ( + select 1 + from workflow_cases cas2, + workflow_case_fsm cfsm2, + workflow_actions a2, + workflow_case_role_party_map crpm2 + where cas2.object_id = b.bug_id + and (a2.always_enabled_p = 't' + or exists (select 1 + from workflow_fsm_action_en_in_st aeis + where aeis.state_id = cfsm.current_state + and aeis.action_id = a2.action_id + and aeis.assigned_p = 't' + ) + ) + and cfsm2.case_id = cas2.case_id + and crpm2.case_id = cas2.case_id + and crpm2.role_id = a2.assigned_role + and crpm2.party_id = :filter_enabled_action_assignee + ) + } + if { $filter_enabled_action_assignee == [ad_conn user_id] } { + append human_readable_filter " awaiting action by me" + } else { + array set person [person::get -person_id $filter_enabled_action_assignee] + + append human_readable_filter " awaiting action by $person(first_names) $person(last_name)" + } + } if { ![empty_string_p [conn component_id]] } { set filter_component_id [conn component_id] Index: openacs-4/packages/bug-tracker/www/bug-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug-add.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/bug-tracker/www/bug-add.adp 22 May 2003 14:24:00 -0000 1.5 +++ openacs-4/packages/bug-tracker/www/bug-add.adp 28 Aug 2003 09:45:29 -0000 1.6 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@ bug.component_id @@ -11,6 +11,6 @@
- + Index: openacs-4/packages/bug-tracker/www/bug-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug-add.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/bug-tracker/www/bug-add.tcl 5 Mar 2003 17:41:04 -0000 1.9 +++ openacs-4/packages/bug-tracker/www/bug-add.tcl 28 Aug 2003 09:45:29 -0000 1.10 @@ -44,11 +44,10 @@ {label "Summary"} {html {size 50}} } - {found_in_version:text(select) + {found_in_version:text(select),optional {label "Version"} {options {[bug_tracker::version_get_options -include_unknown]}} {value {[bug_tracker::conn user_version_id]}} - optional } {return_url:text(hidden) {value $return_url}} @@ -64,28 +63,30 @@ } ad_form -extend -name bug -form { - {description:richtext(richtext) + {description:richtext(richtext),optional {label "Description"} {html {cols 60 rows 13}} - optional } } ad_form -extend -name bug -new_data { + + set keyword_ids [list] + foreach {category_id category_name} [bug_tracker::category_types] { + # -singular not required here since it's a new bug + lappend keyword_ids [element get_value bug $category_id] + } + bug_tracker::bug::new \ -bug_id $bug_id \ -package_id $package_id \ -component_id $component_id \ -found_in_version $found_in_version \ -summary $summary \ -description [template::util::richtext::get_property contents $description] \ - -desc_format [template::util::richtext::get_property format $description] - - foreach {category_id category_name} [bug_tracker::category_types] { - # -singular not required here since it's a new bug - cr::keyword::item_assign -item_id $bug_id -keyword_id [element get_value bug $category_id] - } + -desc_format [template::util::richtext::get_property format $description] \ + -keyword_ids $keyword_ids } -after_submit { bug_tracker::bugs_exist_p_set_true Index: openacs-4/packages/bug-tracker/www/bug.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/www/bug.adp 22 May 2003 14:24:00 -0000 1.6 +++ openacs-4/packages/bug-tracker/www/bug.adp 28 Aug 2003 09:45:29 -0000 1.7 @@ -1,7 +1,7 @@ -@page_title;noquote@ -@context_bar;noquote@ -@notification_link;noquote@ +@page_title@ +@context_bar@ +@notification_link@ @@ -18,7 +18,7 @@

- +

Index: openacs-4/packages/bug-tracker/www/bug.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/bug.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/bug-tracker/www/bug.tcl 5 Mar 2003 17:41:04 -0000 1.19 +++ openacs-4/packages/bug-tracker/www/bug.tcl 28 Aug 2003 09:45:29 -0000 1.20 @@ -53,9 +53,7 @@ set workflow_id [bug_tracker::bug::get_instance_workflow_id] -set role_ids [workflow::get_roles -workflow_id $workflow_id] - ##### # # Action @@ -64,12 +62,6 @@ set action_id [form get_action bug] -if { ![empty_string_p $action_id] } { - set action_short_name [workflow::action::get_element -action_id $action_id -element short_name] -} else { - set action_short_name {} -} - # Registration required for all actions if { ![empty_string_p $action_id] } { ad_maybe_redirect_for_registration @@ -104,15 +96,14 @@ set patch_label [ad_decode $show_patch_status "open" "Open Patches (show all)" "all" "All Patches (show only open)" "Patches"] ad_form -name bug -cancel_url $return_url -mode display -has_edit 1 -actions $actions -form { - {bug_number_display:integer(inform) + {bug_number_display:text(inform) {label "[bug_tracker::conn Bug] \#"} {mode display} } - {component_id:integer(select) + {component_id:integer(select),optional {label "[bug_tracker::conn Component]"} {options {[bug_tracker::components_get_options]}} {mode display} - optional } {summary:text(text) {label "Summary"} @@ -131,11 +122,10 @@ {after_html ""} {mode display} } - {resolution:text(select) + {resolution:text(select),optional {label "Resolution"} {options {[bug_tracker::resolution_get_options]}} {mode display} - optional } } @@ -151,11 +141,10 @@ ad_form -extend -name bug -form { - {found_in_version:text(select) + {found_in_version:text(select),optional {label "Found in Version"} {options {[bug_tracker::version_get_options -include_unknown]}} {mode display} - optional } } @@ -171,30 +160,25 @@ {label "User Agent"} {mode display} } - {fix_for_version:text(select) + {fix_for_version:text(select),optional {label "Fix for Version"} {options {[bug_tracker::version_get_options -include_undecided]}} {mode display} - optional } - {fixed_in_version:text(select) + {fixed_in_version:text(select),optional {label "Fixed in Version"} {options {[bug_tracker::version_get_options -include_undecided]}} {mode display} - optional } - {description:richtext(richtext) + {description:richtext(richtext),optional {label "Description"} {html {cols 60 rows 13}} - optional } {return_url:text(hidden) {value $return_url} } {bug_number:key} - {entry_id:integer(hidden) - optional - } + {entry_id:integer(hidden),optional} } # Export filters @@ -211,8 +195,10 @@ foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { element set_properties bug $field -mode edit } - if {[string compare $action_short_name "edit"] == 0} { - foreach {category_id category_name} [bug_tracker::category_types] { + + # LARS: Hack! How do we set editing of dynamic fields? + if { [string equal [workflow::action::get_element -action_id $action_id -element short_name] "edit"] } { + foreach { category_id category_name } [bug_tracker::category_types] { element set_properties bug $category_id -mode edit } } @@ -253,7 +239,7 @@ # whenever the form is displayed, whether initially or because of a validation error. } -# Not-valid block (request, error) +# Not-valid block (request or submit error) if { ![form is_valid bug] } { # Get the bug data @@ -305,7 +291,6 @@ element set_properties bug user_agent -widget hidden } - # Set regular element values foreach element $element_names { @@ -316,7 +301,7 @@ } } } - + # Add empty option to resolution code if { ![empty_string_p $action_id] } { if { [lsearch [workflow::action::get_element -action_id $action_id -element edit_fields] "resolution"] == -1 } { @@ -341,17 +326,17 @@ # Set values for description field element set_properties bug description \ - -before_html "[workflow::case::get_activity_html -case_id $case_id][ad_decode $action_id "" "" "

$bug(now_pretty) [bug_tracker::bug_action_pretty $action_short_name] by [bug_tracker::conn user_first_names] [bug_tracker::conn user_last_name]

"]" + -before_html [workflow::case::get_activity_html -case_id $case_id -action_id $action_id] # Set page title set page_title "[bug_tracker::conn Bug] #$bug_number: $bug(summary)" # Context bar if { [info exists filter] } { - if { [array names filter] == [list "actionby"] && $filter(actionby) == $user_id } { - set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "My bugs"] $page_title] + if { [array names filter] == [list "assignee"] && $filter(assignee) == $user_id } { + set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "My [bug_tracker::conn bugs]"] $page_title] } else { - set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "Filtered bug list"] $page_title] + set context_bar [bug_tracker::context_bar [list ".?[export_vars { filter:array }]" "Filtered [bug_tracker::conn bug] list"] $page_title] } } else { set context_bar [bug_tracker::context_bar $page_title] @@ -413,4 +398,3 @@ } ad_return_template - Index: openacs-4/packages/bug-tracker/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/index-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/index-oracle.xql 5 Mar 2003 17:41:04 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/index-oracle.xql 28 Aug 2003 09:45:29 -0000 1.2 @@ -117,7 +117,8 @@ workflow_actions a, workflow_case_role_party_map crpm, parties p - where cas.object_id = b.bug_id + where b.project_id = :package_id + and cas.object_id = b.bug_id and (a.always_enabled_p = 't' or exists (select 1 from workflow_fsm_action_en_in_st aeis Index: openacs-4/packages/bug-tracker/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/Attic/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/index-postgresql.xql 5 Mar 2003 17:41:04 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/index-postgresql.xql 28 Aug 2003 09:45:29 -0000 1.2 @@ -111,7 +111,8 @@ workflow_actions a, workflow_case_role_party_map crpm, parties p - where cas.object_id = b.bug_id + where b.project_id = :package_id + and cas.object_id = b.bug_id and (a.always_enabled_p = 't' or exists (select 1 from workflow_fsm_action_en_in_st aeis Index: openacs-4/packages/bug-tracker/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/index.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/www/index.adp 22 May 2003 14:24:00 -0000 1.6 +++ openacs-4/packages/bug-tracker/www/index.adp 28 Aug 2003 09:45:29 -0000 1.7 @@ -1,6 +1,6 @@ -@project_name;noquote@ -@context_bar;noquote@ +@project_name@ +@context_bar@
@@ -53,7 +53,7 @@
-
+
Order by:
Index: openacs-4/packages/bug-tracker/www/notifications.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/notifications.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/notifications.tcl 5 Mar 2003 17:41:04 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/notifications.tcl 28 Aug 2003 09:45:29 -0000 1.2 @@ -21,7 +21,7 @@ } set user_id [ad_conn user_id] -set return_url [util_get_current_url] +set return_url [ad_return_url] multirow create notifications url label title subscribed_p Index: openacs-4/packages/bug-tracker/www/patch-add.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-add.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/patch-add.adp 22 May 2003 14:24:00 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/patch-add.adp 28 Aug 2003 09:45:29 -0000 1.5 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context@ patch.summary
@@ -11,4 +11,4 @@
- + Index: openacs-4/packages/bug-tracker/www/patch-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-add.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/patch-add.tcl 5 Mar 2003 17:41:04 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/patch-add.tcl 28 Aug 2003 09:45:29 -0000 1.8 @@ -31,7 +31,7 @@ set package_id [ad_conn package_id] set package_key [ad_conn package_key] set page_title "New Patch" -set context_bar [ad_context_bar $page_title] +set context [list $page_title] set user_id [ad_conn user_id] # Is this project using multiple versions? Index: openacs-4/packages/bug-tracker/www/patch-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/patch-list.adp 22 May 2003 14:24:00 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/patch-list.adp 28 Aug 2003 09:45:29 -0000 1.5 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context@

Component: [ Index: openacs-4/packages/bug-tracker/www/patch-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch-list.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/patch-list.tcl 16 Jan 2003 13:43:58 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/patch-list.tcl 28 Aug 2003 09:45:29 -0000 1.4 @@ -15,7 +15,7 @@ set user_id [ad_conn user_id] set page_title "Patches" -set context_bar [ad_context_bar $page_title] +set context [list $page_title] # Create the component filter set component_filter_list [list] Index: openacs-4/packages/bug-tracker/www/patch.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/patch.adp 22 May 2003 14:24:00 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/patch.adp 28 Aug 2003 09:45:29 -0000 1.4 @@ -1,8 +1,8 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context@ - +

@@ -17,8 +17,7 @@

- - +

Download patch content Index: openacs-4/packages/bug-tracker/www/patch.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/patch.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/patch.tcl 5 Mar 2003 17:41:04 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/patch.tcl 28 Aug 2003 09:45:29 -0000 1.3 @@ -154,7 +154,7 @@ -label "Patch #" element create patch component_id \ - -datatype integer \ + -datatype text \ -widget [ad_decode [info exists field_editable_p(component_id)] 1 select inform] \ -label "Component" \ -options [bug_tracker::components_get_options] @@ -255,7 +255,7 @@ -value $mode set page_title "Patch #$patch_number" -set context_bar [ad_context_bar $page_title] +set context [list $page_title] if { [form is_request patch] } { # The form was requested @@ -311,6 +311,8 @@ element set_properties patch applied_to_version \ -value [ad_decode [info exists field_editable_p(applied_to_version)] 1 $patch(applied_to_version) $patch(applied_to_version_name)] + set deleted_p [string equal $patch(status) deleted] + if { ( [string equal $patch(status) open] && ![string equal $mode "accept"]) || [string equal $patch(status) "refused"] } { element set_properties patch applied_to_version -widget hidden } Index: openacs-4/packages/bug-tracker/www/prefs.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/prefs.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/prefs.adp 22 May 2003 14:24:00 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/prefs.adp 28 Aug 2003 09:45:29 -0000 1.4 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context@ prefs.user_version - + Index: openacs-4/packages/bug-tracker/www/prefs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/prefs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/www/prefs.tcl 5 Mar 2003 17:41:04 -0000 1.8 +++ openacs-4/packages/bug-tracker/www/prefs.tcl 28 Aug 2003 09:45:29 -0000 1.9 @@ -21,24 +21,25 @@ set page_title "Your Preferences" -set context_bar [ad_context_bar $page_title] +set context [list $page_title] set user_id [ad_conn user_id] ad_form -name prefs -cancel_url $return_url -form { - {user_version:integer(select) + {user_version:integer(select),optional {label "Your version"} {options {[bug_tracker::version_get_options -include_unknown]}} - optional } {return_url:text(hidden) {value $return_url} } -} -select_query { - select user_version - from prefs - where user_id = :user_id - and project_id = :package_id +} -on_request { + db_0or1row select_data { + select user_version + from bt_user_prefs + where user_id = :user_id + and project_id = :package_id + } } -after_submit { set user_version [element get_value prefs user_version] db_dml update_row { Index: openacs-4/packages/bug-tracker/www/admin/categories.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/categories.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/categories.adp 22 May 2003 14:24:26 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/categories.adp 28 Aug 2003 09:45:30 -0000 1.3 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@

Index: openacs-4/packages/bug-tracker/www/admin/category-defaults.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/category-defaults.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/category-defaults.adp 22 May 2003 14:24:26 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/category-defaults.adp 28 Aug 2003 09:45:30 -0000 1.3 @@ -1,5 +1,5 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@ Index: openacs-4/packages/bug-tracker/www/admin/category-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/category-delete.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/admin/category-delete.tcl 5 Mar 2003 17:41:17 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/admin/category-delete.tcl 28 Aug 2003 09:45:30 -0000 1.2 @@ -4,6 +4,9 @@ keyword_id:integer } -db_exec_plsql delete_keyword { } +cr::keyword::delete \ + -keyword_id $keyword_id +bug_tracker::get_keywords_flush + ad_returnredirect categories Index: openacs-4/packages/bug-tracker/www/admin/category-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/category-edit.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/category-edit.adp 22 May 2003 14:24:26 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/category-edit.adp 28 Aug 2003 09:45:30 -0000 1.3 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@ keyword.heading Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/www/admin/component-ae-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bug-tracker/www/admin/component-ae-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/bug-tracker/www/admin/component-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/component-ae.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/component-ae.adp 22 May 2003 14:24:26 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/component-ae.adp 28 Aug 2003 09:45:30 -0000 1.4 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context;noquote@ +@page_title@ +@context@ component.name Index: openacs-4/packages/bug-tracker/www/admin/component-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/component-ae.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bug-tracker/www/admin/component-ae.tcl 5 Mar 2003 17:41:17 -0000 1.8 +++ openacs-4/packages/bug-tracker/www/admin/component-ae.tcl 28 Aug 2003 09:45:30 -0000 1.9 @@ -23,23 +23,15 @@ {component_id:key(acs_object_id_seq)} {return_url:text(hidden) {value $return_url}} {name:text {html { size 50 }} {label "[bug_tracker::conn Component] Name"}} - {description:text(hidden) {label {Description}} optional {html { cols 50 rows 8 }}} - {url_name:text {html { size 50 }} {label {Name in shortcut URL}} optional + {description:text(hidden),optional {label {Description}} {html { cols 50 rows 8 }}} + {url_name:text,optional {html { size 50 }} {label {Name in shortcut URL}} {help_text "You can filter by this [bug_tracker::conn component] by viisting [ad_conn package_url]com/this-name/"} } - {maintainer:search + {maintainer:search,optional {result_datatype integer} {label "Maintainer"} {options [bug_tracker::users_get_options]} - optional - {search_query - { - select distinct u.first_names || ' ' || u.last_name || ' (' || u.email || ')' as name, u.user_id - from cc_users u - where upper(coalesce(u.first_names || ' ', '') || coalesce(u.last_name || ' ', '') || u.email || ' ' || coalesce(u.screen_name, '')) like upper('%'||:value||'%') - order by name - } - } + {search_query {[db_map user_search]}} } } -select_query { select component_id, Index: openacs-4/packages/bug-tracker/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/index.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bug-tracker/www/admin/index.adp 22 May 2003 14:24:26 -0000 1.4 +++ openacs-4/packages/bug-tracker/www/admin/index.adp 28 Aug 2003 09:45:30 -0000 1.5 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@
Index: openacs-4/packages/bug-tracker/www/admin/initial-setup.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/initial-setup.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/initial-setup.adp 22 May 2003 14:24:26 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/initial-setup.adp 28 Aug 2003 09:45:30 -0000 1.3 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@

Choose your project's initial configuration. Index: openacs-4/packages/bug-tracker/www/admin/project-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/project-edit.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/project-edit.adp 22 May 2003 14:24:26 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/project-edit.adp 28 Aug 2003 09:45:30 -0000 1.4 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context;noquote@ +@page_title@ +@context@ project.name Index: openacs-4/packages/bug-tracker/www/admin/project-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/project-edit.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/admin/project-edit.tcl 5 Mar 2003 17:41:17 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/admin/project-edit.tcl 28 Aug 2003 09:45:30 -0000 1.8 @@ -20,18 +20,17 @@ {name:text {html { size 50 }} {label "Project Name"} {help_text {This is also the name of this package in the site map}} } - {description:text(hidden) {label "Description"} optional {html { cols 50 rows 8 }} + {description:text(hidden),optional {label "Description"} {html { cols 50 rows 8 }} {help_text {This isn't actually used anywhere at this point. Sorry.}} } - {email_subject_name:text {html { size 50 }} {label "Notification tag"} optional + {email_subject_name:text,optional {html { size 50 }} {label "Notification tag"} {help_text {This text will be included in square brackets at the beginning of all notifications, for example \[OpenACS Bugs\]}} } - {maintainer:search + {maintainer:search,optional {result_datatype integer} {label {Project Maintainer}} {options [bug_tracker::users_get_options]} - optional - {search_query_name project_search} + {search_query {[db_map dbqd.acs-tcl.tcl.community-core-procs.user_search]}} } } -select_query_name project_select -edit_data { db_transaction { Index: openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.adp 22 May 2003 14:24:26 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.adp 28 Aug 2003 09:45:30 -0000 1.4 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context;noquote@ +@page_title@ +@context@ project_maintainer.maintainer Index: openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.tcl 5 Mar 2003 17:41:17 -0000 1.7 +++ openacs-4/packages/bug-tracker/www/admin/project-maintainer-edit.tcl 28 Aug 2003 09:45:30 -0000 1.8 @@ -16,11 +16,10 @@ ad_form -name project_maintainer -cancel_url $return_url -form { {return_url:text(hidden) {value $return_url}} - {maintainer:search + {maintainer:search,optional {result_datatype integer} {label {Project Maintainer}} {options [bug_tracker::users_get_options]} - optional {search_query { select distinct u.first_names || ' ' || u.last_name || ' (' || u.email || ')' as name, u.user_id Index: openacs-4/packages/bug-tracker/www/admin/version-ae-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/Attic/version-ae-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/version-ae-oracle.xql 28 Mar 2003 15:15:16 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/version-ae-oracle.xql 28 Aug 2003 09:45:30 -0000 1.3 @@ -3,17 +3,16 @@ oracle8.1.6 - + select distinct u.first_names || ' ' || u.last_name || ' (' || u.email || ')' as name, u.user_id from cc_users u - where upper(coalesce(u.first_names || ' ', '') || + where upper(nvl(u.first_names || ' ', '') || nvl(u.last_name || ' ', '') || u.email || ' ' || nvl(u.screen_name, '')) like upper('%'||:value||'%') order by name - Index: openacs-4/packages/bug-tracker/www/admin/version-ae-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/Attic/version-ae-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/admin/version-ae-postgresql.xql 5 Mar 2003 17:41:17 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/admin/version-ae-postgresql.xql 28 Aug 2003 09:45:30 -0000 1.2 @@ -3,7 +3,7 @@ postgresql7.1 - + select distinct u.first_names || ' ' || u.last_name || ' (' || u.email || ')' as name, u.user_id from cc_users u Index: openacs-4/packages/bug-tracker/www/admin/version-ae.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/version-ae.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/version-ae.adp 22 May 2003 14:24:26 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/version-ae.adp 28 Aug 2003 09:45:30 -0000 1.4 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context;noquote@ +@page_title@ +@context@ version.version_name Index: openacs-4/packages/bug-tracker/www/admin/version-ae.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/version-ae.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/bug-tracker/www/admin/version-ae.tcl 5 Mar 2003 17:41:17 -0000 1.6 +++ openacs-4/packages/bug-tracker/www/admin/version-ae.tcl 28 Aug 2003 09:45:30 -0000 1.7 @@ -20,14 +20,13 @@ ad_form -name version -cancel_url $return_url -form { {version_id:key(acs_object_id_seq)} {version_name:text {label "Version name"} {html { size 50 }}} - {description:text(textarea) {label "Description"} optional {html { cols 50 rows 8 }}} - {supported_platforms:text {label "Supported platforms"} {html { size 50 }} optional} - {maintainer:search + {description:text(textarea),optional {label "Description"} {html { cols 50 rows 8 }}} + {supported_platforms:text,optional {label "Supported platforms"} {html { size 50 }}} + {maintainer:search,optional {result_datatype integer} {label "Maintainer"} {options {[bug_tracker::users_get_options]}} - optional - {search_query_name version_search} + {search_query {[db_map user_search]}} } {anticipated_freeze_date:date,to_sql(sql_date),to_html(sql_date),optional {label "Anticipated freeze"} optional @@ -41,7 +40,7 @@ {actual_release_date:date,to_sql(sql_date),to_html(sql_date),optional {label "Actual release"} optional } - {assignable_p:text(radio) {label "Assignable?"} optional {options {{Yes t} {No f}}}} + {assignable_p:text(radio),optional {label "Assignable?"} {options {{Yes t} {No f}}}} {return_url:text(hidden) {value $return_url}} } -select_query_name version_select -new_request { set assignable_p "t" Index: openacs-4/packages/bug-tracker/www/admin/version-release.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/version-release.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bug-tracker/www/admin/version-release.adp 22 May 2003 14:24:26 -0000 1.2 +++ openacs-4/packages/bug-tracker/www/admin/version-release.adp 28 Aug 2003 09:45:30 -0000 1.3 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context;noquote@ +@page_title@ +@context@ version.actual_release_date Index: openacs-4/packages/bug-tracker/www/admin/version-release.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/version-release.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/admin/version-release.tcl 5 Mar 2003 17:41:17 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/admin/version-release.tcl 28 Aug 2003 09:45:30 -0000 1.2 @@ -11,9 +11,8 @@ ad_form -name version -cancel_url versions -form { version_id:key {version_name:text {mode display} {label "Version Name"}} - {anticipated_release_date:date,to_sql(sql_date),to_html(sql_date) + {anticipated_release_date:date,to_sql(sql_date),to_html(sql_date),optional {mode display} {label "Anticipated release date"} - optional } {actual_release_date:date,to_sql(sql_date),to_html(sql_date) {label "Actual release date"} Index: openacs-4/packages/bug-tracker/www/admin/versions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/admin/versions.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/bug-tracker/www/admin/versions.adp 22 May 2003 14:24:26 -0000 1.3 +++ openacs-4/packages/bug-tracker/www/admin/versions.adp 28 Aug 2003 09:45:30 -0000 1.4 @@ -1,8 +1,8 @@ -@ Versions -@context_bar;noquote@ +@project_name@ Versions +@context_bar@ -

Current Version

+

In Development

None @@ -61,9 +61,6 @@ -

- The current version is the currently being developed on. -

Future Versions

@@ -129,7 +126,7 @@ Add new version -

Past Versions

+

Already Released Versions

None Index: openacs-4/packages/bug-tracker/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bug-tracker/www/doc/index.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bug-tracker/www/doc/index.html 24 Sep 2002 08:38:28 -0000 1.1 +++ openacs-4/packages/bug-tracker/www/doc/index.html 28 Aug 2003 09:45:30 -0000 1.2 @@ -11,8 +11,20 @@
  • Specification
  • +

    Version History

    + +
      +
    • + 1.2d10 Upgraded to work with updated 'workflow' package, where we've renamed workflow_case__delete to + workflow_case_pkg__delete to avoid conflict with old 'acs-workflow' package. +
    • +
    • + 1.2 Updated to use new 'workflow' package, and to also be configurable as a ticket-tracker. +
    • +
    +
    lars@pinds.com
    - \ No newline at end of file + Index: openacs-4/packages/bulk-mail/bulk-mail.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/bulk-mail.info,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bulk-mail/bulk-mail.info 17 May 2003 10:19:06 -0000 1.4 +++ openacs-4/packages/bulk-mail/bulk-mail.info 28 Aug 2003 09:41:52 -0000 1.5 @@ -6,17 +6,16 @@ Bulk Mail f f + + + Yonatan Feldman + 2003-06-12 - - - oracle - postgresql - - Yonatan Feldman - - + + + Index: openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-create.sql 28 Aug 2003 09:41:52 -0000 1.2 @@ -18,12 +18,6 @@ default sysdate constraint bm_messages_send_date_nn not null, - sent_p char(1) - default 'f' - constraint bm_messages_sent_p_ck - check (sent_p in ('t', 'f')) - constraint bm_messages_sent_p_nn - not null, from_addr varchar(4000) constraint bm_messages_from_addr_nn not null, @@ -33,8 +27,14 @@ message clob constraint bm_messages_message_nn not null, - query varchar(4000) + query clob constraint bm_messages_query_nn + not null, + status varchar2(100) + default 'pending' + constraint bm_messages_status_ck + check (status in ('pending', 'sent')) + constraint bm_messages_status_nn not null ); Index: openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-package-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-package-create.sql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-package-create.sql 28 Aug 2003 09:41:52 -0000 1.2 @@ -13,7 +13,7 @@ package_id in bulk_mail_messages.package_id%TYPE, send_date in varchar default null, date_format in varchar default 'YYYY MM DD HH24 MI SS', - sent_p in bulk_mail_messages.sent_p%TYPE default 'f', + status in bulk_mail_messages.status%TYPE default 'pending', from_addr in bulk_mail_messages.from_addr%TYPE, subject in bulk_mail_messages.subject%TYPE default null, reply_to in bulk_mail_messages.reply_to%TYPE default null, @@ -42,7 +42,7 @@ package_id in bulk_mail_messages.package_id%TYPE, send_date in varchar default null, date_format in varchar default 'YYYY MM DD HH24 MI SS', - sent_p in bulk_mail_messages.sent_p%TYPE default 'f', + status in bulk_mail_messages.status%TYPE default 'pending', from_addr in bulk_mail_messages.from_addr%TYPE, subject in bulk_mail_messages.subject%TYPE default null, reply_to in bulk_mail_messages.reply_to%TYPE default null, @@ -78,12 +78,12 @@ insert into bulk_mail_messages (bulk_mail_id, package_id, - send_date, sent_p, + send_date, status, from_addr, subject, reply_to, extra_headers, message, query) values (v_bulk_mail_id, bulk_mail.new.package_id, - to_date(bulk_mail.new.send_date, bulk_mail.new.date_format), bulk_mail.new.sent_p, + to_date(bulk_mail.new.send_date, bulk_mail.new.date_format), bulk_mail.new.status, bulk_mail.new.from_addr, bulk_mail.new.subject, bulk_mail.new.reply_to, bulk_mail.new.extra_headers, bulk_mail.new.message, bulk_mail.new.query); Index: openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-views-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-views-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-views-create.sql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/sql/oracle/bulk-mail-views-create.sql 28 Aug 2003 09:41:52 -0000 1.2 @@ -9,10 +9,11 @@ as select bulk_mail_messages.* from bulk_mail_messages - where sent_p = 'f'; + where status = 'pending'; create or replace view bulk_mail_messages_sent as select bulk_mail_messages.* from bulk_mail_messages - where sent_p = 't'; + where status = 'sent'; + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/oracle/upgrade/upgrade-0.1a-0.2.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/oracle/upgrade/upgrade-0.3-0.4.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql 12 Jun 2002 13:53:13 -0000 1.2 +++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-create.sql 28 Aug 2003 09:41:52 -0000 1.3 @@ -16,7 +16,7 @@ references apm_packages (package_id) constraint bm_messages_package_id_nn not null, - send_date date + send_date timestamptz default now() constraint bm_messages_send_date_nn not null, @@ -33,9 +33,14 @@ message text constraint bm_messages_message_nn not null, - query varchar(4000) + query text constraint bm_messages_query_nn + not null, + status varchar(100) + default 'pending' + constraint bm_messages_status_nn not null + ); -- create a new object type Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-package-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-package-create.sql 17 May 2003 10:19:23 -0000 1.4 +++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-package-create.sql 28 Aug 2003 09:41:52 -0000 1.5 @@ -5,7 +5,7 @@ -- @version $Id$ -- -select define_function_args('bulk_mail__new','bulk_mail_id,package_id,send_date,date_format,sent_p;f,from_addr,subject,reply_to,extra_headers,message,query,creation_date;now(),creation_user,creation_ip,context_id'); +select define_function_args('bulk_mail__new','bulk_mail_id,package_id,send_date,date_format,status;pending,from_addr,subject,reply_to,extra_headers,message,query,creation_date;now(),creation_user,creation_ip,context_id'); create function bulk_mail__new (integer, integer, varchar, varchar, varchar, varchar, varchar, varchar, varchar, text, varchar, timestamptz, integer, varchar, integer) returns integer as ' @@ -14,7 +14,7 @@ bulk_mail__new__package_id alias for $2; bulk_mail__new__send_date alias for $3; -- default to null bulk_mail__new__date_format alias for $4; -- default to "YYYY MM DD HH24 MI SS" - bulk_mail__new__sent_p alias for $5; -- default to "f" + bulk_mail__new__status alias for $5; -- default to "pending" bulk_mail__new__from_addr alias for $6; bulk_mail__new__subject alias for $7; -- default to null bulk_mail__new__reply_to alias for $8; -- default to null @@ -28,7 +28,7 @@ v_bulk_mail_id integer; v_send_date varchar(4000); v_date_format varchar(4000); - v_sent_p boolean; + v_status varchar(100); begin v_bulk_mail_id := acs_object__new( @@ -51,20 +51,20 @@ into v_send_date; end if; - v_sent_p := bulk_mail__new__sent_p; - if v_sent_p is null then - v_sent_p := ''f''; + v_status := bulk_mail__new__status; + if v_status is null then + v_status := ''pending''; end if; insert into bulk_mail_messages (bulk_mail_id, package_id, - send_date, sent_p, + send_date, status, from_addr, subject, reply_to, extra_headers, message, query) values (v_bulk_mail_id, bulk_mail__new__package_id, - to_date(v_send_date, v_date_format), v_sent_p, + to_date(v_send_date, v_date_format), v_status, bulk_mail__new__from_addr, bulk_mail__new__subject, bulk_mail__new__reply_to, bulk_mail__new__extra_headers, bulk_mail__new__message, bulk_mail__new__query); Index: openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-views-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-views-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-views-create.sql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/sql/postgresql/bulk-mail-views-create.sql 28 Aug 2003 09:41:52 -0000 1.2 @@ -9,10 +9,10 @@ as select bulk_mail_messages.* from bulk_mail_messages - where sent_p = 'f'; + where status = 'pending'; create view bulk_mail_messages_sent as select bulk_mail_messages.* from bulk_mail_messages - where sent_p = 't'; + where status = 'sent'; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-0.1a-0.2.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-0.2-0.3.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/bulk-mail/sql/postgresql/upgrade/upgrade-0.3-0.4.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql 16 Jan 2003 13:44:51 -0000 1.2 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-oracle.xql 28 Aug 2003 09:41:53 -0000 1.3 @@ -22,8 +22,9 @@ select bulk_mail_messages.* from bulk_mail_messages - where bulk_mail_messages.sent_p = 'f' + where bulk_mail_messages.status = 'pending' and bulk_mail_messages.send_date <= sysdate + for update Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql 16 Jan 2003 13:44:51 -0000 1.2 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs-postgresql.xql 28 Aug 2003 09:41:53 -0000 1.3 @@ -21,8 +21,9 @@ select bulk_mail_messages.* from bulk_mail_messages - where bulk_mail_messages.sent_p = 'f' + where bulk_mail_messages.status = 'pending' and bulk_mail_messages.send_date <= now() + for update Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl 16 Jan 2003 13:44:51 -0000 1.5 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.tcl 28 Aug 2003 09:41:53 -0000 1.6 @@ -1,10 +1,10 @@ ad_library { - bulk mail procedure library + bulk_mail procedure library @author yon (yon@openforce.net) @creation-date 2002-05-07 - @cvs-id $Id$ + @version $Id$ } @@ -84,6 +84,7 @@ {-reply_to ""} {-extra_headers ""} {-message:required} + {-message_type ""} {-query:required} } { create a new bulk_mail message @@ -107,6 +108,7 @@ @param message the body of the email, can be overridden by a value selected in the query. will be interpolated with values from the query. + @param message_type - "text" or "html" (added by mohan) @param query a query that must select the email address to send to as 'email' and can select any other values that will be interpolated into the subject and message of the bulk_mail for @@ -155,8 +157,9 @@ ns_set put $extra_vars from_addr $from_addr ns_set put $extra_vars subject $subject ns_set put $extra_vars reply_to $reply_to - ns_set put $extra_vars extra_headers $extra_headers + ns_set put $extra_vars extra_headers "$extra_headers bulk-mail-type $message_type" ns_set put $extra_vars message $message + ns_set put $extra_vars message_type $message_type ns_set put $extra_vars query $query ns_set put $extra_vars context_id $package_id @@ -171,15 +174,17 @@ ns_log notice "bulk_mail::sweep starting" ## JCD: this transaction is misguided since any code - ## errors in any procs below would cause the messages + ## errors in any procs below would cause the messages ## already sent to be marked unsent. Also, it seems to - ## cause locking problems on oracle + ## cause locking problems on oracle ## (per Caroline Meeks ## http://openacs.org/bugtracker/openacs/bug?bug_number=93 #db_transaction { - foreach bulk_mail [db_list_of_ns_sets select_bulk_mails_to_send {}] { + #Although the message may change for each recipiant, it usually doesn't. We check by looking to see if message_old = the current messag. This is inicialized here for each bulk_mail. + set message_old "" + foreach recipient [db_list_of_ns_sets select_bulk_mail_recipients [ns_set get $bulk_mail query]] { # create a list of key, value pairs that will be used to @@ -225,18 +230,52 @@ set message [ns_set get $recipient message] } + # mohan's hack to fix the passing of message type for the + # mail. + # Comment: I have to ask Caroline or Andrew if itis ok to + # change bulk-mail datamodel to accomodate message_type. + + set extra_headers [util_list_to_ns_set [ns_set get $bulk_mail extra_headers]] + set message_type [ns_set get $extra_headers bulk-mail-type] + + # don't need this anymore and don't want to send it along + ns_set delkey $extra_headers bulk-mail-type + # interpolate the key, value pairs (as described above) # into the message body set message [interpolate -values $pairs -text $message] - # send the message reliably - acs_mail_lite::send \ - -to_addr [ns_set get $recipient email] \ - -from_addr $from_addr \ - -subject $subject \ - -body $message \ - -extraheaders [util_list_to_ns_set [ns_set get $bulk_mail extra_headers]] + if {$message_type == "html"} { + if {[string compare $message_old $message] != 0} { + # If this message is different then the last loop + # we set up the html and text messages. Note that + # ad_html_text_convert can get quite expensive, + # if you start sending different long html + # messages created by microsoft word to each of + # over 100 users, expect performance problems. + # the from to html closes any open tags. + set message_html [ad_html_text_convert -from html -to html $message] + # some mailers are chopping off the last few characters. + append message_html " " + set message_text [ad_html_text_convert -from html -to text $message] + set message_old $message + } + + set message_data [build_mime_message $message_text $message_html] + ns_set put $extra_headers MIME-Version [ns_set get $message_data MIME-Version] + ns_set put $extra_headers Content-ID [ns_set get $message_data Content-ID] + ns_set put $extra_headers Content-Type [ns_set get $message_data Content-Type] + set message [ns_set get $message_data body] + } + + # both html and plain messages can now be sent the same way + acs_mail_lite::send \ + -to_addr [ns_set get $recipient email] \ + -from_addr $from_addr \ + -subject $subject \ + -body $message \ + -extraheaders $extra_headers } # mark the bulk_mail as sent so that we don't process it again Index: openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/tcl/bulk-mail-procs.xql 28 Aug 2003 09:41:53 -0000 1.2 @@ -12,7 +12,7 @@ update bulk_mail_messages - set sent_p = 't' + set status = 'sent' where bulk_mail_id = :bulk_mail_id Index: openacs-4/packages/bulk-mail/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/www/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/bulk-mail/www/index.tcl 18 Nov 2002 18:01:15 -0000 1.9 +++ openacs-4/packages/bulk-mail/www/index.tcl 28 Aug 2003 09:41:53 -0000 1.10 @@ -20,11 +20,11 @@ set context [list All] set table_def [list \ - [list send_date "[_ bulk-mail.Send_Date]" {bulk_mail_messages.send_date $order} {[lc_time_fmt $send_date "%q"]}] \ - [list from_addr "[_ bulk-mail.From]" {bulk_mail_messages.from_addr $order} {$from_addr}] \ - [list subject "[_ bulk-mail.Subject]" {bulk_mail_messages.subject $order} {$subject}] \ - [list sent_p "[_ bulk-mail.Sent]" {bulk_mail_messages.sent_p $order} {[ad_decode $sent_p t [_ bulk-mail.Yes] [_ bulk-mail.No]]}] \ -] + [list send_date [_ bulk-mail.Send_Date] {bulk_mail_messages.send_date $order} {[lc_time_fmt $send_date "%q"]}] \ + [list from_addr [_ bulk-mail.From] {bulk_mail_messages.from_addr $order} {$from_addr}] \ + [list subject [_ bulk-mail.Subject] {bulk_mail_messages.subject $order} {$subject}] \ + [list status [_ bulk-mail.Sent] {bulk_mail_messages.status $order} {[ad_decode $status sent [_ bulk-mail.Yes] [_ bulk-mail.No]]}] \ + ] set sql " select bulk_mail_messages.* Index: openacs-4/packages/bulk-mail/www/one.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/www/one.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/bulk-mail/www/one.adp 22 May 2003 14:25:02 -0000 1.8 +++ openacs-4/packages/bulk-mail/www/one.adp 28 Aug 2003 09:41:53 -0000 1.9 @@ -33,7 +33,7 @@ #bulk-mail.Sent# - #bulk-mail.Yes##bulk-mail.No# + #bulk-mail.Yes##bulk-mail.No# Index: openacs-4/packages/bulk-mail/www/one.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/bulk-mail/www/one.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/bulk-mail/www/one.xql 15 May 2002 22:07:52 -0000 1.1 +++ openacs-4/packages/bulk-mail/www/one.xql 28 Aug 2003 09:41:53 -0000 1.2 @@ -6,7 +6,7 @@ select bulk_mail_messages.bulk_mail_id, to_char(bulk_mail_messages.send_date, 'Mon DD YYYY HH24:MI') as send_date, - bulk_mail_messages.sent_p, + bulk_mail_messages.status, bulk_mail_messages.from_addr, bulk_mail_messages.subject, bulk_mail_messages.reply_to, Index: openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql 26 May 2002 04:36:49 -0000 1.4 +++ openacs-4/packages/ecommerce/tcl/ecommerce-email-procs.xql 28 Aug 2003 09:41:53 -0000 1.5 @@ -2,25 +2,26 @@ - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id = 1 - + select ep.email_on_purchase_list, ep.product_name from ec_items ei, ec_products ep where ei.product_id = ep.product_id and ei.order_id = :order_id + and email_on_purchase_list is not null group by ep.email_on_purchase_list, ep.product_name - + select u.email, u.user_id from ec_orders, cc_users u @@ -29,15 +30,15 @@ - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id = 3 - + select u.email, u.user_id, s.shipment_date, s.address_id, o.order_state, o.order_id from ec_orders o, cc_users u, ec_shipments s @@ -47,7 +48,7 @@ - + select p.product_name, p.one_line_description, p.product_id, i.price_charged, i.price_name, count(*) as quantity from ec_items i, ec_products p @@ -57,15 +58,15 @@ - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id = 2 - + select g.purchased_by as user_id, u.email, g.recipient_email, g.amount from ec_gift_certificates g, cc_users u @@ -74,15 +75,15 @@ - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id = 4 - + select g.purchased_by as user_id, u.email, g.recipient_email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message from ec_gift_certificates g, cc_users u @@ -91,43 +92,43 @@ - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id = 6 - + select g.recipient_email as email, g.amount, g.certificate_to, g.certificate_from, g.certificate_message, g.claim_check from ec_gift_certificates g where g.gift_certificate_id=:gift_certificate_id - + select subject as email_subject, message as email_body, issue_type_list from ec_email_templates where email_template_id=5 - + select user_id from cc_users where email=lower(:email) - + select user_identification_id from ec_user_identification where email=lower(:email) - + insert into ec_user_identification (user_identification_id, email) Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs-oracle.xql,v diff -u -r1.10 -r1.11 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs-oracle.xql 23 Sep 2002 20:43:26 -0000 1.10 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs-oracle.xql 28 Aug 2003 09:41:53 -0000 1.11 @@ -40,6 +40,14 @@ + + + select category_id, subcategory_id, subsubcategory_id, product_id + from ($common_sql) as dummy + where rownum < 2 + + + select decode(sign(sysdate-available_date),1,1,null,1,0) as available_p, Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql 16 Jan 2003 13:46:35 -0000 1.11 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs-postgresql.xql 28 Aug 2003 09:41:53 -0000 1.12 @@ -40,6 +40,14 @@ + + + select category_id, subcategory_id, subsubcategory_id, product_id + from ($common_sql) as dummy + limit 1 + + + select case when current_timestamp > available_date then 1 when current_timestamp-available_date is NULL then 1 else 0 end as available_p, Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 3 Oct 2002 17:31:35 -0000 1.19 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.tcl 28 Aug 2003 09:41:53 -0000 1.20 @@ -367,46 +367,25 @@ } } -# returns a link for the user to add him/herself to the mailing list for whatever category/ -# subcategory/subsubcategory a product is in. -# If the product is multiply categorized, this will just use the first categorization that -# Oracle finds for this product. ad_proc ec_mailing_list_link_for_a_product { product_id } { -returns a link for the user to add him/herself to the mailing list for whatever category/subcategory/subsubcategory a product is in. -If the product is multiply categorized, this will just use the first categorization that Oracle finds for this product. + + Returns a link for the user to add him/herself to the mailing + list for whatever category/subcategory/subsubcategory a product + is in. If the product is multiply categorized, this will just + use the first categorization that the DB finds for this product. + } { set category_id "" set subcategory_id "" set subsubcategory_id "" - db_foreach category_id_select { - select category_id from ec_category_product_map where product_id = :product_id - } { - - db_foreach subcategory_id_select { - select s.subcategory_id - from ec_subcategory_product_map m, - ec_subcategories s - where m.subcategory_id = s.subcategory_id - and s.category_id = :category_id - and m.product_id = :product_id - } { - - db_foreach subsubcategory_id_select { - select ss.subsubcategory_id - from ec_subsubcategory_product_map m, - ec_subsubcategories ss - where m.subsubcategory_id = ss.subsubcategory_id - and ss.subcategory_id = :subcategory_id - and m.product_id = :product_id - } { } - } - } + set common_sql [db_map mailing_categories_common] + db_0or1row mailing_categories {} if { ![empty_string_p $category_id] || ![empty_string_p $subcategory_id] || ![empty_string_p $subsubcategory_id] } { - return "Add yourself to the [ec_full_categorization_display $category_id $subcategory_id $subsubcategory_id] mailing list!" + return "Add yourself to the [ec_full_categorization_display $category_id $subcategory_id $subsubcategory_id] mailing list!" } else { - return "" + return "" } } @@ -563,7 +542,8 @@ $end_of_comment_query " { - append comments_to_print "$email rated this product [ec_display_rating $rating] on $last_modified_pretty and wrote:
    + array set person [person::get -person_id $user_id] + append comments_to_print "$person(first_names) $person(last_name) rated this product [ec_display_rating $rating] on $last_modified_pretty and wrote:
    $one_line_summary
    $user_comment

    Index: openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 26 May 2002 04:36:49 -0000 1.6 +++ openacs-4/packages/ecommerce/tcl/ecommerce-procs.xql 28 Aug 2003 09:41:53 -0000 1.7 @@ -151,15 +151,24 @@ - + - select ss.subsubcategory_id - from ec_subsubcategory_product_map m, ec_subsubcategories ss - where m.subsubcategory_id = ss.subsubcategory_id - and ss.subcategory_id = :subcategory_id - and m.product_id = :product_id + (select cpm.category_id, bla.subcategory_id, cpm.product_id + from ec_category_product_map cpm + left join (select sc.category_id, spm.subcategory_id, spm.product_id + from ec_subcategory_product_map spm, ec_subcategories sc + where sc.subcategory_id = spm.subcategory_id) as bla + using (category_id, product_id) + where cpm.product_id = :product_id + ) as bogus + left join (select sc.category_id, ssc.subcategory_id, sspm.subsubcategory_id, sspm.product_id + from ec_subsubcategory_product_map sspm, ec_subcategories sc, ec_subsubcategories ssc + where sspm.subsubcategory_id = ssc.subsubcategory_id + and ssc.subcategory_id = sc.subcategory_id + ) as boring + using (category_id, subcategory_id, product_id) - + Index: openacs-4/packages/ecommerce/www/admin/products/edit-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/edit-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/ecommerce/www/admin/products/edit-2.tcl 10 Sep 2002 22:22:45 -0000 1.3 +++ openacs-4/packages/ecommerce/www/admin/products/edit-2.tcl 28 Aug 2003 09:41:53 -0000 1.4 @@ -451,7 +451,7 @@ " # also need to export custom field values -db_foreach custom_fields_select "select field_identifier from ec_custom_product_fields where active_p='t'" { +db_foreach custom_fields_export "select field_identifier from ec_custom_product_fields where active_p='t'" { if { [info exists ec_custom_fields($field_identifier)] } { doc_body_append "\n" } Index: openacs-4/packages/ecommerce/www/admin/products/edit-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ecommerce/www/admin/products/edit-2.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ecommerce/www/admin/products/edit-2.xql 10 Jul 2001 20:33:53 -0000 1.1 +++ openacs-4/packages/ecommerce/www/admin/products/edit-2.xql 28 Aug 2003 09:41:53 -0000 1.2 @@ -45,7 +45,7 @@ - + select field_identifier from ec_custom_product_fields where active_p='t' Index: openacs-4/packages/edit-this-page/sql/oracle/edit-this-page-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/sql/oracle/edit-this-page-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/edit-this-page/sql/oracle/edit-this-page-create.sql 17 May 2003 10:30:52 -0000 1.7 +++ openacs-4/packages/edit-this-page/sql/oracle/edit-this-page-create.sql 28 Aug 2003 09:41:53 -0000 1.8 @@ -442,3 +442,19 @@ end; / show errors; + + +-- create a default content_type etp_page_revision +-- DaveB +-- this references a non-existant table +-- which I might have to change... + +select content_type__create_type ( + content_type => 'etp_page_revision', -- content_type + supertype => 'content_revision', -- supertype + pretty_name => 'ETP managed page', -- pretty_name + pretty_plural => 'ETP managed pages', -- pretty_plural + table_name => 'etp_page_revisions', -- table_name + id_column => 'etp_page_revision_id', -- id_column + name_method => 'content_revision__revision_name' -- name_method +); Index: openacs-4/packages/edit-this-page/tcl/etp-sc-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/edit-this-page/tcl/etp-sc-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/edit-this-page/tcl/etp-sc-procs-postgresql.xql 4 Apr 2003 15:20:28 -0000 1.2 +++ openacs-4/packages/edit-this-page/tcl/etp-sc-procs-postgresql.xql 28 Aug 2003 09:41:53 -0000 1.3 @@ -24,7 +24,7 @@ 'FtsContentProvider', -- impl_contract_name :content_type, -- impl_name 'datasource', -- impl_operation_name - 'etp_page_revision__datasource', -- impl_alias + 'etp::revision_datasource', -- impl_alias 'TCL' -- impl_pl ) @@ -36,7 +36,7 @@ 'FtsContentProvider', -- impl_contract_name :content_type, -- impl_name 'url', -- impl_operation_name - 'etp_page_revision__url', -- impl_alias + 'etp::revision_url', -- impl_alias 'TCL' -- impl_pl ); Index: openacs-4/packages/file-storage/sql/oracle/file-storage-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/oracle/file-storage-package-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/file-storage/sql/oracle/file-storage-package-create.sql 17 May 2003 10:37:05 -0000 1.5 +++ openacs-4/packages/file-storage/sql/oracle/file-storage-package-create.sql 28 Aug 2003 09:41:53 -0000 1.6 @@ -75,7 +75,9 @@ -- Move a file, and all its versions, to a new folder -- file_id in cr_items.item_id%TYPE, - target_folder_id in cr_items.parent_id%TYPE + target_folder_id in cr_items.parent_id%TYPE, + creation_user in acs_objects.creation_user%TYPE, + creation_ip in acs_objects.creation_ip%TYPE ); function get_title( @@ -305,7 +307,7 @@ ); end if; - acs_object.update_last_modified(file_storage.new_file.folder_id); + acs_object.update_last_modified(file_storage.new_file.folder_id,new_file.creation_user,new_file.creation_ip); return v_item_id; end new_file; @@ -400,7 +402,7 @@ content_length = v_content_length where revision_id = v_new_version_id; - acs_object.update_last_modified(file_storage.copy_file.target_folder_id); + acs_object.update_last_modified(file_storage.copy_file.target_folder_id,file_storage.copy_file.creation_user,file_storage.copy_file.creation_ip); return v_new_version_id; end copy_file; @@ -410,7 +412,9 @@ -- Move a file, and all its versions, to a new folder -- file_id in cr_items.item_id%TYPE, - target_folder_id in cr_items.parent_id%TYPE + target_folder_id in cr_items.parent_id%TYPE, + creation_user in acs_objects.creation_user%TYPE, + creation_ip in acs_objects.creation_ip%TYPE ) is begin @@ -419,7 +423,7 @@ target_folder_id => file_storage.move_file.target_folder_id ); - acs_object.update_last_modified(file_storage.move_file.target_folder_id); + acs_object.update_last_modified(file_storage.move_file.target_folder_id,file_storage.move_file.creation_user,file_storage.move_file.creation_ip); end; @@ -457,7 +461,7 @@ from cr_items where cr_items.item_id = file_storage.new_version.item_id; - acs_object.update_last_modified(v_folder_id); + acs_object.update_last_modified(v_folder_id,new_version.creation_user,new_version.creation_ip); return v_revision_id; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/sql/oracle/upgrade/upgrade-4.6.2-4.6.3.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql 17 May 2003 10:38:11 -0000 1.9 +++ openacs-4/packages/file-storage/sql/postgresql/file-storage-package-create.sql 28 Aug 2003 09:41:53 -0000 1.10 @@ -225,7 +225,7 @@ end if; - perform acs_object__update_last_modified(new_file__folder_id); + perform acs_object__update_last_modified(new_file__folder_id,new_file__user_id,new_file__creation_ip); return v_item_id; @@ -392,7 +392,7 @@ end if; - perform acs_object__update_last_modified(copy_file__target_folder_id); + perform acs_object__update_last_modified(copy_file__target_folder_id,copy_file__creation_user,copy_file__creation_ip); return v_new_version_id; @@ -410,14 +410,16 @@ declare move_file__file_id alias for $1; move_file__target_folder_id alias for $2; + move_file__creation_user alias for $3; + move_file__creation_ip alias for $4; begin perform content_item__move( move_file__file_id, -- item_id move_file__target_folder_id -- target_folder_id ); - perform acs_object__update_last_modified(move_file__target_folder_id); + perform acs_object__update_last_modified(move_file__target_folder_id,move_file__creation_user,move_file__creation_ip); return 0; end;' language 'plpgsql'; @@ -554,7 +556,7 @@ from cr_items where cr_items.item_id = new_version__item_id; - perform acs_object__update_last_modified(v_folder_id); + perform acs_object__update_last_modified(v_folder_id,new_version__creation_user,new_version__creation_ip); return v_revision_id; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-4.6.2-4.6.3.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/file-storage/www/file-move-2-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-move-2-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/file-move-2-oracle.xql 25 Sep 2001 16:52:03 -0000 1.2 +++ openacs-4/packages/file-storage/www/file-move-2-oracle.xql 28 Aug 2003 09:41:54 -0000 1.3 @@ -9,7 +9,9 @@ begin file_storage.move_file ( file_id => :file_id, - target_folder_id => :parent_id + target_folder_id => :parent_id, + creation_user => :user_id, + creation_ip => :address ); end; Index: openacs-4/packages/file-storage/www/file-move-2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-move-2-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/file-storage/www/file-move-2-postgresql.xql 25 Sep 2001 16:52:16 -0000 1.2 +++ openacs-4/packages/file-storage/www/file-move-2-postgresql.xql 28 Aug 2003 09:41:54 -0000 1.3 @@ -8,7 +8,9 @@ select file_storage__move_file ( :file_id, -- file_id - :parent_id -- target_folder_id + :parent_id, -- target_folder_id + :user_id, -- creation_user + :address -- creation_ip ); Index: openacs-4/packages/file-storage/www/file-move-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-move-2.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/file-storage/www/file-move-2.tcl 5 Nov 2002 17:19:59 -0000 1.7 +++ openacs-4/packages/file-storage/www/file-move-2.tcl 28 Aug 2003 09:41:54 -0000 1.8 @@ -26,13 +26,18 @@ ad_require_permission $file_id write ad_require_permission $parent_id write +set user_id [ad_conn user_id] +set address [ad_conn peeraddr] + db_transaction { db_exec_plsql file_move " begin file_storage.move_file ( file_id => :file_id, - target_folder_id => :parent_id + target_folder_id => :parent_id, + creation_user => :user_id, + creation_ip => :address: ); end;" 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 -r1.13 -r1.14 --- openacs-4/packages/file-storage/www/file.adp 13 Aug 2003 13:30:53 -0000 1.13 +++ openacs-4/packages/file-storage/www/file.adp 28 Aug 2003 09:41:54 -0000 1.14 @@ -38,7 +38,8 @@ - +Back to folder view +

    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 -r1.12 -r1.13 --- openacs-4/packages/file-storage/www/file.tcl 13 Aug 2003 11:14:35 -0000 1.12 +++ openacs-4/packages/file-storage/www/file.tcl 28 Aug 2003 09:41:54 -0000 1.13 @@ -63,11 +63,15 @@ set content_size_pretty [lc_numeric $content_size] } -if { [apm_package_installed_p "general-comments"] && [ad_parameter "GeneralCommentsP" -default 0] } { - set return_url "[ad_conn url]?file_id=$file_id" +set return_url "[ad_conn url]?file_id=$file_id" + +if { [apm_package_installed_p "general-comments"] && [ad_parameter "GeneralCommentsP" -package_id [ad_conn package_id]] } { set gc_link [general_comments_create_link $file_id $return_url] set gc_comments [general_comments_get_comments $file_id $return_url] } else { set gc_link "" set gc_comments "" } + +# get folder id so we can implement a back link +set folder_id [db_string get_folder ""] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/file-storage/www/file.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/forums/sql/postgresql/forums-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/sql/postgresql/forums-create.sql 1 Jun 2002 19:02:29 -0000 1.1 +++ openacs-4/packages/forums/sql/postgresql/forums-create.sql 28 Aug 2003 09:41:54 -0000 1.2 @@ -22,3 +22,6 @@ -- notifications \i forums-notifications-init.sql + +-- Search +\i forums-sc-create.sql Index: openacs-4/packages/forums/sql/postgresql/forums-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/sql/postgresql/forums-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/forums/sql/postgresql/forums-drop.sql 12 Jun 2002 15:24:02 -0000 1.1 +++ openacs-4/packages/forums/sql/postgresql/forums-drop.sql 28 Aug 2003 09:41:54 -0000 1.2 @@ -21,3 +21,6 @@ -- The basic forum constructs \i forums-forums-package-drop.sql \i forums-forums-drop.sql + +-- Search +\i forums-sc-drop.sql Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/forums/sql/postgresql/forums-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/forums/sql/postgresql/forums-sc-drop.sql'. Fisheye: No comparison available. Pass `N' to diff? 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.20 -r1.21 --- openacs-4/packages/forums/www/forum-view.adp 22 May 2003 14:56:35 -0000 1.20 +++ openacs-4/packages/forums/www/forum-view.adp 28 Aug 2003 09:41:54 -0000 1.21 @@ -62,7 +62,7 @@ - - + Index: openacs-4/packages/forums/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/index.adp,v diff -u -r1.19 -r1.20 --- openacs-4/packages/forums/www/index.adp 20 Jun 2003 15:24:24 -0000 1.19 +++ openacs-4/packages/forums/www/index.adp 28 Aug 2003 09:41:54 -0000 1.20 @@ -43,7 +43,7 @@ - - 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.17 -r1.18 --- openacs-4/packages/forums/www/message-chunk.adp 20 Jun 2003 15:24:24 -0000 1.17 +++ openacs-4/packages/forums/www/message-chunk.adp 28 Aug 2003 09:41:54 -0000 1.18 @@ -12,9 +12,9 @@ - - + @@ -47,10 +47,10 @@ - - + - + - + - Index: openacs-4/packages/wp-slim/www/create-presentation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/create-presentation.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/create-presentation.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/create-presentation.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -11,6 +11,25 @@ context:onevalue } +set package_id [ad_conn package_id] +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $package_id -privilege wp_create_presentation + +set items [db_list_of_lists wp_styles { *SQL* }] + + set names [list] + set values [list] + foreach image $items { + lappend names [lindex $image 1] + lappend values [lindex $image 0] + } + + lappend names "none" + lappend values -1 + + set available_styles "\n" + set title "Create Presentation" set context [list $title] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/create-presentation.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/delete-presentation-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-presentation-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/delete-presentation-2.tcl 18 Sep 2002 12:07:02 -0000 1.2 +++ openacs-4/packages/wp-slim/www/delete-presentation-2.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -18,7 +18,7 @@ if { [ad_check_password $user_id $password] } { db_exec_plsql delete_presentation { - begin + begin wp_presentation.delete(:pres_item_id); end; } @@ -27,4 +27,4 @@ ad_script_abort } -ad_returnredirect "" \ No newline at end of file +ad_returnredirect "" Index: openacs-4/packages/wp-slim/www/delete-slide-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-slide-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/delete-slide-2.tcl 4 Oct 2001 04:29:01 -0000 1.2 +++ openacs-4/packages/wp-slim/www/delete-slide-2.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -12,7 +12,11 @@ pres_item_id:naturalnum,notnull } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_delete_presentation + db_exec_plsql delete_slide { begin wp_slide.delete(:slide_item_id); Index: openacs-4/packages/wp-slim/www/delete-slide.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-slide.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/delete-slide.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/delete-slide.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -7,11 +7,10 @@ Are you sure that you want to delete this slide?
      -
    • Title: as -
    • Contents: +
    • Title: @slide_title@
    -

    \ No newline at end of file +

    Index: openacs-4/packages/wp-slim/www/delete-slide.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/delete-slide.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/delete-slide.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/delete-slide.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -10,9 +10,14 @@ } { slide_item_id:naturalnum,notnull pres_item_id:naturalnum,notnull + slide_title } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_delete_presentation + set context [list "Delete a Slide"] ad_return_template Index: openacs-4/packages/wp-slim/www/edit-presentation-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation-2.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/edit-presentation-2.tcl 10 Sep 2002 22:23:30 -0000 1.5 +++ openacs-4/packages/wp-slim/www/edit-presentation-2.tcl 28 Aug 2003 09:42:00 -0000 1.6 @@ -17,7 +17,10 @@ } +#added permission checking roc@ set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set creation_ip [ad_conn peeraddr] db_exec_plsql update_wp_presentation { Index: openacs-4/packages/wp-slim/www/edit-presentation-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/edit-presentation-oracle.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/edit-presentation-oracle.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -6,7 +6,7 @@ - select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, p.show_modified_p, wp_presentation.get_audience(:pres_item_id) as audience, wp_presentation.get_background(:pres_item_id) as background + select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, p.show_modified_p, wp_presentation.get_audience(:pres_item_id) as audience, wp_presentation.get_background(:pres_item_id) as background, style from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and i.live_revision = p.presentation_id @@ -15,4 +15,5 @@ + Index: openacs-4/packages/wp-slim/www/edit-presentation-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/edit-presentation-postgresql.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/edit-presentation-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -6,7 +6,7 @@ - select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, + select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, style, p.show_modified_p from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id @@ -36,5 +36,4 @@ - Index: openacs-4/packages/wp-slim/www/edit-presentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/edit-presentation.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/edit-presentation.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -21,7 +21,7 @@ - - + - + - + - +wp Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 6 Sep 2002 15:32:23 -0000 1.4 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 28 Aug 2003 09:42:00 -0000 1.5 @@ -25,6 +25,10 @@ ad_return_error "Wimpy Point" "Could not get a pres_item_id and a pres_revision_id out of url=$url" } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation + set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/serve-presentation-revision.xql 15 Nov 2001 01:47:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -6,9 +6,9 @@ select p.pres_title, p.page_signature, - p.copyright_notice, p.public_p, - p.show_modified_p + p.show_modified_p , + p.copyright_notice from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and p.presentation_id = :pres_revision_id Index: openacs-4/packages/wp-slim/www/serve-presentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/wp-slim/www/serve-presentation.adp 22 May 2003 15:18:55 -0000 1.7 +++ openacs-4/packages/wp-slim/www/serve-presentation.adp 28 Aug 2003 09:42:00 -0000 1.8 @@ -1,19 +1,30 @@ @pres_title;noquote@ "one presentation" +@style@ +@page_signature@ +@copyright_notice@
    @@ -59,7 +60,7 @@
    - @version.title@ + @version.title@ @version.author@ @version.content_size_pretty@
    + @@ -74,7 +74,7 @@ (@messages.state@) @messages.user_name@@messages.user_name@ @messages.n_messages@ @messages.last_child_post_pretty@
    + @@ -68,7 +68,7 @@
    + #forums.No_Forums#
    + @message.user_name@@message.posting_date_pretty@@message.posting_date_pretty@
    + - + 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.7 -r1.8 --- openacs-4/packages/forums/www/message-email.tcl 20 Jun 2003 15:24:24 -0000 1.7 +++ openacs-4/packages/forums/www/message-email.tcl 28 Aug 2003 09:41:54 -0000 1.8 @@ -44,10 +44,10 @@ # Get the data forum::message::get -message_id $message_id -array message - set new_body "$pre_body" + set new_body "[ad_html_to_text $pre_body]" append new_body "\n\n===================================\n\n" append new_body "[_ forums.On] $message(posting_date), $message(user_name) [_ forums.wrote]\n\n" - append new_body "$message(content)\n" + append new_body "[ad_html_to_text $message(content)]\n" # Send the email acs_mail_lite::send -to_addr $to_email \ 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 -r1.9 -r1.10 --- openacs-4/packages/forums/www/message-post-confirm.adp 22 May 2003 14:56:35 -0000 1.9 +++ openacs-4/packages/forums/www/message-post-confirm.adp 28 Aug 2003 09:41:54 -0000 1.10 @@ -37,7 +37,7 @@
    - + 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.10 -r1.11 --- openacs-4/packages/forums/www/message-view-flat.adp 22 May 2003 14:56:35 -0000 1.10 +++ openacs-4/packages/forums/www/message-view-flat.adp 28 Aug 2003 09:41:54 -0000 1.11 @@ -6,6 +6,14 @@ + + + + Index: openacs-4/packages/forums/www/message-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/forums/www/message-view.adp,v diff -u -r1.15 -r1.16 --- openacs-4/packages/forums/www/message-view.adp 22 May 2003 14:56:35 -0000 1.15 +++ openacs-4/packages/forums/www/message-view.adp 28 Aug 2003 09:41:54 -0000 1.16 @@ -9,6 +9,14 @@
    + Back to @forum.name@ + +   +
    @notification_chunk;noquote@
    + + + + -
    + Back to @forum.name@ + +   +
    @notification_chunk;noquote@ @@ -39,7 +47,7 @@ <% set width [expr 100 - [expr $responses(tree_level) - 1] * 3] %>
    + Index: openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql 8 Feb 2003 02:18:01 -0000 1.2 +++ openacs-4/packages/general-comments/tcl/general-comments-procs-postgresql.xql 28 Aug 2003 09:41:54 -0000 1.3 @@ -20,6 +20,7 @@ where g.object_id = :object_id and r.revision_id = content_item__get_live_revision(g.comment_id) and o.object_id = g.comment_id + $context_clause order by o.creation_date 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.8 -r1.9 --- openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 8 Feb 2003 02:18:01 -0000 1.8 +++ openacs-4/packages/general-comments/tcl/general-comments-procs.tcl 28 Aug 2003 09:41:54 -0000 1.9 @@ -18,6 +18,7 @@ ad_proc -public general_comments_get_comments { { -print_content_p 0 } { -print_attachments_p 0 } + {-context_id ""} object_id {return_url {}} } { @@ -26,6 +27,7 @@ @param print_content_p Pass in 1 to print out content of comments. @param print_attachments_p Pass in 1 to print out attachments of comments, only works if print_content_p is 1. + @param context_id Show only comments with given context_id @param object_id The object_id to retrieve the comments for. @param return_url A url for the user to return to after viewing a comment. } { @@ -44,24 +46,15 @@ set content_select [db_map content_select] ;# ", r.content" } # ns_log notice "content_select: $content_select" + + if { ![empty_string_p $context_id] } { + set context_clause "and o.context_id = :context_id" + } else { + set context_clause "" + } set html "" - db_foreach get_comments " - select g.comment_id, - r.title, - r.mime_type, - o.creation_user, - acs_object.name(o.creation_user) as author, - to_char(o.creation_date, 'MM-DD-YYYY') as pretty_date, - to_char(o.creation_date, 'Month DD, YYYY HH12:MI PM') as pretty_date2 - $content_select - from general_comments g, - cr_revisions r, - acs_objects o - where g.object_id = :object_id and - r.revision_id = content_item.get_live_revision(g.comment_id) and - o.object_id = g.comment_id - order by o.creation_date" { + db_foreach get_comments {} { # call on helper proc to print out comment append html [general_comments_print_comment $comment_id $title $mime_type \ $creation_user $author $pretty_date $pretty_date2 $content \ @@ -136,8 +129,6 @@ } if { ![empty_string_p $attachments_html] } { append html "
    [_ general-comments.Attachments]
    \n
      \n$attachments_html
    \n" - } else { - append html "

    " } } append html "

    -- $author [_ general-comments.on] $pretty_date2 ([_ general-comments.view_details])

    \n" 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.14 -r1.15 --- openacs-4/packages/lars-blogger/lars-blogger.info 30 Jan 2003 16:54:44 -0000 1.14 +++ openacs-4/packages/lars-blogger/lars-blogger.info 28 Aug 2003 09:41:54 -0000 1.15 @@ -2,128 +2,43 @@ - Lars Blogger - Lars Bloggers + Weblogger + Webloggers f f - - - - oracle - postgresql - + + Lars Pind + Simon Carstensen Write your own web log - 2003-01-30 + 2003-06-10 Collaboraid - Manages multiple web logs for your site. Just mount multiple instances, and you can do all the blogging you want. + Manages multiple weblogs for your wbsite. - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 27 Jan 2003 16:17:55 -0000 1.3 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-create.sql 28 Aug 2003 09:41:54 -0000 1.4 @@ -33,6 +33,7 @@ package_id constraint pinds_blog_entry_package_id_fk references apm_packages(package_id), title varchar(500), + title_url varchar(500), content clob, content_format varchar(50) default 'text/html' @@ -48,7 +49,37 @@ check (deleted_p in ('t','f')) ); +declare +begin + acs_object_type.create_type( + object_type => 'weblogger_channel', + pretty_name => 'Weblogger Channel', + pretty_plural => 'Weblogger Channels', + supertype => 'acs_object', + table_name => 'weblogger_channel', + id_column => 'channel_id', + package_name => null, + abstract_p => 'f', + type_extension_table => null, + name_method => null + ); +end; +/ +show errors +create table weblogger_channels ( + channel_id constraint weblogger_channels_cid_fk + references acs_objects(object_id) + constraint weblogger_channels_cid_pk + primary key, + package_id constraint weblogger_channels_pid_kf + references apm_packages(package_id), + user_id integer, + constraint weblogger_chnls_pck_user_un + unique (package_id, user_id) +); + + @@ lars-blogger-package-create @@ rss-register @@ notifications-init Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql 14 Sep 2002 21:43:33 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-drop.sql 28 Aug 2003 09:41:54 -0000 1.3 @@ -12,7 +12,15 @@ @@ rss-unregister begin + acs_object_type.drop_type('weblogger_channel', 't'); +end; +/ +show errors +drop table weblogger_channels; + +begin + for blog_entry in (select entry_id from pinds_blog_entries) loop -- delete comments (which are acs_message's) for comment in (select comment_id from general_comments @@ -23,15 +31,13 @@ pinds_blog_entry.delete(blog_entry.entry_id); end loop; - acs_object_type.drop_type( - object_type => 'pinds_blog_entry', - cascade_p => 't' - ); + acs_object_type.drop_type('pinds_blog_entry', 't'); end; / show errors + @@ lars-blogger-package-drop drop table pinds_blog_entries; Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 27 Jan 2003 16:17:55 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-create.sql 28 Aug 2003 09:41:54 -0000 1.3 @@ -14,6 +14,7 @@ entry_id in pinds_blog_entries.entry_id%TYPE default null, package_id in pinds_blog_entries.package_id%TYPE, title in pinds_blog_entries.title%TYPE default null, + title_url in pinds_blog_entries.title_url%TYPE default null, content in varchar default null, content_format in varchar default 'text/html', entry_date in pinds_blog_entries.entry_date%TYPE default null, @@ -41,6 +42,7 @@ entry_id in pinds_blog_entries.entry_id%TYPE default null, package_id in pinds_blog_entries.package_id%TYPE, title in pinds_blog_entries.title%TYPE default null, + title_url in pinds_blog_entries.title_url%TYPE default null, content in varchar default null, content_format in varchar default 'text/html', entry_date in pinds_blog_entries.entry_date%TYPE default null, @@ -65,6 +67,7 @@ entry_id, package_id, title, + title_url, content, content_format, entry_date, @@ -75,6 +78,7 @@ v_entry_id, pinds_blog_entry.new.package_id, pinds_blog_entry.new.title, + pinds_blog_entry.new.title_url, pinds_blog_entry.new.content, pinds_blog_entry.new.content_format, pinds_blog_entry.new.entry_date, @@ -123,3 +127,78 @@ end pinds_blog_entry; / show errors + +create or replace package weblogger_channel +as + + function new ( + channel_id in weblogger_channels.channel_id%TYPE default null, + package_id in weblogger_channels.package_id%TYPE, + user_id in weblogger_channels.user_id%TYPE default null, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return weblogger_channels.channel_id%TYPE; + + procedure delete ( + channel_id in weblogger_channels.channel_id%TYPE + ); + +end weblogger_channel; +/ +show errors + + +create or replace package body weblogger_channel +as + + function new ( + channel_id in weblogger_channels.channel_id%TYPE default null, + package_id in weblogger_channels.package_id%TYPE, + user_id in weblogger_channels.user_id%TYPE default null, + creation_user in acs_objects.creation_user%TYPE default null, + creation_ip in acs_objects.creation_ip%TYPE default null + ) return weblogger_channels.channel_id%TYPE + is + v_channel_id weblogger_channels.channel_id%TYPE; + begin + + v_channel_id := acs_object.new( + object_id => weblogger_channel.new.channel_id, + object_type => 'weblogger_channel', + creation_date => sysdate, + creation_user => weblogger_channel.new.creation_user, + creation_ip => weblogger_channel.new.creation_ip, + context_id => weblogger_channel.new.package_id + ); + + insert into weblogger_channels ( + channel_id, + package_id, + user_id + ) values ( + v_channel_id, + weblogger_channel.new.package_id, + weblogger_channel.new.user_id + ); + + return v_channel_id; + + end new; + + procedure delete ( + channel_id in weblogger_channels.channel_id%TYPE + ) + is + begin + + delete + from weblogger_channels + where channel_id = weblogger_channel.delete.channel_id; + + acs_object.delete(weblogger_channel.delete.channel_id); + + end delete; + +end weblogger_channel; +/ +show errors Index: openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/sql/oracle/lars-blogger-package-drop.sql 28 Aug 2003 09:41:54 -0000 1.2 @@ -7,5 +7,9 @@ -- @cvs-id $Id$ -- + +drop package body weblogger_channel; +drop package weblogger_channel; + drop package body pinds_blog_entry; drop package pinds_blog_entry; Index: openacs-4/packages/lars-blogger/sql/oracle/notifications-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/notifications-drop.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/sql/oracle/notifications-drop.sql 14 Sep 2002 21:43:33 -0000 1.1 +++ openacs-4/packages/lars-blogger/sql/oracle/notifications-drop.sql 28 Aug 2003 09:41:54 -0000 1.2 @@ -17,3 +17,5 @@ notification_type.delete(row.type_id); end loop; end; +/ +show errors Index: openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql 30 Jan 2003 16:55:03 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/oracle/rss-register.sql 28 Aug 2003 09:41:54 -0000 1.3 @@ -36,7 +36,7 @@ acs_sc_binding.new ( contract_name => 'RssGenerationSubscriber', impl_name => 'pinds_blog_entries' - ); + ); end; / Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/oracle/upgrade/upgrade-0.8.4-0.8.5.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/oracle/upgrade/upgrade-0.8.5-0.9.sql'. Fisheye: No comparison available. Pass `N' to diff? 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.5 -r1.6 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 27 Jan 2003 16:18:25 -0000 1.5 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-create.sql 28 Aug 2003 09:41:55 -0000 1.6 @@ -29,13 +29,14 @@ constraint pinds_blog_entry_package_id_kf references apm_packages(package_id), title varchar(500), + title_url varchar(500), content varchar(32000), content_format varchar(50) default 'text/html' constraint pinds_blog_entr_cnt_format_nn not null, - entry_date timestamp, - posted_date timestamp, + entry_date timestamptz, + posted_date timestamptz, draft_p char(1) default 'f' constraint pinds_blog_entries_draft_ck check (draft_p in ('t','f')), @@ -61,26 +62,28 @@ create or replace function pinds_blog_entry__new ( - integer, -- entry_id - integer, -- package_id - varchar, -- title - varchar, -- content - varchar, -- content_format - timestamp, -- entry_date - char, -- draft_p - integer, -- creation_user - varchar -- creation_ip + integer, -- entry_id + integer, -- package_id + varchar, -- title + varchar, -- title_url + varchar, -- content + varchar, -- content_format + timestamptz, -- entry_date + char, -- draft_p + integer, -- creation_user + varchar -- creation_ip ) returns integer as ' declare p_entry_id alias for $1; p_package_id alias for $2; p_title alias for $3; - p_content alias for $4; - p_content_format alias for $5; - p_entry_date alias for $6; - p_draft_p alias for $7; - p_creation_user alias for $8; - p_creation_ip alias for $9; + p_title_url alias for $4; + p_content alias for $5; + p_content_format alias for $6; + p_entry_date alias for $7; + p_draft_p alias for $8; + p_creation_user alias for $9; + p_creation_ip alias for $10; v_entry_id integer; begin v_entry_id := acs_object__new ( @@ -96,6 +99,7 @@ entry_id, package_id, title, + title_url, content, content_format, entry_date, @@ -106,6 +110,7 @@ v_entry_id, p_package_id, p_title, + p_title_url, p_content, p_content_format, p_entry_date, @@ -114,6 +119,12 @@ ''f'' ); + PERFORM acs_permission__grant_permission( + v_entry_id, + p_creation_user, + ''admin'' + ); + return v_entry_id; end; ' language 'plpgsql'; @@ -132,5 +143,84 @@ ' language 'plpgsql'; +select acs_object_type__create_type ( + 'weblogger_channel', -- object_type + 'Weblogger Channel', -- pretty_name + 'Weblogger Channels', -- pretty_plural + 'acs_object', -- supertype + 'weblogger_channels', -- table_name + 'channel_id', -- id_column + null, -- package_name + 'f', -- abstract_p + null, -- type_extension_table + null -- name_method +); + +create table weblogger_channels ( + channel_id integer + constraint channel_id_fk + references acs_objects(object_id) + constraint weblogger_channels_pk + primary key, + package_id integer + constraint weblogger_channels_package_id_kf + references apm_packages(package_id), + user_id integer, + constraint weblogger_chnls_package_user_un + unique (package_id, user_id) +); + + + +create or replace function weblogger_channel__new ( + integer, -- channel_id + integer, -- package_id + integer, -- user_id + integer, -- creation_user + varchar -- creation_ip +) returns integer as ' +declare + p_channel_id alias for $1; + p_package_id alias for $2; + p_user_id alias for $3; + p_creation_user alias for $4; + p_creation_ip alias for $5; + v_channel_id integer; +begin + v_channel_id := acs_object__new ( + p_channel_id, + ''weblogger_channel'', + current_timestamp, + p_creation_user, + p_creation_ip, + p_package_id + ); + + insert into weblogger_channels ( + channel_id, + package_id, + user_id + ) values ( + v_channel_id, + p_package_id, + p_user_id + ); + + return v_channel_id; +end; +' language 'plpgsql'; + +create or replace function weblogger_channel__delete (integer) +returns integer as ' +declare + p_channel_id alias for $1; +begin + delete from weblogger_channels + where channel_id = p_channel_id; + PERFORM acs_object__delete(p_channel_id); + return 0; +end; +' language 'plpgsql'; + \i rss-register.sql \i notifications-init.sql Index: openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 21 Dec 2002 22:27:58 -0000 1.3 +++ openacs-4/packages/lars-blogger/sql/postgresql/lars-blogger-drop.sql 28 Aug 2003 09:41:55 -0000 1.4 @@ -34,17 +34,31 @@ select inline_0(); drop function inline_0(); +drop function weblogger_channel__new( + integer, -- channel_id + integer, -- package_id + integer, -- user_id + integer, -- creation_user + varchar -- creation_ip +); +drop function weblogger_channel__delete (integer); + +drop table weblogger_channels; +select acs_object_type__drop_type ('weblogger_channel', true); + drop function pinds_blog_entry__title (integer); drop function pinds_blog_entry__new( - integer, -- entry_id - integer, -- package_id - varchar, -- title - varchar, -- content - timestamp, -- entry_date - char, -- draft_p - integer, -- creation_user - varchar -- creation_ip + integer, -- entry_id + integer, -- package_id + varchar, -- title + varchar, -- title_url + varchar, -- content + varchar, -- content_format + timestamptz, -- entry_date + char, -- draft_p + integer, -- creation_user + varchar -- creation_ip ); drop function pinds_blog_entry__delete (integer); Index: openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql 30 Jan 2003 16:55:50 -0000 1.2 +++ openacs-4/packages/lars-blogger/sql/postgresql/rss-register.sql 28 Aug 2003 09:41:55 -0000 1.3 @@ -6,45 +6,29 @@ -- @cvs-id $Id$ -- -create function inline_0() returns integer as ' -declare - impl_id integer; - v_foo integer; -begin - -- the notification type impl - impl_id := acs_sc_impl__new( - ''RssGenerationSubscriber'', -- impl_contract_name - ''pinds_blog_entries'', -- impl_name - ''lars-blogger'' -- impl_owner_name - ); +select acs_sc_impl__new( + 'RssGenerationSubscriber', -- impl_contract_name + 'pinds_blog_entries', -- impl_name + 'lars-blogger' -- impl_owner_name +); - v_foo := acs_sc_impl_alias__new( - ''RssGenerationSubscriber'', -- impl_contract_name - ''pinds_blog_entries'', -- impl_name - ''datasource'', -- impl_operation_name - ''lars_blog__rss_datasource'', -- impl_alias - ''TCL'' -- impl_pl - ); +select acs_sc_impl_alias__new( + 'RssGenerationSubscriber', -- impl_contract_name + 'pinds_blog_entries', -- impl_name + 'datasource', -- impl_operation_name + 'lars_blog__rss_datasource', -- impl_alias + 'TCL' -- impl_pl +); - v_foo := acs_sc_impl_alias__new( - ''RssGenerationSubscriber'', -- impl_contract_name - ''pinds_blog_entries'', -- impl_name - ''lastUpdated'', -- impl_operation_name - ''lars_blog__rss_lastUpdated'', -- impl_alias - ''TCL'' -- impl_pl - ); +select acs_sc_impl_alias__new( + 'RssGenerationSubscriber', -- impl_contract_name + 'pinds_blog_entries', -- impl_name + 'lastUpdated', -- impl_operation_name + 'lars_blog__rss_lastUpdated', -- impl_alias + 'TCL' -- impl_pl +); - PERFORM acs_sc_binding__new ( - ''RssGenerationSubscriber'', - ''pinds_blog_entries'' - ); - - return (0); -end; -' language 'plpgsql'; - -select inline_0(); -drop function inline_0(); - - - +select acs_sc_binding__new ( + 'RssGenerationSubscriber', -- contract_name + 'pinds_blog_entries' -- impl_name +); Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/sql/postgresql/upgrade/upgrade-0.8.4-0.8.5.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/upgrade-0.8.5-0.9.sql'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 27 Jan 2003 16:19:15 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-oracle.xql 28 Aug 2003 09:41:55 -0000 1.2 @@ -5,29 +5,40 @@ - 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, - title, - content, - content_format, - draft_p, - 'f' as new_date_p, - p.first_names as poster_first_names, + select b.entry_id, + b.title, + b.title_url, + b.content, + b.content_format, + b.draft_p, + o.creation_user as user_id, + to_char(b.entry_date, 'YYYY-MM-DD') as entry_date, + to_char(b.entry_date, 'fmDayfm, fmMonthfm fmDDfm, YYYY') as entry_date_pretty, + p.first_names as poster_first_names, p.last_name as poster_last_name, - to_char(posted_date , 'HH24:MI') as posted_time_pretty, + to_char(b.posted_date , 'HH24:MI') as posted_time_pretty, + b.package_id, (select count(gc.comment_id) from general_comments gc, cr_revisions cr where gc.object_id = entry_id - and content_item.get_live_revision(gc.comment_id) = cr.revision_id) as num_comments - from pinds_blog_entries e, - acs_objects o, - persons p - where e.entry_id = :entry_id - and o.object_id = e.entry_id - and p.person_id = o.creation_user + and content_item.get_live_revision(gc.comment_id) = cr.revision_id) as num_comments + from pinds_blog_entries b, + acs_objects o, + persons p + where b.entry_id = :entry_id + and o.object_id = b.entry_id + and p.person_id = o.creation_user + + + update pinds_blog_entries + set entry_date = trunc(sysdate), + draft_p = 'f', + posted_date = sysdate + where entry_id = :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 -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 27 Jan 2003 16:19:15 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/entry-procs-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.2 @@ -7,11 +7,13 @@ select b.entry_id, b.title, + b.title_url, b.content, b.content_format, b.draft_p, + o.creation_user as user_id, to_char(b.entry_date, 'YYYY-MM-DD') as entry_date, - to_char(b.entry_date, 'fmDayfm, Month fmDDfm, YYYY') as entry_date_pretty, + to_char(b.entry_date, 'fmDayfm, fmMonthfm fmDDfm, YYYY') as entry_date_pretty, p.first_names as poster_first_names, p.last_name as poster_last_name, to_char(b.posted_date , 'HH24:MI') as posted_time_pretty, @@ -29,4 +31,14 @@ + + + update pinds_blog_entries + set entry_date = date_trunc('day', current_timestamp), + draft_p = 'f', + posted_date = current_timestamp + where entry_id = :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 -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 27 Jan 2003 16:19:15 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/entry-procs.tcl 28 Aug 2003 09:41:55 -0000 1.3 @@ -2,7 +2,6 @@ Entry procs for blogger. } - namespace eval lars_blogger::entry {} ad_proc -public lars_blogger::entry::get { @@ -12,13 +11,93 @@ # Select the info into the upvar'ed Tcl Array upvar $array row - db_1row select_entry { *SQL* } -column_array row + db_1row select_entry {} -column_array row } +ad_proc -public lars_blogger::entry::require_write_permission { + {-entry_id:required} +} { + permission::require_permission -object_id $entry_id -privilege write + + set admin_p [permission::permission_p -privilege "admin" -object_id $entry_id] + + if { !$admin_p && [ad_conn user_id] != [db_string creation_user {}] } { + ad_return_forbidden "Security Violation" "
    + You don't have permission to modify this entry. +
    + This incident has been logged. +
    " + ad_script_abort + } +} -ad_proc -public do_notifications { +ad_proc -public lars_blogger::entry::publish { {-entry_id:required} + {-package_id ""} + {-no_update:boolean} + {-redirect_url ""} } { + if { !$no_update_p } { + # Set draft_p = 'f' + db_dml update_entry { *SQL* } + # Flush cache + lars_blog_flush_cache + } + + if { ![empty_string_p $redirect_url] } { + ad_returnredirect $redirect_url + ns_conn close + } + + # Setup instance feed 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 + + # Ping weblogs.com + lars_blog_weblogs_com_update_ping +} + + +ad_proc -public lars_blogger::entry::htmlify { + -array:required +} { + Make the entry displayable in an HTML page +} { + upvar $array row + + set row(title) [ad_quotehtml $row(title)] + + # LARS: + # Not sure we should do the ns_adp_parse thing here, but heck, why not + # It should be safe, given the standard HTML filter security checks, which + # wouldn't let unsafe tags slip through, anyway + + set row(content) [ad_html_text_convert -from $row(content_format) -to "text/html" -- $row(content)] + + # We wrap this in a catch so if it bombs, at least we won't break any pages + catch { + set row(content) [ns_adp_parse -string $row(content)] + } + + # look for the base site name in the url + if {[regexp {^https?://([^ /]+)} $row(title_url) initial base_url] } { + set row(title_url_base) $base_url + } else { + set row(title_url_base) {} + } +} + + + + +ad_proc -public lars_blogger::entry::do_notifications { + {-entry_id:required} +} { # Select all the important information get -entry_id $entry_id -array blog @@ -28,7 +107,11 @@ set new_content "" append new_content "$blog(poster_first_names) $blog(poster_last_name) posted to $blog_name at $blog(posted_time_pretty) on $blog(entry_date_pretty):\n\n" - append new_content "$blog(title)\n\n" + append new_content "$blog(title)\n[string repeat "-" [string length $blog(title)]]\n" + if { ![empty_string_p $blog(title_url)] } { + append new_content "$blog(title_url)\n" + } + append new_content "\n" append new_content "[ad_convert_to_text -- [ns_adp_parse -string $blog(content)]]\n\n" append new_content "This entry: $entry_url\n\n" append new_content "$blog_name: $blog_url\n" 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 -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 27 Jan 2003 16:19:15 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-oracle.xql 28 Aug 2003 09:41:55 -0000 1.4 @@ -5,20 +5,69 @@ - begin - :1 := pinds_blog_entry.new ( - entry_id => :entry_id, - package_id => :package_id, - title => :title, - 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; + 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; + + + begin + :1 := weblogger_channel.new ( + null, + :package_id, + NULL, + :creation_user, + :creation_ip + ); + end; + + + + + + begin + :1 := weblogger_channel.new ( + null, + :package_id, + :creation_user, + :creation_user, + :creation_ip + ); + end; + + + + + + begin + :1 := rss_gen_subscr.new ( + null, -- subscr_id + acs_sc_impl.get_id('RssGenerationSubscriber','pinds_blog_entries'), + -- impl_id + :summary_context_id, -- summary_context_id + :timeout, -- timeout + null, -- lastbuild + 'rss_gen_subscr', -- object_type + sysdate, -- creation_date + :creation_user, -- creation_user + :creation_ip, -- creation_ip + :package_id -- context_id + ); + end; + + + 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 -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 27 Jan 2003 16:19:15 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.4 @@ -5,18 +5,61 @@ - select pinds_blog_entry__new ( - :entry_id, - :package_id, - :title, - :content, - :content_format, - to_date(:entry_date, 'YYYY-MM-DD'), - :draft_p, - :creation_user, - :creation_ip + select pinds_blog_entry__new ( + :entry_id, + :package_id, + :title, + :title_url, + :content, + :content_format, + to_date(:entry_date, 'YYYY-MM-DD'), + :draft_p, + :creation_user, + :creation_ip ) + + + select weblogger_channel__new ( + null, + :package_id, + NULL, + :creation_user, + :creation_ip + ) + + + + + + select weblogger_channel__new ( + null, + :package_id, + :creation_user, + :creation_user, + :creation_ip + ) + + + + + + select rss_gen_subscr__new ( + null, -- subscr_id + acs_sc_impl__get_id('RssGenerationSubscriber','pinds_blog_entries'), + -- impl_id + :summary_context_id, -- summary_context_id + :timeout, -- timeout + null, -- lastbuild + 'rss_gen_subscr', -- object_type + now(), -- creation_date + :creation_user, -- creation_user + :creation_ip, -- creation_ip + :package_id -- context_id + ) + + + 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 -r1.8 -r1.9 --- openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 27 Jan 2003 16:19:15 -0000 1.8 +++ openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.tcl 28 Aug 2003 09:41:55 -0000 1.9 @@ -9,6 +9,7 @@ {-entry_id:required} {-package_id:required} {-title:required} + {-title_url ""} {-content:required} {-content_format:required} {-entry_date:required} @@ -19,15 +20,91 @@ set creation_user [ad_conn user_id] set creation_ip [ns_conn peeraddr] - set entry_id [db_exec_plsql entry_add { *SQL* }] + db_transaction { + # Create the entry + set entry_id [db_exec_plsql entry_add {}] + lars_blog_flush_cache $package_id + } - 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 lars_blog_setup_feed { + -user:boolean + {-package_id ""} +} { + if { [empty_string_p $package_id] } { + set package_id [ad_conn package_id] + } + + set timeout [expr 30*60] + set channel_title [lars_blog_name] + 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]} { + + # 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] + + set subscr_id [db_exec_plsql create_subscr {}] + db_dml update_subscr {} + + # 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 { [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 feed setup for this user + set exists_user_feed_p [db_string exists_user_feed_p {}] + set screen_name [db_string screen_name {}] + + 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/" + + set subscr_id [db_exec_plsql create_subscr {}] + db_dml update_subscr {} + + # Run it now + rss_gen_report $subscr_id + } + } + } +} + + ad_proc -private lars_blog_get_as_string_mem { package_id admin_p Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/tcl/lars-blogger-procs.xql'. 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/tcl/notification-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.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 30 Nov 2002 17:37:17 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-oracle.xql 28 Aug 2003 09:41:55 -0000 1.3 @@ -5,7 +5,7 @@ - select to_char(sysdate,'DD Mon YYYY hh12:MI am') + select to_char(sysdate,'DD Mon YYYY hh12:MI am') from dual @@ -23,7 +23,7 @@ 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 + from pinds_blog_entries where package_id = :package_id and draft_p = 'f' and deleted_p = 'f' @@ -32,6 +32,34 @@ + + + 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, + -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 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) + where rownum < 11 + + + select nvl ((max(posted_date)-to_date('1970-01-01'))*60*60*24,0) as last_update @@ -42,4 +70,16 @@ + + + select nvl ((max(posted_date)-to_date('1970-01-01'))*60*60*24,0) as last_update + from pinds_blog_entries e join + acs_objects o on (o.object_id = e.entry_id) + where e.package_id = :package_id + and o.creation_user = :user_id + and e.draft_p = 'f' + and e.deleted_p = 'f' + + + 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.2 -r1.3 --- openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 30 Nov 2002 17:37:17 -0000 1.2 +++ openacs-4/packages/lars-blogger/tcl/rss-procs-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.3 @@ -32,10 +32,36 @@ + + + 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, + 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 coalesce (date_part('epoch', - max(posted_date::timestamp with time zone) + max(posted_date::timestamptz) ),0) as last_update from pinds_blog_entries where package_id = :package_id @@ -44,4 +70,18 @@ + + + select coalesce (date_part('epoch', + max(e.posted_date::timestamptz) + ),0) as last_update + from pinds_blog_entries e join + acs_objects o on (o.object_id = e.entry_id) + where e.package_id = :package_id + and o.creation_user = :user_id + and e.draft_p = 'f' + and e.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.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 30 Nov 2002 17:37:17 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/rss-procs.tcl 28 Aug 2003 09:41:55 -0000 1.4 @@ -6,22 +6,29 @@ } ad_proc -private lars_blog__rss_datasource { - package_id + summary_context_id } { This procedure implements the "datasource" operation of the RssGenerationSubscriber service contract. @author Lars Pind (lars@pinds.com) } { - set package_url [lars_blog_public_package_url -package_id $package_id] - set blog_title [db_string package_name { *SQL* }] + db_transaction { + + db_1row select_package_id_user_id {} + + set package_url [lars_blog_public_package_url -package_id $package_id] + + set blog_title [db_string package_name {}] - set blog_url "[ad_url]$package_url" - + set blog_url "[ad_url]$package_url" + + } + set column_array(channel_title) $blog_title set column_array(channel_description) $blog_title - set column_array(channel_pubDate) [db_string now { *SQL* }] + set column_array(channel_pubDate) [db_string now {}] set column_array(version) 1.00 @@ -42,7 +49,14 @@ set items [list] set counter 0 - db_foreach blog_rss_items { *SQL* } { + + if { [empty_string_p $user_id] } { + set statement "blog_rss_items" + } else { + set statement "user_blog_rss_items" + } + + db_foreach $statement {} { set TZoffset [format "%+03d:%02d" $tzoffset_hour $tzoffset_minute] set entry_url "[ad_url]${package_url}archive/${entry_archive_url}#blog-entry-$entry_id" @@ -77,21 +91,20 @@ } ad_proc -private lars_blog__rss_lastUpdated { - package_id + summary_context_id } { Returns the time that the last blog entry was posted, in Unix time. Returns 0 otherwise. @author Lars Pind (lars@pinds.com) } { - db_0or1row get_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' - and deleted_p = 'f' + + db_1row select_package_id_user_id {} + + if { [empty_string_p $user_id] } { + db_0or1row get_last_update {} + } else { + db_0or1row get_last_user_update {} } return $last_update Index: openacs-4/packages/lars-blogger/tcl/rss-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/rss-procs.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/tcl/rss-procs.xql 19 Aug 2002 21:52:59 -0000 1.1 +++ openacs-4/packages/lars-blogger/tcl/rss-procs.xql 28 Aug 2003 09:41:55 -0000 1.2 @@ -2,10 +2,22 @@ + + + select package_id, user_id from weblogger_channels where channel_id = :summary_context_id + + + select instance_name from apm_packages where package_id = :package_id + + + select package_id, user_id from weblogger_channels where channel_id = :summary_context_id + + + Index: openacs-4/packages/lars-blogger/tcl/weblogs-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/tcl/weblogs-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/tcl/weblogs-procs.tcl 14 Sep 2002 16:40:33 -0000 1.3 +++ openacs-4/packages/lars-blogger/tcl/weblogs-procs.tcl 28 Aug 2003 09:41:55 -0000 1.4 @@ -106,7 +106,7 @@ return -code error -errorinfo $errorInfo $errMsg } } errmsg ] { - ns_log error "lars_blog_weblogs_com_update_ping error: $errmsg" + ns_log warning "lars_blog_weblogs_com_update_ping error: $errmsg" return -1 } else { ns_log notice "lars_blog_weblogs_com_update_ping: $page" Index: openacs-4/packages/lars-blogger/www/blog-months-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-months-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/blog-months-oracle.xql 14 Sep 2002 18:37:58 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/blog-months-oracle.xql 28 Aug 2003 09:41:55 -0000 1.3 @@ -3,7 +3,7 @@ oracle8.1.6 - + select trunc(entry_date, 'month') as month_date, to_char(trunc(entry_date, 'month'), 'fmMonthfm YYYY') @@ -18,4 +18,24 @@ + + + select trunc(entry_date, 'month') as month_date, + to_char(trunc(entry_date, 'month'), 'fmMonthfm YYYY') + as date_pretty, + to_char(trunc(entry_date, 'month'), 'YYYY/MM/') + as month_url_stub + from pinds_blog_entries e, + acs_objects o, + users u + where e.draft_p = 'f' + and e.package_id = :package_id + and u.screen_name = :screen_name + and o.object_id = e.entry_id + and u.user_id = o.creation_user + group by trunc(entry_date, 'month') + order by month_date desc + + + Index: openacs-4/packages/lars-blogger/www/blog-months-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-months-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/blog-months-postgresql.xql 14 Sep 2002 18:37:58 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/blog-months-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.3 @@ -3,7 +3,7 @@ postgresql7.1 - + select date_trunc('month', entry_date) as month_date, to_char(date_trunc('month', entry_date), 'fmMonthfm YYYY') @@ -18,4 +18,22 @@ + + + select date_trunc('month', entry_date) as month_date, + to_char(date_trunc('month', entry_date), 'fmMonthfm YYYY') + as date_pretty, + to_char(date_trunc('month', entry_date), 'YYYY/MM/') + as month_url_stub + 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 package_id = :package_id + and draft_p = 'f' + and screen_name = :screen_name + group by month_date + order by month_date desc + + + Index: openacs-4/packages/lars-blogger/www/blog-months.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-months.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/blog-months.tcl 14 Sep 2002 18:37:58 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/blog-months.tcl 28 Aug 2003 09:41:55 -0000 1.4 @@ -1,7 +1,13 @@ set package_id [ad_conn package_id] -db_multirow -extend { url } months months { *SQL* } { - set url "[ad_conn package_url]archive/$month_url_stub" +if [empty_string_p $screen_name] { + db_multirow -extend { url } months all_blog_months { *SQL* } { + set url "[ad_conn package_url]archive/$month_url_stub" + } +} else { + db_multirow -extend { url } months one_blog_months { *SQL* } { + set url "[ad_conn package_url]user/$screen_name/archive/$month_url_stub" + } } -ad_return_template \ No newline at end of file +ad_return_template Index: openacs-4/packages/lars-blogger/www/blog-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog-oracle.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/blog-oracle.xql 27 Jan 2003 16:19:27 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/blog-oracle.xql 28 Aug 2003 09:41:55 -0000 1.4 @@ -11,10 +11,43 @@ - entry_date > sysdate - 30 + entry_date > sysdate - :num_days + + + 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, + to_char(entry_date, 'YYYY-MM-DD') as entry_date, + title, + title_url, + content, + content_format, + draft_p, + p.first_names as poster_first_names, + p.last_name as poster_last_name, + o.creation_user as user_id, + to_char(posted_date , 'HH24:MI') as posted_time_pretty, + (select count(gc.comment_id) + from general_comments gc, cr_revisions cr + where gc.object_id = entry_id + and content_item.get_live_revision(gc.comment_id) = cr.revision_id) as num_comments + from pinds_blog_entries e, + acs_objects o, + persons p + where e.entry_id = o.object_id + and p.person_id = o.creation_user + and package_id = :package_id + [ad_decode $date_clause "" "" "and $date_clause"] + and draft_p = 'f' + and deleted_p = 'f' + [ad_decode $limit "" "" "and rownum <= $limit"] + order by entry_date desc, posted_date desc + + + select entry_id, @@ -27,6 +60,7 @@ draft_p, p.first_names as poster_first_names, p.last_name as poster_last_name, + o.creation_user as user_id, to_char(posted_date , 'HH24:MI') as posted_time_pretty, (select count(gc.comment_id) from general_comments gc, cr_revisions cr @@ -37,10 +71,12 @@ persons p where e.entry_id = o.object_id and p.person_id = o.creation_user + and o.creation_user = :blog_user_id and package_id = :package_id - and $date_clause + [ad_decode $date_clause "" "" "and $date_clause"] and draft_p = 'f' and deleted_p = 'f' + [ad_decode $limit "" "" "and rownum <= $limit"] order by entry_date desc, posted_date desc 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.5 -r1.6 --- openacs-4/packages/lars-blogger/www/blog-postgresql.xql 27 Jan 2003 16:19:27 -0000 1.5 +++ openacs-4/packages/lars-blogger/www/blog-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.6 @@ -11,22 +11,24 @@ - entry_date > current_timestamp - interval '30 days' + entry_date > current_timestamp - interval '$num_days days' - + 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, to_char(entry_date, 'YYYY-MM-DD') as entry_date, title, + title_url, content, content_format, draft_p, p.first_names as poster_first_names, p.last_name as poster_last_name, + o.creation_user as user_id, to_char(posted_date , 'HH24:MI') as posted_time_pretty, (select count(gc.comment_id) from general_comments gc, cr_revisions cr @@ -36,11 +38,43 @@ acs_objects o on (o.object_id = e.entry_id) join persons p on (p.person_id = o.creation_user) where package_id = :package_id - and $date_clause + [ad_decode $date_clause "" "" "and $date_clause"] and draft_p = 'f' and deleted_p = 'f' order by entry_date desc, posted_date desc + [ad_decode $limit "" "" "limit $limit"] + + + 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, + to_char(entry_date, 'YYYY-MM-DD') as entry_date, + title, + content, + content_format, + draft_p, + p.first_names as poster_first_names, + p.last_name as poster_last_name, + o.creation_user as user_id, + to_char(posted_date , 'HH24:MI') as posted_time_pretty, + (select count(gc.comment_id) + from general_comments gc, cr_revisions cr + where gc.object_id = entry_id + and content_item__get_live_revision(gc.comment_id) = cr.revision_id) as num_comments + from pinds_blog_entries e join + acs_objects o on (o.object_id = e.entry_id) join + persons p on (p.person_id = o.creation_user) + where package_id = :package_id + and o.creation_user = :blog_user_id + [ad_decode $date_clause "" "" "and $date_clause"] + and draft_p = 'f' + and deleted_p = 'f' + order by entry_date desc, posted_date desc + [ad_decode $limit "" "" "limit $limit"] + + + 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.11 -r1.12 --- openacs-4/packages/lars-blogger/www/blog.adp 22 May 2003 15:01:04 -0000 1.11 +++ openacs-4/packages/lars-blogger/www/blog.adp 28 Aug 2003 09:41:55 -0000 1.12 @@ -7,9 +7,7 @@
    - - + - + + @blog_name@ @@ -20,23 +18,23 @@
    - +

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

    \ No newline at end of file +

    Index: openacs-4/packages/lars-blogger/www/blog.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/lars-blogger/www/blog.tcl 4 Jan 2003 09:46:24 -0000 1.9 +++ openacs-4/packages/lars-blogger/www/blog.tcl 28 Aug 2003 09:41:55 -0000 1.10 @@ -4,7 +4,9 @@ # type:optional (current, archive) # archive_interval:optional # archive_date:optional +# screen_name:optional + # If the caller specified a URL, then we gather the package_id from that URL if { [info exists url] } { array set blog_site_node [site_node $url] @@ -16,16 +18,58 @@ set package_id [ad_conn package_id] } -if { ![info exists type] } { - set type "current" +set write_p [permission::permission_p -object_id $package_id -privilege write] + +if { ![info exists screen_name] } { + set screen_name "" + set blog_user_id {} +} else { + set blog_user_id [cc_screen_name_user $screen_name] } +# TODO: +# - Upgrade the installed package to get the latest parameters +# - Test on PG and Oracle + + +set max_num_entries [parameter::get \ + -package_id $package_id \ + -parameter MaxNumEntriesOnFrontPage \ + -default {}] + +set min_num_entries [parameter::get \ + -package_id $package_id \ + -parameter MinNumEntriesOnFrontPage \ + -default {}] + +set num_days [parameter::get \ + -package_id $package_id \ + -parameter NumDaysOnFrontPage \ + -default {}] + + + switch -exact $type { archive { set date_clause "[db_map date_clause_archive]" + set limit {} } + current { + set date_clause {} + set limit {} + + if { ![empty_string_p $max_num_entries] && $max_num_entries != 0 } { + # MaxNumEntriesOnFrontPage parameter is set, which means we should limit to that + set limit $max_num_entries + } + + if { ![empty_string_p $num_days] && $num_days != 0 } { + # NumDaysOnFrontPage parameter is set, which means we should limit to that + set date_clause [db_map date_clause_default] + } + } default { - set date_clause "[db_map date_clause_default]" + error "Only knows of type 'archive' or 'current'" } } @@ -41,16 +85,35 @@ set blog_url {} } -set admin_p [ad_permission_p $package_id admin] +# Check that the date limit is not limiting us to show less than min_num_entries entries +if { ![string equal $type "archive"] && \ + ![empty_string_p $min_num_entries] && $min_num_entries != 0 && \ + ![empty_string_p $num_days] && $num_days != 0 + } { + if { [empty_string_p $blog_user_id] } { + set num_entries [db_string num_entries_by_date_all {}] + } else { + set num_entries [db_string num_entries_by_date {}] + } + + if { $num_entries < $min_num_entries } { + # Eliminate date clause, and set the limit to the minimum number of entries + set date_clause {} + set limit $min_num_entries + } +} -set count 0 +if { [empty_string_p $blog_user_id] } { + db_multirow blog all_blogs { *SQL* } + set archive_url "${package_url}archive/" +} else { + db_multirow blog blog { *SQL* } + set archive_url "${package_url}user/$screen_name/archive/" +} -db_multirow blog blog { *SQL* } - -set archive_url "${package_url}archive/" set arrow_url "${package_url}graphics/arrow-box.gif" -set entry_add_url "${package_url}admin/entry-edit" +set entry_add_url "${package_url}entry-edit" set header_background_color [lars_blog_header_background_color -package_id $package_id] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/blog.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/lars-blogger/www/calendar-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/www/calendar-oracle.xql 27 Jan 2003 16:19:27 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/calendar-oracle.xql 28 Aug 2003 09:41:55 -0000 1.2 @@ -3,7 +3,7 @@ oracle8.1.6 - + select to_char(entry_date, 'J') as entry_date_julian from pinds_blog_entries @@ -13,4 +13,21 @@ group by to_char(entry_date, 'J') + + + + + select to_char(entry_date, 'J') as entry_date_julian + from pinds_blog_entries e, + acs_objects o, + users u + where package_id = :package_id + and o.object_id = e.entry_id + and u.user_id = o.creation_user + and u.screen_name = :screen_name + and draft_p = 'f' + and deleted_p = 'f' + group by to_char(entry_date, 'J') + + Index: openacs-4/packages/lars-blogger/www/calendar-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/www/calendar-postgresql.xql 27 Jan 2003 16:19:27 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/calendar-postgresql.xql 28 Aug 2003 09:41:55 -0000 1.2 @@ -3,7 +3,7 @@ postgresql7.1 - + select to_char(entry_date, 'J') as entry_date_julian from pinds_blog_entries @@ -13,4 +13,19 @@ group by entry_date_julian + + + + + select to_char(entry_date, 'J') as entry_date_julian + 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 package_id = :package_id + and screen_name = :screen_name + and draft_p = 'f' + and deleted_p = 'f' + group by entry_date_julian + + Index: openacs-4/packages/lars-blogger/www/calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/calendar.adp 22 May 2003 15:01:04 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/calendar.adp 28 Aug 2003 09:41:55 -0000 1.4 @@ -1,4 +1,4 @@ -@notification_chunk;noquote@ +@widget@

    @prev_month_name@ - @next_month_name@ Index: openacs-4/packages/lars-blogger/www/calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/calendar.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/calendar.tcl 16 Sep 2002 15:04:27 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/calendar.tcl 28 Aug 2003 09:41:55 -0000 1.4 @@ -19,18 +19,42 @@ set package_id [ad_conn package_id] -db_foreach entry_dates { * SQL * } { - ns_set put $calendar_details $entry_date_julian "1" +if {[empty_string_p $screen_name]} { + db_foreach all_entry_dates { * SQL * } { + ns_set put $calendar_details $entry_date_julian "1" + } +} else { + db_foreach entry_dates { * SQL * } { + ns_set put $calendar_details $entry_date_julian "1" + } } +if {[empty_string_p $screen_name]} { + + set day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]" + +} else { + + set day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]" + +} + set widget [dt_widget_month_small \ -date $date \ -calendar_details $calendar_details \ - -day_number_template "\[ad_decode \[ns_set get \$calendar_details \$julian_date\] 1 \"\$day_number\" \$day_number\]"] + -day_number_template $day_number_template] -set prev_month_url "${package_url}archive/[clock format [clock scan $prev_month] -format %Y/%m]/" -set next_month_url "${package_url}archive/[clock format [clock scan $next_month] -format %Y/%m]/" +if {[empty_string_p $screen_name]} { + set prev_month_url "${package_url}archive/[clock format [clock scan $prev_month] -format %Y/%m]/" + set next_month_url "${package_url}archive/[clock format [clock scan $next_month] -format %Y/%m]/" + +} else { + + set prev_month_url "${package_url}user/$screen_name/archive/[clock format [clock scan $prev_month] -format %Y/%m]/" + set next_month_url "${package_url}user/$screen_name/archive/[clock format [clock scan $next_month] -format %Y/%m]/" + +} # Add year to the link append next_month_name " [string range $next_month 0 3]" append prev_month_name " [string range $prev_month 0 3]" Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/drafts-oracle.xql'. 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/drafts-postgresql.xql'. 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/drafts.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/drafts.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/drafts.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.6 -r1.7 --- openacs-4/packages/lars-blogger/www/entry-chunk.adp 22 May 2003 15:01:04 -0000 1.6 +++ openacs-4/packages/lars-blogger/www/entry-chunk.adp 28 Aug 2003 09:41:55 -0000 1.7 @@ -1,7 +1,16 @@ - -

    @blog.title@

    + +

    + @blog.title@@blog.title_url@ + +   [@blog.title_url_base@] + +

    -

    + + +

    @blog.title@

    + + @blog.content@


    @@ -12,7 +21,7 @@
    Posted by @blog.poster_first_names@ @blog.poster_last_name@ at @blog.posted_time_pretty@ - +      Edit - @@ -31,7 +40,7 @@

    # - G - + - @blog.num_comments@ commentcomments @@ -46,11 +55,11 @@

    - +

    Comments

    - @comments_html;noquote@ + @comments_html@
    Add comment
    Index: openacs-4/packages/lars-blogger/www/entry-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-chunk.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/www/entry-chunk.tcl 27 Jan 2003 16:19:27 -0000 1.5 +++ openacs-4/packages/lars-blogger/www/entry-chunk.tcl 28 Aug 2003 09:41:55 -0000 1.6 @@ -13,14 +13,14 @@ set package_id [ad_conn package_id] } -set admin_p [ad_permission_p $package_id admin] - if { ![exists_and_not_null return_url] } { set return_url "[ad_conn url]?[ad_conn query]" } set package_url [lars_blog_public_package_url -package_id $package_id] +set user_id [ad_conn user_id] + set general_comments_package_url [general_comments_package_url] set show_poster_p [ad_parameter "ShowPosterP" "" "1"] @@ -34,13 +34,18 @@ set entry_id $blog(entry_id) -set blog(edit_url) "${package_url}admin/entry-edit?[export_vars { entry_id return_url }]" -set blog(delete_url) "${package_url}admin/entry-delete?[export_vars { entry_id return_url }]" +set blog(edit_url) "${package_url}entry-edit?[export_vars { entry_id return_url }]" +set blog(delete_url) "${package_url}entry-delete?[export_vars { entry_id return_url }]" -set blog(publish_url) "${package_url}admin/entry-publish?[export_vars { entry_id return_url }]" -set blog(revoke_url) "${package_url}admin/entry-revoke?[export_vars { entry_id return_url }]" +set blog(publish_url) "${package_url}entry-publish?[export_vars { entry_id return_url }]" +set blog(revoke_url) "${package_url}entry-revoke?[export_vars { entry_id return_url }]" -set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" +if { [empty_string_p $screen_name] } { + set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" +} else { + set blog(entry_archive_url) "${package_url}user/$screen_name/one-entry?[export_vars { entry_id }]" +} + set blog(google_url) "http://www.google.com/search?[export_vars { {q $blog(title) } }]" if { ![empty_string_p $general_comments_package_url] } { @@ -53,4 +58,4 @@ set comments_html [general_comments_get_comments -print_content_p 1 $entry_id] } -ad_return_template \ No newline at end of file +ad_return_template Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/entry-delete.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/entry-delete.xql'. 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/entry-edit-oracle.xql'. 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/entry-edit-postgresql.xql'. 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/entry-edit.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/entry-edit.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/entry-edit.xql'. 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/entry-publish.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/entry-revoke.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/entry-revoke.xql'. 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/index-oracle.xql'. 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/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.12 -r1.13 --- openacs-4/packages/lars-blogger/www/index.adp 22 May 2003 15:01:04 -0000 1.12 +++ openacs-4/packages/lars-blogger/www/index.adp 28 Aug 2003 09:41:55 -0000 1.13 @@ -1,14 +1,51 @@ -@page_title;noquote@ +@page_title@ - + -@context_bar;noquote@ +@context_bar@ + + + + + + + + No bloggers here. + + + + +

    + » Add entry
    +

    +
    + +

    + » Start your weblog
    +

    +
    +
    + + +

    + » Administer +

    +
    + +
    + + + @@ -29,35 +66,35 @@ - + - + - + - + @@ -67,7 +104,7 @@ - + - @@ -103,3 +140,4 @@
    - + @@ -20,7 +57,7 @@
    - +
    Actions
    - Add entry
    - Draft entries
    -
    Administer + Add entry
    + Draft entries + +
    Administer +
    -
    -
     
    Notifications
    - @notification_chunk;noquote@ + @notification_chunk@
    Archive @@ -92,7 +129,7 @@
    + RSS 1.0/RDF/XML
    +
    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.7 -r1.8 --- openacs-4/packages/lars-blogger/www/index.tcl 30 Jan 2003 16:56:22 -0000 1.7 +++ openacs-4/packages/lars-blogger/www/index.tcl 28 Aug 2003 09:41:55 -0000 1.8 @@ -4,24 +4,62 @@ @author Lars Pind (lars@pinds.com) @creation-date February 2002 } { + screen_name:optional year:optional,string_length_range(4|4) month:optional,string_length_range(2|2) day:optional,string_length_range(2|2) -} -properties { - context_bar - page_title } -set context_bar [ad_context_bar] - set page_title [lars_blog_name] -if { ![empty_string_p [ad_parameter "rss_file_url"]] } { - set rss_file_url "[ad_url][lars_blog_public_package_url][ad_parameter "rss_file_url"]" +if {![exists_and_not_null screen_name]} { + set screen_name "" + set context_bar [ad_context_bar] +} else { + set context_bar [ad_context_bar $screen_name] } -set admin_p [ad_permission_p [ad_conn package_id] admin] +if { ![empty_string_p [parameter::get -parameter "rss_file_name"]] } { + if {[exists_and_not_null screen_name]} { + set rss_file_url "[ad_url][lars_blog_public_package_url]user/$screen_name/rss/[parameter::get -parameter "rss_file_name"]" + } else { + set rss_file_url "[ad_url][lars_blog_public_package_url]rss/[parameter::get -parameter "rss_file_name"]" + } + +} + +set package_id [ad_conn package_id] + +set package_url [ad_conn package_url] + +set write_p [permission::permission_p -object_id $package_id -privilege write] +set admin_p [permission::permission_p -object_id $package_id -privilege admin] + +set display_users_p [parameter::get -parameter "DisplayUsersP" -default 0] + +if {$display_users_p && ![exists_and_not_null screen_name]} { + + set display_bloggers_p 1 + + db_multirow bloggers bloggers { *SQL* } + + set user_has_blog_p 0 + multirow foreach bloggers { + if { $user_id == [ad_conn user_id] } { + set user_has_blog_p 1 + break + } + } + + ad_return_template + +} else { + + set display_bloggers_p 0 + +} + set notification_chunk [notification::display::request_widget \ -type lars_blogger_notif \ -object_id [ad_conn package_id] \ @@ -40,11 +78,19 @@ if { [exists_and_not_null day] } { set interval "day" db_1row archive_date_month_day { *SQL* } - set context_bar [ad_context_bar [list "[ad_conn package_url]archive/" "Archive"] [list "[ad_conn package_url]archive/$year/$month/" $archive_month_pretty] $archive_date_pretty] + if {[empty_string_p $screen_name]} { + set context_bar [ad_context_bar [list "$package_url/archive/" "Archive"] [list "$package_url/archive/$year/$month/" $archive_month_pretty] $archive_date_pretty] + } else { + set context_bar [ad_context_bar [list "$package_url/user/$screen_name/" "$screen_name"] [list "$package_url/user/$screen_name/archive/" "Archive"] [list "$package_url/user/$screen_name/archive/$year/$month/" $archive_month_pretty] $archive_date_pretty] + } } else { set interval "month" db_1row archive_date_month { *SQL* } - set context_bar [ad_context_bar [list "[ad_conn package_url]archive/" "Archive"] $archive_date_pretty] + if {[empty_string_p $screen_name]} { + set context_bar [ad_context_bar [list "$package_url/archive/" "Archive"] $archive_date_pretty] + } else { + set context_bar [ad_context_bar [list "$package_url/user/$screen_name/" "$screen_name"] [list "$package_url/user/$screen_name/archive/" "Archive"] $archive_date_pretty] + } } append page_title " Archive" Index: openacs-4/packages/lars-blogger/www/one-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/one-entry.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/lars-blogger/www/one-entry.adp 22 May 2003 15:01:04 -0000 1.7 +++ openacs-4/packages/lars-blogger/www/one-entry.adp 28 Aug 2003 09:41:55 -0000 1.8 @@ -1,6 +1,6 @@ -@page_title;noquote@ -@context_bar;noquote@ +@page_title@ +@context_bar@ @@ -10,4 +10,4 @@
    - \ No newline at end of file + Index: openacs-4/packages/lars-blogger/www/one-entry.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/one-entry.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/lars-blogger/www/one-entry.tcl 14 Sep 2002 22:05:25 -0000 1.5 +++ openacs-4/packages/lars-blogger/www/one-entry.tcl 28 Aug 2003 09:41:55 -0000 1.6 @@ -13,8 +13,6 @@ set package_id [ad_conn package_id] -set admin_p [ad_permission_p $package_id admin] - if { [empty_string_p $return_url] } { set return_url "[ad_conn url]?[ad_conn query]" } @@ -25,8 +23,13 @@ set page_title $blog(title) -set context_bar [ad_context_bar $page_title] +if {![exists_and_not_null screen_name]} { + set screen_name "" + set context_bar [ad_context_bar $page_title] +} else { + set context_bar [ad_context_bar $screen_name] +} set header_background_color [lars_blog_header_background_color] -ad_return_template \ No newline at end of file +ad_return_template Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/screen-name-setup.adp'. Fisheye: No comparison available. Pass `N' to diff? 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.7 -r1.8 --- openacs-4/packages/lars-blogger/www/admin/index.adp 22 May 2003 15:01:34 -0000 1.7 +++ openacs-4/packages/lars-blogger/www/admin/index.adp 28 Aug 2003 09:41:56 -0000 1.8 @@ -1,42 +1,43 @@ -@title;noquote@ +@title@

    These are your administrative options

    - Add new blog entry - Add new blog entry + » + Add new blog entry

    - View draft entries - View draft entries + » + View draft entries

    - Show E-Mail subscribers + » Show E-Mail subscribers

    - Set parameters + » Set parameters

    - +

    - Setup an RSS feed - Setup an RSS feed + » + Manage your RSS feeds (View instance feed XML)

    - + +

    - Manage your RSS feed - Manage your RSS feed + » + Setup instance RSS feed

    -
    +
    -
    \ No newline at end of file + Index: openacs-4/packages/lars-blogger/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/admin/index.tcl 30 Jan 2003 16:56:39 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/admin/index.tcl 28 Aug 2003 09:41:56 -0000 1.4 @@ -15,11 +15,12 @@ set arrow_url "[lars_blog_public_package_url -package_id $package_id]graphics/arrow-box.gif" -set rss_feed_p [db_string rss_feed_p {}] +set instance_feed_p [db_string rss_feed_p {}] set rss_setup_url "rss-setup" set rss_manage_url "[apm_package_url_from_key "rss-support"]my-subscrs" -ad_return_template - +if { ![empty_string_p [parameter::get -parameter "rss_file_name"]] } { + set rss_file_url "[ad_url][lars_blog_public_package_url]rss/[parameter::get -parameter "rss_file_name"]" +} Index: openacs-4/packages/lars-blogger/www/admin/index.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/index.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/admin/index.xql 30 Jan 2003 16:56:39 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/admin/index.xql 28 Aug 2003 09:41:56 -0000 1.3 @@ -13,8 +13,9 @@ select count(*) from rss_gen_subscrs s, - acs_sc_impls i - where s.summary_context_id = :package_id + acs_sc_impls i, weblogger_channels w + where w.package_id = :package_id + and s.summary_context_id = w.channel_id and s.impl_id = i.impl_id and i.impl_name = 'pinds_blog_entries' and i.impl_owner_name = 'lars-blogger' Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/admin/rss-setup-oracle.xql'. 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/rss-setup-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl 30 Jan 2003 16:56:39 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/admin/rss-setup.tcl 28 Aug 2003 09:41:56 -0000 1.2 @@ -2,23 +2,7 @@ Setup an RSS feed for this blogger. } -set creation_user [ad_conn user_id] -set creation_ip [ns_conn peeraddr] +# Setup instance feed if needed +lars_blog_setup_feed -# by default, we timout in 30 minutes -set timeout [expr 30*60] - -set package_id [ad_conn package_id] - -set channel_title [lars_blog_name] -set channel_link [lars_blog_public_package_url] - -db_transaction { - - set subscr_id [db_string create_subscr {}] - - db_dml update_subscr {} - -} - -ad_returnredirect . \ No newline at end of file +ad_returnredirect . Index: openacs-4/packages/lars-blogger/www/admin/rss-setup.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/admin/rss-setup.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/lars-blogger/www/admin/rss-setup.xql 30 Jan 2003 16:56:39 -0000 1.1 +++ openacs-4/packages/lars-blogger/www/admin/rss-setup.xql 28 Aug 2003 09:41:56 -0000 1.2 @@ -2,24 +2,6 @@ - - - select rss_gen_subscr__new ( - null, -- subscr_id - acs_sc_impl__get_id('RssGenerationSubscriber','pinds_blog_entries'), - -- impl_id - :package_id, -- summary_context_id - :timeout, -- timeout - null, -- lastbuild - 'rss_gen_subscr', -- object_type - now(), -- creation_date - :creation_user, -- creation_user - :creation_ip, -- creation_ip - :package_id -- context_id - ) - - - update rss_gen_subscrs Index: openacs-4/packages/lars-blogger/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/doc/index.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/lars-blogger/www/doc/index.html 6 Feb 2003 08:59:15 -0000 1.3 +++ openacs-4/packages/lars-blogger/www/doc/index.html 28 Aug 2003 09:41:56 -0000 1.4 @@ -1,20 +1,20 @@ -Lars Pind's Blogger Documentation +Weblogger Documentation -

    Lars Pind's Blogger Documentation

    -By Lars Pind +

    Weblogger Documentation

    +By Lars Pind and Simon Carstensen
    -

    Why

    +

    Download

    @@ -27,8 +27,8 @@

    Install the package on your system, mount a new instance somewhere - on the site map, make sure you have admin permission on the - instance, and then visit /admin under the URL where you mounted + on the site map, make sure you have write permission on the + instance, and then visit the URL where you mounted it. Now you can add your first blog entry.

    @@ -88,18 +88,21 @@

    Technical Info

    - The package fully supports multiple instances, i.e., you can mount + The package fully supports multiple instances. You can mount several instances in your site map, and they'll stay properly isolated - from each other. + from each other. Alternatively you can let multiple users post to one + instance by granting write permissions. Mounting Weblogger under, say, + /blog, you will have /blog/user/screenname displaying the entries of one + user and /blog displaying either a list of all bloggers (this is done by + setting the parameter DisplayUsersP to 1) or all entries posted to the + instance (the default).

    Contents in your blog entries are assumed to be full-blooded - ADP-ified HTML, so don't give people access to post a blog unless - you trust them. I guess it should be made configurable whether to - allow this or not, but since I'm developing this for my own site - primarily, I haven't done so. This also means that if you've added - custom ADP tags, those are also available to you in your blog. + ADP-ified HTML, so don't give people access to post a blog (i.e. grant + write permissions on the instance) unless you trust them. This also means + that if you've added custom ADP tags, those are also available to you in your blog.

    weblogs.com update ping

    @@ -124,7 +127,7 @@

    Then you'll need to set the parameters and say that your - rss_file_url is at + rss_file_name is at /where-your-blogger-instnace-sists/rss/rss.xml. If you leave this blank, we won't advertise your RSS feed URL anywhere.

    @@ -137,39 +140,54 @@

    Road Map

      +
    • Categorize and full-text-search-index blog entries so the archives + are more useful.
    • - Categorize and full-text-search-index blog entries so the archives - are more useful. + Use content repository.
    • +
    • Ability to modify templates for each instance individually through + the UI.
    • +
    • Support for Trackback
    • +
    • Support for the Blogger and MetaWeblog APIs
    • +
    • WYISIYG editor
    • +
    • Improved RSS feed
    • +
    • Improved Configuration Settings.
    • +
    • Make it safe to use in a not-so-protected environment, e.g., + disable <% ... %> ADP notation.
    • +
    • Better documentation.
    • - Use content repository. + Moderation-feature: Entries posted by non-admins must go through a + workflow-administered approval process.
    • - Community-maintained blog ... everybody with 'write' can post entries. + Nicer interface (MovableType)
    • +
    + +

    Version History

    + +
    • - Moderation-feature: Entries posted by non-admins must go through a - workflow-administered approval process. + 0.9.2 Added parameters to control the number of entries shown + on the front page (July 10, 2003)
    • - Ability to modify templates for each instance individually through - the UI. + 0.9 Added support for multiple users. (June 10, 2003)
    • - Nicer interface (MovableType) + 0.8.7 Fixed notifications to include the title_url, and + to not have extra spaces in the month name. (May 11, 2003)
    • - Make it safe to use in a not-so-protected environment, e.g., - disable <% ... %> ADP notation. + 0.8.6 Cleaned up RSS-support even more and made it work + under Oracle. Also made a slight style change, using the + &raquo; (») style for action links, which I've adopted + for other packages. It's less intrusive than the harshly-colored + arrow-box.gif I used to use. (May 9, 2003)
    • - More thorough documentation and some setup/config pages. + 0.8.5 Added title URL, cleanup (March 28, 2003)
    • -
    - -

    Version History

    - -
    • 0.8.4 Oops, getting behind on the version history. In the last few releases, I've rearranged a bunch of templates to make it @@ -232,4 +250,4 @@
      lars@pinds.com
      - \ No newline at end of file + Index: openacs-4/packages/lars-blogger/www/rss/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/rss/index.vuh,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/rss/index.vuh 30 Nov 2002 17:38:04 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/rss/index.vuh 28 Aug 2003 09:41:56 -0000 1.3 @@ -1 +1,12 @@ -ns_returnfile 200 text/xml [rss_gen_report_file -summary_context_id [ad_conn package_id] -impl_name pinds_blog_entries] +set extra_url_list [split [ad_conn extra_url] "/"] + +set package_id [ad_conn package_id] + +set summary_context_id [db_string package_id { + select channel_id as summary_context_id + from weblogger_channels w + where w.package_id = :package_id + and w.user_id is null +}] + +ns_returnfile 200 text/xml [rss_gen_report_file -summary_context_id $summary_context_id -impl_name pinds_blog_entries] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/lars-blogger/www/user/index.vuh'. 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/user/archive/index.vuh'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/logger/logger.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/logger.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/logger/logger.info 9 May 2003 15:07:00 -0000 1.6 +++ openacs-4/packages/logger/logger.info 28 Aug 2003 09:45:30 -0000 1.7 @@ -15,6 +15,7 @@ Collaboraid + Index: openacs-4/packages/logger/tcl/project-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/project-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/logger/tcl/project-procs.tcl 1 May 2003 14:14:33 -0000 1.6 +++ openacs-4/packages/logger/tcl/project-procs.tcl 28 Aug 2003 09:45:30 -0000 1.7 @@ -100,6 +100,24 @@ db_dml update_project {} } +ad_proc -public logger::project::set_active_p { + {-project_id:required} + {-active_p:required} +} { + Set a Logger project active/inactive. + + @param project_id The id of the project to edit + @param active_p The new value for active_p, must be t (true) or f (false) + + @return The return value from db_dml + + @author Lars Pind (lars@collaboraid.biz) +} { + ad_assert_arg_value_in_list active_p {t f} + + db_dml update_project {} +} + ad_proc -public logger::project::delete { {-project_id:required} } { @@ -258,4 +276,16 @@ @author Peter Marklund } { return [db_string select_primary_variable {} -default ""] -} \ No newline at end of file +} + +ad_proc -private logger::project::users_get_options {} { + Get the list of users to display in a drop-down to pick project lead. +} { + set package_id [ad_conn package_id] + + set users_list [db_list_of_lists select_project_leads {}] + + lappend users_list { "Search..." ":search:"} + + return $users_list +} 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 -r1.5 -r1.6 --- openacs-4/packages/logger/tcl/project-procs.xql 1 May 2003 14:14:33 -0000 1.5 +++ openacs-4/packages/logger/tcl/project-procs.xql 28 Aug 2003 09:45:30 -0000 1.6 @@ -83,4 +83,23 @@ + + + update logger_projects + set active_p = :active_p + where project_id = :project_id + + + + + + + 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/projection-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/projection-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/logger/tcl/projection-procs.tcl 2 May 2003 08:34:43 -0000 1.3 +++ openacs-4/packages/logger/tcl/projection-procs.tcl 28 Aug 2003 09:45:30 -0000 1.4 @@ -17,7 +17,7 @@ {-end_time:required} {-value:required} {-name:required} - {-description:required} + {-description ""} } { Create a new projection for a certain variable and project. @@ -31,6 +31,8 @@ @param value The anticipated or targeted value (a sum for additive variables, an average for non-additive variables). + @param name Used when listing or displaying the projection in the UI. + @param description Describes the projection. Optional. @return The id of the created projection. Will throw an error if a projection_id is provided and a projection with that id already exists in the database. Index: openacs-4/packages/logger/tcl/ui-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/ui-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/logger/tcl/ui-procs.tcl 9 May 2003 15:07:27 -0000 1.7 +++ openacs-4/packages/logger/tcl/ui-procs.tcl 28 Aug 2003 09:45:30 -0000 1.8 @@ -101,18 +101,5 @@ @author Peter Marklund } { set package_id [ad_conn package_id] - - set project_options [list] - db_foreach project_options { - select lp.project_id, - lp.name - from logger_projects lp, - logger_project_pkg_map lppm - where lp.project_id = lppm.project_id - and lppm.package_id = :package_id - } { - lappend project_options [list $name $project_id] - } - - return $project_options + return [db_list_of_lists project_options {}] } Index: openacs-4/packages/logger/tcl/ui-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/ui-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/tcl/ui-procs.xql 9 May 2003 15:07:27 -0000 1.2 +++ openacs-4/packages/logger/tcl/ui-procs.xql 28 Aug 2003 09:45:30 -0000 1.3 @@ -13,5 +13,16 @@ + + + select lp.name, + lp.project_id + from logger_projects lp, + logger_project_pkg_map lppm + where lp.project_id = lppm.project_id + and lppm.package_id = :package_id + order by name + + Index: openacs-4/packages/logger/tcl/test/logger-test-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/tcl/test/logger-test-init.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/logger/tcl/test/logger-test-init.tcl 1 May 2003 14:15:28 -0000 1.7 +++ openacs-4/packages/logger/tcl/test/logger-test-init.tcl 28 Aug 2003 09:45:30 -0000 1.8 @@ -41,6 +41,7 @@ set projection_start_time "2003-04-10" set projection_end_time "2003-04-20" set projection_value "10" + set projection_name "Test Projection" array set hour_entry_1 { value 11 time_stamp "2003-04-15" @@ -116,7 +117,8 @@ -variable_id $hours_var_id \ -start_time $projection_start_time \ -end_time $projection_end_time \ - -value $projection_value] + -value $projection_value \ + -name $projection_name] # Assert that projection values can be retrieved logger::projection::get -projection_id $projection_id -array projection Index: openacs-4/packages/logger/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/logger/www/index.adp 22 May 2003 15:01:52 -0000 1.9 +++ openacs-4/packages/logger/www/index.adp 28 Aug 2003 09:45:30 -0000 1.10 @@ -1,5 +1,5 @@ -Logger Application +@instance_name@ @@ -69,7 +69,8 @@ projection_value="@selected_projection_value;noquote@" selected_user_id="@selected_user_id;noquote@" start_date_ansi="@selected_start_date;noquote@" - end_date_ansi="@selected_end_date;noquote@"/> + end_date_ansi="@selected_end_date;noquote@" + group_by="@selected_group_by;noquote@" /> Index: openacs-4/packages/logger/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/index.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/logger/www/index.tcl 9 May 2003 15:07:48 -0000 1.10 +++ openacs-4/packages/logger/www/index.tcl 28 Aug 2003 09:45:30 -0000 1.11 @@ -11,10 +11,20 @@ {selected_user_id:integer ""} {selected_start_date ""} {selected_end_date ""} + {selected_group_by ""} } +if { [empty_string_p [ad_conn query]] } { + set weekdayno [clock format [clock seconds] -format %w] + set new_start_date [clock format [clock scan "-$weekdayno days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "[expr 6-$weekdayno] days"] -format "%Y-%m-%d"] + ad_returnredirect ".?[export_vars { { selected_start_date $new_start_date } { selected_end_date $new_end_date } { selected_group_by "time_stamp" } }]" + ad_script_abort +} + set package_id [ad_conn package_id] set current_user_id [ad_conn user_id] +set instance_name [ad_conn instance_name] set admin_p [permission::permission_p -object_id $package_id -privilege admin] set filter_var_list { @@ -24,6 +34,7 @@ selected_user_id selected_start_date selected_end_date + selected_group_by } @@ -136,7 +147,7 @@ } } # Redirect so we get the dates in pretty mode - ad_returnredirect ".?[export_vars $filter_var_list]" + ad_returnredirect ".?[export_vars -no_empty $filter_var_list]" ad_script_abort } @@ -150,7 +161,7 @@ ########### if { [exists_and_not_null selected_project_id] } { - set all_projects_url ".?[export_vars -exclude { selected_project_id } $filter_var_list]" + set all_projects_url ".?[export_vars -no_empty -exclude { selected_project_id } $filter_var_list]" } else { set all_projects_url {} } @@ -161,8 +172,8 @@ db_multirow -extend { filter_name url entry_add_url selected_p clear_url start_date end_date } filters select_projects {} { set filter_name "Projects" - set url ".?[export_vars -override { { selected_project_id $unique_id } } $filter_var_list]" - set entry_add_url "log?[export_vars { { project_id $unique_id } {variable_id $selected_variable_id}}]" + set url ".?[export_vars -no_empty -override { { selected_project_id $unique_id } } $filter_var_list]" + set entry_add_url "log?[export_vars -no_empty { { project_id $unique_id } {variable_id $selected_variable_id}}]" set selected_p [string equal $selected_project_id $unique_id] set name [string_truncate -len 25 $name] set clear_url $all_projects_url @@ -207,10 +218,10 @@ db_multirow -append -extend { filter_name url entry_add_url selected_p clear_url start_date end_date } filters select_variables {} { set filter_name "Variables" - set url ".?[export_vars -override { {selected_variable_id $unique_id} } $filter_var_list]" + set url ".?[export_vars -no_empty -override { {selected_variable_id $unique_id} } $filter_var_list]" if { ![empty_string_p $selected_project_id] } { # A project is selected - enable logging - set entry_add_url "log?[export_vars { { variable_id $unique_id } {project_id $selected_project_id}}]" + set entry_add_url "log?[export_vars -no_empty { { variable_id $unique_id } {project_id $selected_project_id}}]" } else { # No project selected - we wont enable those url:s set entry_add_url "" @@ -226,7 +237,7 @@ ########### if { [exists_and_not_null selected_user_id] } { - set all_users_url ".?[export_vars -exclude { selected_user_id } $filter_var_list]" + set all_users_url ".?[export_vars -no_empty -exclude { selected_user_id } $filter_var_list]" } else { set all_users_url {} } @@ -248,7 +259,7 @@ db_multirow -append -extend { filter_name url entry_add_url selected_p clear_url start_date end_date } filters select_users {} { set filter_name "Users" - set url ".?[export_vars -override { {selected_user_id $unique_id} } $filter_var_list]" + set url ".?[export_vars -no_empty -override { {selected_user_id $unique_id} } $filter_var_list]" set entry_add_url {} set selected_p [string equal $selected_user_id $unique_id] set clear_url $all_users_url @@ -264,15 +275,15 @@ if { ![empty_string_p $selected_project_id] && ![empty_string_p $selected_variable_id] } { if { [exists_and_not_null selected_projection_id] } { - set clear_projections_url ".?[export_vars -exclude { selected_projection_id } $filter_var_list]" + set clear_projections_url ".?[export_vars -no_empty -exclude { selected_projection_id } $filter_var_list]" } else { set clear_projections_url {} } db_multirow -append -extend { filter_name url entry_add_url selected_p clear_url } filters select_projections {} { set filter_name "Projections" set name [string_truncate -len 25 $name] - set url ".?[export_vars -override { {selected_projection_id $unique_id} { selected_start_date $start_date } { selected_end_date $end_date } } $filter_var_list]" + set url ".?[export_vars -no_empty -override { {selected_projection_id $unique_id} { selected_start_date $start_date } { selected_end_date $end_date } } $filter_var_list]" set entry_add_url {} set selected_p [string equal $selected_projection_id $unique_id] set clear_url $clear_projections_url @@ -287,7 +298,7 @@ ##### if { [exists_and_not_null selected_start_date] || [exists_and_not_null selected_end_date] } { - set date_clear_url ".?[export_vars -exclude { selected_start_date selected_end_date } $filter_var_list]" + set date_clear_url ".?[export_vars -no_empty -exclude { selected_start_date selected_end_date } $filter_var_list]" } else { set date_clear_url {} } @@ -299,8 +310,18 @@ set weekdayno [clock format [clock seconds] -format %w] set monthdayno [string trimleft [clock format [clock seconds] -format %d] 0] -foreach type { this_week last_week past_7 this_month last_month past_30 } { +foreach type { today yesterday this_week last_week past_7 this_month last_month past_30 } { switch $type { + today { + set name "Today" + set new_start_date [clock format [clock seconds] -format "%Y-%m-%d"] + set new_end_date [clock format [clock seconds] -format "%Y-%m-%d"] + } + yesterday { + set name "Yesterday" + set new_start_date [clock format [clock scan "-1 days"] -format "%Y-%m-%d"] + set new_end_date [clock format [clock scan "-1 days"] -format "%Y-%m-%d"] + } this_week { set name "This week" set new_start_date [clock format [clock scan "-$weekdayno days"] -format "%Y-%m-%d"] @@ -333,7 +354,7 @@ } } - set url ".?[export_vars -override { { selected_start_date $new_start_date } { selected_end_date $new_end_date }} $filter_var_list]" + set url ".?[export_vars -no_empty -override { { selected_start_date $new_start_date } { selected_end_date $new_end_date }} $filter_var_list]" set selected_p [expr [string equal $selected_start_date $new_start_date] && [string equal $selected_end_date $new_end_date]] @@ -346,5 +367,37 @@ # Custom if { $custom_p } { + # unique_id name filter_name url entry_add_url selected_p clear_url multirow append filters "" "Custom range" $filter_name "" "" $custom_p $date_clear_url {} {} } + +##### +# +# Group by filter +# +##### + +# TODO: +# Flag to export_vars -no_empty which doesn't export empty strings + +if { [exists_and_not_null selected_group_by] } { + set group_clear_url ".?[export_vars -no_empty -exclude { selected_group_by } $filter_var_list]" +} else { + set group_clear_url {} +} + +array set group_label { + time_stamp "Day" + time_stamp_week "Week" + project_name "Project" + user_id "User" +} + +foreach unique_id { time_stamp_week time_stamp project_name user_id } { + set url ".?[export_vars -no_empty -override { { selected_group_by $unique_id } } $filter_var_list]" + + set selected_p [string equal $selected_group_by $unique_id] + + # unique_id name filter_name url entry_add_url selected_p clear_url + multirow append filters $unique_id $group_label($unique_id) "Group by" $url "" $selected_p $group_clear_url +} Index: openacs-4/packages/logger/www/log.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/log.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/logger/www/log.adp 22 May 2003 15:01:52 -0000 1.8 +++ openacs-4/packages/logger/www/log.adp 28 Aug 2003 09:45:30 -0000 1.9 @@ -53,12 +53,19 @@ -

      Log history for the past @log_history_n_days@ days

      +

      Log history (@start_date_ansi@ to @end_date_ansi@)

      +

      + The log history is + shown @log_history_n_days@ days back from your last logged entry, or @log_history_n_days@ days back from + today if you have no previously logged entries. +

      +
      Index: openacs-4/packages/logger/www/log.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/log.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/logger/www/log.tcl 9 May 2003 15:07:48 -0000 1.9 +++ openacs-4/packages/logger/www/log.tcl 28 Aug 2003 09:45:30 -0000 1.10 @@ -8,6 +8,8 @@ entry_id:integer,optional project_id:integer,optional variable_id:integer,optional + {edit:boolean "f"} + {return_url "."} } -validate { project_id_required_in_add_mode { # For the sake of simplicity of the form @@ -29,41 +31,10 @@ if { [string equal [form get_action log_entry_form] "done"] } { # User is done editing - redirect back to index page - ad_returnredirect . + ad_returnredirect $return_url ad_script_abort } -# Different page title and form mode when adding a log entry -# versus displaying/editing one -if { [exists_and_not_null entry_id] } { - # Initial request in display or edit mode or a submit of the form - set page_title "Edit Log Entry" - set ad_form_mode edit -} else { - # Initial request in add mode - set page_title "Add Log Entry" - set ad_form_mode edit -} - -set context [list $page_title] - -# Build the log entry form elements -set actions [list] -if { $entry_exists_p && [permission::permission_p -object_id $entry_id -privilege write] } { - lappend actions { Edit formbuilder::edit } -} -lappend actions { Done done } - -ad_form -name log_entry_form -cancel_url index -mode $ad_form_mode \ - -actions $actions -form { - entry_id:key(acs_object_id_seq) -} - -# On various occasions we need to know if we are dealing with a submit with the -# form or an initial request (could also be with error message after unaccepted submit) -set submit_p [form is_valid log_entry_form] - - ########### # # Get project and variable info @@ -102,6 +73,49 @@ # ########### +# The creator of a log entry can always edit it +if { $entry_exists_p } { + set edit_p [expr [permission::permission_p -object_id $entry_id -privilege write] || \ + $current_user_id == $entry_array(creation_user)] +} else { + set edit_p 0 +} + +# Different page title and form mode when adding a log entry +# versus displaying/editing one +if { [exists_and_not_null entry_id] } { + # Initial request in display or edit mode or a submit of the form + set page_title "Edit Log Entry" + if { [string equal $edit "t"] && $edit_p } { + set ad_form_mode edit + } else { + set ad_form_mode display + } +} else { + # Initial request in add mode + set page_title "Add Log Entry" + set ad_form_mode edit +} + +set context [list $page_title] + + +# Build the log entry form elements +set actions [list] +if { $edit_p } { + lappend actions { Edit formbuilder::edit } +} +lappend actions { Done done } + +ad_form -name log_entry_form -cancel_url $return_url -mode $ad_form_mode \ + -actions $actions -form { + entry_id:key(acs_object_id_seq) +} + +# On various occasions we need to know if we are dealing with a submit with the +# form or an initial request (could also be with error message after unaccepted submit) +set submit_p [form is_valid log_entry_form] + ad_form -extend -name log_entry_form -form { {project:text(inform) {label Project} @@ -115,6 +129,8 @@ {variable_id:integer(hidden) {value $variable_id} } + + {return_url:text(hidden) {value $return_url}} } # Add form elements common to all modes @@ -194,8 +210,7 @@ -time_stamp $time_stamp_ansi \ -description $description } -after_submit { - - ad_returnredirect "[ad_conn url]?[export_vars { project_id variable_id }]" + ad_returnredirect "[ad_conn url]?[export_vars { project_id variable_id return_url }]" ad_script_abort } @@ -215,12 +230,41 @@ set show_log_history_p [expr $entry_edited_by_owner_p || ! $entry_exists_p] -set log_history_n_days 31 -set seconds_per_day [expr 60*60*24] -set start_date_seconds [expr [clock seconds] - $log_history_n_days * $seconds_per_day] -set start_date_ansi [clock format $start_date_seconds \ - -format "%Y-%m-%d"] +if { $show_log_history_p } { + # Show N number of days previous to the last logged entry by the user + set ansi_format_string "%Y-%m-%d" + set last_logged_date [db_string last_logged_date { + select to_char(le.time_stamp, 'YYYY-MM-DD') + from logger_entries le, + acs_objects ao + where le.entry_id = ao.object_id + and le.variable_id = :variable_id + and le.project_id = :project_id + and ao.creation_user = :current_user_id + and ao.creation_date = (select max(ao.creation_date) + from logger_entries le, + acs_objects ao + where le.entry_id = ao.object_id + and le.variable_id = :variable_id + and le.project_id = :project_id + and ao.creation_user = :current_user_id + ) + } -default ""] + if { ![empty_string_p $last_logged_date] } { + set end_date_ansi $last_logged_date + set end_date_seconds [clock scan $end_date_ansi] + } else { + # Default end date to now + set end_date_seconds [clock seconds] + set end_date_ansi [clock format $end_date_seconds -format $ansi_format_string] + } + set log_history_n_days 31 + set seconds_per_day [expr 60*60*24] + set start_date_seconds [expr $end_date_seconds - $log_history_n_days * $seconds_per_day] + set start_date_ansi [clock format $start_date_seconds \ + -format $ansi_format_string] +} set add_entry_url "log?[export_vars { project_id variable_id }]" Index: openacs-4/packages/logger/www/admin/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/www/admin/index-oracle.xql 8 May 2003 13:56:04 -0000 1.2 +++ openacs-4/packages/logger/www/admin/index-oracle.xql 28 Aug 2003 09:45:31 -0000 1.3 @@ -39,6 +39,7 @@ ) or lv.package_id = :package_id or lv.package_id is null) + order by lv.name @@ -52,6 +53,7 @@ where ppm.project_id = p.project_id and ppm.package_id = :package_id) and acs_permission.permission_p(p.project_id, :user_id, 'read') = 't' + order by p.name Index: openacs-4/packages/logger/www/admin/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/logger/www/admin/index-postgresql.xql 8 May 2003 13:56:04 -0000 1.2 +++ openacs-4/packages/logger/www/admin/index-postgresql.xql 28 Aug 2003 09:45:31 -0000 1.3 @@ -39,6 +39,7 @@ ) or lv.package_id = :package_id or lv.package_id is null) + order by lv.name @@ -52,6 +53,7 @@ where ppm.project_id = p.project_id and ppm.package_id = :package_id) and acs_permission__permission_p(p.project_id, :user_id, 'read') = 't' + order by p.name Index: openacs-4/packages/logger/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/logger/www/admin/index.adp 22 May 2003 15:02:07 -0000 1.9 +++ openacs-4/packages/logger/www/admin/index.adp 28 Aug 2003 09:45:31 -0000 1.10 @@ -33,7 +33,7 @@ - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + @@ -88,15 +196,16 @@ - - - - - - - - - + + + + + + + + + +
      @projects.name@ YesNo Yes (toggle)No (toggle) @projects.project_lead_chunk@ Index: openacs-4/packages/logger/www/admin/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/index.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/logger/www/admin/index.tcl 8 May 2003 13:56:04 -0000 1.6 +++ openacs-4/packages/logger/www/admin/index.tcl 28 Aug 2003 09:45:31 -0000 1.7 @@ -21,14 +21,19 @@ # ########### -db_multirow -extend { edit_url display_url permissions_url delete_url unmap_url project_lead_chunk } projects select_projects {} { +db_multirow -extend { + edit_url display_url permissions_url delete_url unmap_url project_lead_chunk + make_active_url make_inactive_url +} projects select_projects {} { set description [string_truncate -len 50 $description] set edit_url "project?[export_vars { project_id {formbutton\:formbuilder\:\:edit Edit} {form\:id project_form} {form\:mode display}}]" set display_url "project?[export_vars { project_id }]" set unmap_url "project-instance-map?[export_vars { project_id {unmap "t"} }]" set permissions_url "${permissions_uri}?[export_vars {{object_id $project_id} application_url}]" set delete_url "project-delete?[export_vars { project_id }]" + set make_active_url "project-make-active?[export_vars { project_id }]" + set make_inactive_url "project-make-inactive?[export_vars { project_id }]" set project_lead_chunk [ad_present_user $project_lead_id $project_lead_name] } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/logger/www/admin/project-make-active.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/logger/www/admin/project-make-inactive.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/logger/www/admin/project.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/admin/project.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/logger/www/admin/project.tcl 8 May 2003 13:56:04 -0000 1.9 +++ openacs-4/packages/logger/www/admin/project.tcl 28 Aug 2003 09:45:31 -0000 1.10 @@ -57,11 +57,31 @@ {html {cols 60 rows 13}} {label "Description"} } -} -select_query { - select name, - description - from logger_projects - where project_id = :project_id + + {project_lead:search + {result_datatype integer} + {label {Project Lead}} + {options [logger::project::users_get_options]} + {search_query {[db_map dbqd.acs-tcl.tcl.community-core-procs.user_search]}} + } +} + +if { ![ad_form_new_p -key project_id] } { + ad_form -extend -name project_form -form { + {active_p:text(radio) + {label "Active"} + {options {{Yes t} {No f}}} + } + } +} + +ad_form -extend -name project_form -select_query { + select name, + description, + project_lead, + active_p + from logger_projects + where project_id = :project_id } -validate { { name @@ -71,19 +91,24 @@ } -new_data { - logger::project::new -project_id $project_id \ - -name $name \ - -description $description \ + logger::project::new \ + -project_id $project_id \ + -name $name \ + -description $description \ + -project_lead $project_lead + } -edit_data { # The edit proc requires all attributes to be provided # so use the old values for project_lead and active_p - logger::project::get -project_id $project_id -array old_project - logger::project::edit -project_id $project_id \ - -name $name \ - -description $description \ - -project_lead $old_project(project_lead) \ - -active_p $old_project(active_p) + + logger::project::edit \ + -project_id $project_id \ + -name $name \ + -description $description \ + -project_lead $project_lead \ + -active_p $active_p + } -after_submit { ad_returnredirect "[ad_conn url]?project_id=$project_id" 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 -r1.4 -r1.5 --- openacs-4/packages/logger/www/admin/projection.tcl 9 May 2003 15:08:03 -0000 1.4 +++ openacs-4/packages/logger/www/admin/projection.tcl 28 Aug 2003 09:45:31 -0000 1.5 @@ -60,7 +60,6 @@ {variable_id:integer(select) {label Variable} {options {[logger::ui::variable_options -project_id $project_id]}} - {mode display} } {value:text 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 -r1.1 -r1.2 --- openacs-4/packages/logger/www/lib/entries-table-oracle.xql 8 May 2003 13:56:20 -0000 1.1 +++ openacs-4/packages/logger/www/lib/entries-table-oracle.xql 28 Aug 2003 09:45:31 -0000 1.2 @@ -6,9 +6,11 @@ select le.entry_id as id, - acs_permission.permission_p(le.entry_id, :user_id, 'delete') as delete_p, + 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, 'fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, + 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.name as project_name, @@ -22,7 +24,7 @@ and ao.object_id = le.entry_id and ao.creation_user = submitter.user_id [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"] - order by le.time_stamp desc, ao.creation_date desc + order by $order_by 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 -r1.1 -r1.2 --- openacs-4/packages/logger/www/lib/entries-table-postgresql.xql 8 May 2003 13:56:20 -0000 1.1 +++ openacs-4/packages/logger/www/lib/entries-table-postgresql.xql 28 Aug 2003 09:45:31 -0000 1.2 @@ -6,9 +6,11 @@ select le.entry_id as id, - acs_permission__permission_p(le.entry_id, :user_id, 'delete') as delete_p, + 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, 'fmMMfm-fmDDfm-YYYY') as time_stamp_pretty, + 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.name as project_name, @@ -22,7 +24,7 @@ and ao.object_id = le.entry_id and ao.creation_user = submitter.user_id [ad_decode $where_clauses "" "" "and [join $where_clauses "\n and "]"] - order by le.time_stamp desc, ao.creation_date desc + order by $order_by Index: openacs-4/packages/logger/www/lib/entries-table.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/logger/www/lib/entries-table.adp 8 May 2003 13:56:20 -0000 1.4 +++ openacs-4/packages/logger/www/lib/entries-table.adp 28 Aug 2003 09:45:31 -0000 1.5 @@ -14,37 +14,140 @@ Description  
      +   +
      + + + User: @entries.user_chunk@ + + + Project: @entries.project_name@ + + + Date: @entries.time_stamp_pretty@ + + + Week: @entries.time_stamp_week@ + + + Unknown group by column @group_by@ + + +
      + + Edit + + @entries.project_name@@entries.user_chunk@@entries.time_stamp_pretty@ + @entries.value@ + + @entries.description@ + + + Delete + +
        + + Subtotal + + + Subtotal Average + + + + @entries.subtotal@ + + + @entries.subaverage@ + +   
      - Edit - @entries.project_name@@entries.user_chunk@@entries.time_stamp_pretty@ - @entries.value@ - @entries.description@ - - Delete + +
      + + Edit + + @entries.project_name@@entries.user_chunk@@entries.time_stamp_pretty@ + + @entries.value@ + + + @entries.value@ + + + @entries.description@ + + + Delete + +
      +   +
        @@ -79,6 +182,11 @@ +
      +   +
        Projection
          @variable.unit@  
          @variable.unit@  
      Index: openacs-4/packages/logger/www/lib/entries-table.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/logger/www/lib/Attic/entries-table.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/logger/www/lib/entries-table.tcl 9 May 2003 11:05:02 -0000 1.5 +++ openacs-4/packages/logger/www/lib/entries-table.tcl 28 Aug 2003 09:45:31 -0000 1.6 @@ -8,8 +8,9 @@ # start_date_ansi # end_date_ansi # projection_value +# group_by:optional -set user_id [ad_conn user_id] +set current_user_id [ad_conn user_id] set package_id [ad_conn package_id] set where_clauses [list] @@ -48,15 +49,34 @@ set selected_entry_id {} } +set order_by "le.time_stamp desc, ao.creation_date desc" + +# If we're grouping by, we should sort by that column first +if { [exists_and_not_null group_by] } { + switch -exact $group_by { + user_id { + set order_by "user_name asc, $order_by" + } + project_name { + set order_by "project_name asc, $order_by" + } + } +} + set value_total 0 set value_count 0 -db_multirow -extend { edit_url delete_url delete_onclick user_chunk selected_p } entries select_entries {} { +set last_group_by_value {} +set value_subcount 0 +set value_subtotal 0 + +db_multirow -extend { subtotal subaverage view_url edit_url delete_url delete_onclick user_chunk selected_p } entries select_entries {} { set description [string_truncate -len 50 $description] set project_name [string_truncate -len 20 $project_name] set selected_p [string equal $id $selected_entry_id] set action_links_list [list] - set edit_url "log?[export_vars { { entry_id $id } }]" + set view_url "log?[export_vars { { entry_id $id } }]" + set edit_url "log?[export_vars { { entry_id $id } { edit "t" } }]" if { $delete_p } { set delete_onclick "return confirm('Are you sure you want to delete log entry with $value $variable(unit) $variable(name) on $time_stamp?');" set delete_url "log-delete?[export_vars { { entry_id $id } }]" @@ -66,6 +86,24 @@ set user_chunk [ad_present_user $user_id $user_name] + if { [exists_and_not_null group_by] } { + # Should we reset the subtotal? + if { ![string equal $last_group_by_value [set $group_by]] } { + set value_subtotal 0 + set value_subcount 0 + } + + # Calculate new subtotal/average + set value_subtotal [expr $value_subtotal + $value] + incr value_subcount + + # and store it in the column + set subtotal $value_subtotal + set subaverage [expr round(100.0 * $value_subtotal / $value_subcount) / 100.0] + + set last_group_by_value [set $group_by] + } + set value_total [expr $value_total + $value] incr value_count } Index: openacs-4/packages/monitoring/monitoring.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/monitoring.info,v diff -u -r1.6 -r1.7 --- openacs-4/packages/monitoring/monitoring.info 17 May 2003 10:46:40 -0000 1.6 +++ openacs-4/packages/monitoring/monitoring.info 28 Aug 2003 09:41:57 -0000 1.7 @@ -88,13 +88,13 @@ - + - + Index: openacs-4/packages/monitoring/www/top/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/monitoring/www/top/index-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/monitoring/www/top/index-postgresql.xql 19 Aug 2002 23:10:29 -0000 1.1 +++ openacs-4/packages/monitoring/www/top/index-postgresql.xql 28 Aug 2003 09:41:57 -0000 1.2 @@ -14,15 +14,15 @@ - + (24 - (:end_time ::integer - $current_hour ::integer)) / 24 + + (interval '24 hours' - (interval '$end_time hours' - interval '$current_hour hours')) - and (timestamp + :n_days ::integer $hour_correction) > current_timestamp + and (timestamp + interval '$n_days days' $hour_correction) > current_timestamp Index: openacs-4/packages/news/sql/oracle/news-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/oracle/news-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/news/sql/oracle/news-create.sql 12 Mar 2003 15:43:08 -0000 1.5 +++ openacs-4/packages/news/sql/oracle/news-create.sql 28 Aug 2003 09:41:57 -0000 1.6 @@ -368,14 +368,15 @@ item_id => v_id, name => v_name, parent_id => v_parent_id, + context_id => package_id, locale => locale, item_subtype => item_subtype, content_type => content_type, mime_type => mime_type, nls_language => nls_language, relation_tag => relation_tag, creation_date => creation_date, - creation_ip => creation_ip, + creation_ip => creation_ip, creation_user => creation_user ); v_revision_id := content_revision.new( Index: openacs-4/packages/news/sql/postgresql/news-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/sql/postgresql/news-create.sql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/news/sql/postgresql/news-create.sql 23 Aug 2003 19:20:32 -0000 1.13 +++ openacs-4/packages/news/sql/postgresql/news-create.sql 28 Aug 2003 09:41:57 -0000 1.14 @@ -270,7 +270,7 @@ p_locale, -- locale current_timestamp, -- creation_date p_creation_user, -- creation_user - null, -- context_id + p_package_id, -- context_id p_creation_ip, -- creation_ip ''content_item'', -- item_subtype ''news'', -- content_type Index: openacs-4/packages/news/tcl/news-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/tcl/news-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/news/tcl/news-procs.tcl 13 May 2003 08:11:52 -0000 1.8 +++ openacs-4/packages/news/tcl/news-procs.tcl 28 Aug 2003 09:41:57 -0000 1.9 @@ -108,7 +108,7 @@ @author Robert Locke } { - set package_id [db_string get_package_id {*SQL*}] + set package_id [db_string get_package_id {}] set url_stub [news_util_get_url $package_id] db_1row get_item_id " Index: openacs-4/packages/news/www/item.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/news/www/item.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/news/www/item.adp 3 Jul 2003 19:39:34 -0000 1.6 +++ openacs-4/packages/news/www/item.adp 28 Aug 2003 09:41:57 -0000 1.7 @@ -19,12 +19,10 @@ @comments@ -
      • @comment_link;noquote@
      -
      Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/news-aggregator.info'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/sql/oracle/news-aggregator-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/news-aggregator/sql/oracle/news-aggregator-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/news-aggregator/sql/oracle/news-aggregator-package-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/news-aggregator/sql/oracle/news-aggregator-package-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/news-aggregator/sql/postgresql/news-aggregator-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/news-aggregator/sql/postgresql/news-aggregator-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/news-aggregator/tcl/news-aggregator-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/tcl/news-aggregator-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/tcl/news-aggregator-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/index-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/index-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/index.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/index.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/index.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/source-update.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/subscriptions-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/subscriptions-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/subscriptions.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/subscriptions.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/subscriptions.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator/www/update.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/news-aggregator-portlet.info'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/tcl/apm-callback-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/tcl/news-aggregator-admin-portlet-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/tcl/news-aggregator-portlet-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-admin-portlet.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-admin-portlet.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-portlet-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-portlet-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-portlet.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-portlet.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/news-aggregator-portlet/www/news-aggregator-portlet.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/notifications/notifications.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/notifications.info,v diff -u -r1.19 -r1.20 --- openacs-4/packages/notifications/notifications.info 19 May 2003 17:22:26 -0000 1.19 +++ openacs-4/packages/notifications/notifications.info 28 Aug 2003 09:41:58 -0000 1.20 @@ -8,7 +8,7 @@ t notifications - + oracle postgresql @@ -17,10 +17,13 @@ Notification Management 2003-02-17 - + + + + Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/delivery-method-sc-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/email-sc-impl-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/notification-type-sc-create.sql'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.11 -r1.12 --- openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 17 May 2003 10:52:25 -0000 1.11 +++ openacs-4/packages/notifications/sql/oracle/notifications-core-create.sql 28 Aug 2003 09:41:58 -0000 1.12 @@ -1,5 +1,5 @@ -- --- The Notifications Package +-- The Notifications -- -- @author Ben Adida (ben@openforce.net) -- @version $Id$ @@ -155,6 +155,9 @@ -- this is to allow responses to notifications response_id constraint notif_reponse_id_fk references acs_objects (object_id), + notif_user integer + constraint notif_user_id_fk + references users(user_id), notif_subject varchar(1000), notif_text clob, notif_html clob Index: openacs-4/packages/notifications/sql/oracle/notifications-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/notifications/sql/oracle/notifications-create.sql 9 Aug 2002 20:51:49 -0000 1.7 +++ openacs-4/packages/notifications/sql/oracle/notifications-create.sql 28 Aug 2003 09:41:58 -0000 1.8 @@ -16,11 +16,5 @@ @ notifications-replies-create.sql @ notifications-replies-package-create.sql --- the service contracts will eventually be created --- @ notifications-interval-sc-create.sql --- @ notifications-delivery-sc-create.sql - -@ notification-type-sc-create.sql -@ delivery-method-sc-create.sql @ notifications-init.sql -@ email-sc-impl-create.sql + Index: openacs-4/packages/notifications/sql/oracle/notifications-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-init.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/notifications/sql/oracle/notifications-init.sql 9 Aug 2002 20:51:49 -0000 1.4 +++ openacs-4/packages/notifications/sql/oracle/notifications-init.sql 28 Aug 2003 09:41:58 -0000 1.5 @@ -35,15 +35,6 @@ creation_ip => null ); --- This now done by email-sc-impl-create.sql --- --- v_foo:= notification_delivery_method.new( --- short_name => 'email', --- pretty_name => 'Email', --- creation_user => null, --- creation_ip => null --- ); - end; / show errors Index: openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql 17 May 2003 10:52:25 -0000 1.8 +++ openacs-4/packages/notifications/sql/oracle/notifications-package-create.sql 28 Aug 2003 09:41:58 -0000 1.9 @@ -330,6 +330,7 @@ object_id in notifications.object_id%TYPE, notif_date in notifications.notif_date%TYPE default sysdate, response_id in notifications.response_id%TYPE default null, + notif_user in notifications.notif_user%TYPE default null, notif_subject in notifications.notif_subject%TYPE default null, notif_text in varchar default null, notif_html in varchar default null, @@ -358,6 +359,7 @@ object_id in notifications.object_id%TYPE, notif_date in notifications.notif_date%TYPE default sysdate, response_id in notifications.response_id%TYPE default null, + notif_user in notifications.notif_user%TYPE default null, notif_subject in notifications.notif_subject%TYPE default null, notif_text in varchar default null, notif_html in varchar default null, @@ -379,9 +381,9 @@ ); insert into notifications - (notification_id, type_id, object_id, notif_date, response_id, notif_subject, notif_text, notif_html) + (notification_id, type_id, object_id, notif_date, response_id, notif_user, notif_subject, notif_text, notif_html) values - (v_notification_id, type_id, object_id, notif_date, response_id, notif_subject, notif_text, notif_html); + (v_notification_id, type_id, object_id, notif_date, response_id, notif_user, notif_subject, notif_text, notif_html); return v_notification_id; end new; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/oracle/upgrade/upgrade-4.6.2-4.6.4.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.4 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/delivery-method-sc-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/email-sc-impl-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/notification-type-sc-create.sql'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.10 -r1.11 --- openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 17 May 2003 10:53:27 -0000 1.10 +++ openacs-4/packages/notifications/sql/postgresql/notifications-core-create.sql 28 Aug 2003 09:41:58 -0000 1.11 @@ -167,6 +167,10 @@ response_id integer constraint notif_reponse_id_fk references acs_objects (object_id), + -- this is the user that caused the notification to go out + notif_user integer + constraint notif_user_id_fk + references users(user_id), notif_subject varchar(1000), notif_text text, notif_html text @@ -199,78 +203,68 @@ -- -- Object Types -- -create function inline_0 () -returns integer as ' -begin +select acs_object_type__create_type( + 'notification_interval', + 'Notification Interval', + 'Notification Intervals', + 'acs_object', + 'notification_intervals', + 'interval_id', + 'notification_interval', + 'f', + null, + null +); - perform acs_object_type__create_type( - ''notification_interval'', - ''Notification Interval'', - ''Notification Intervals'', - ''acs_object'', - ''notification_intervals'', - ''interval_id'', - ''notification_interval'', - ''f'', - null, - null - ); +select acs_object_type__create_type( + 'notification_delivery_method', + 'Notification Delivery Method', + 'Notification Delivery Methods', + 'acs_object', + 'notification_delivery_methods', + 'delivery_method_id', + 'notification_delivery_method', + 'f', + null, + null +); - perform acs_object_type__create_type( - ''notification_delivery_method'', - ''Notification Delivery Method'', - ''Notification Delivery Methods'', - ''acs_object'', - ''notification_delivery_methods'', - ''delivery_method_id'', - ''notification_delivery_method'', - ''f'', - null, - null - ); +select acs_object_type__create_type( + 'notification_type', + 'Notification Type', + 'Notification Types', + 'acs_object', + 'notification_types', + 'type_id', + 'notification_type', + 'f', + null, + null +); - perform acs_object_type__create_type( - ''notification_type'', - ''Notification Type'', - ''Notification Types'', - ''acs_object'', - ''notification_types'', - ''type_id'', - ''notification_type'', - ''f'', - null, - null - ); +select acs_object_type__create_type( + 'notification_request', + 'Notification Request', + 'Notification Requests', + 'acs_object', + 'notification_requests', + 'request_id', + 'notification_request', + 'f', + null, + null +); - perform acs_object_type__create_type( - ''notification_request'', - ''Notification Request'', - ''Notification Requests'', - ''acs_object'', - ''notification_requests'', - ''request_id'', - ''notification_request'', - ''f'', - null, - null - ); +select acs_object_type__create_type( + 'notification', + 'Notification', + 'Notifications', + 'acs_object', + 'notifications', + 'notification_id', + 'notification', + 'f', + null, + null +); - perform acs_object_type__create_type( - ''notification'', - ''Notification'', - ''Notifications'', - ''acs_object'', - ''notifications'', - ''notification_id'', - ''notification'', - ''f'', - null, - null - ); - - return null; - -end;' language 'plpgsql'; - -select inline_0(); -drop function inline_0(); Index: openacs-4/packages/notifications/sql/postgresql/notifications-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/notifications/sql/postgresql/notifications-create.sql 9 Aug 2002 20:51:50 -0000 1.5 +++ openacs-4/packages/notifications/sql/postgresql/notifications-create.sql 28 Aug 2003 09:41:58 -0000 1.6 @@ -14,12 +14,4 @@ \i notifications-replies-create.sql \i notifications-replies-package-create.sql --- the service contracts will eventually be created --- @ notifications-interval-sc-create.sql --- @ notifications-delivery-sc-create.sql - -\i notification-type-sc-create.sql - -\i delivery-method-sc-create.sql \i notifications-init.sql -\i email-sc-impl-create.sql Index: openacs-4/packages/notifications/sql/postgresql/notifications-init.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-init.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/notifications/sql/postgresql/notifications-init.sql 9 Aug 2002 20:51:50 -0000 1.4 +++ openacs-4/packages/notifications/sql/postgresql/notifications-init.sql 28 Aug 2003 09:41:58 -0000 1.5 @@ -8,56 +8,32 @@ -- GNU GPL v2 -- --- initialize some stuff -create function inline_0 () -returns integer as ' -begin +select notification_interval__new ( + null, + 'daily', + 3600 * 24, + now(), + null, + null, + null +); - perform notification_interval__new ( - null, - ''daily'', - 3600 * 24, - now(), - null, - null, - null - ); +select notification_interval__new ( + null, + 'hourly', + 3600, + now(), + null, + null, + null +); - perform notification_interval__new ( - null, - ''hourly'', - 3600, - now(), - null, - null, - null - ); - - perform notification_interval__new ( - null, - ''instant'', - 0, - now(), - null, - null, - null - ); - --- This is now done by email-sc-impl-create.sql --- --- perform notification_delivery_method__new ( --- null, --- ''email'', --- ''Email'', --- now(), --- null, --- null, --- null --- ); - - return null; - -end;' language 'plpgsql'; - -select inline_0(); -drop function inline_0 (); +select notification_interval__new ( + null, + 'instant', + 0, + now(), + null, + null, + null +); Index: openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 17 May 2003 10:53:27 -0000 1.11 +++ openacs-4/packages/notifications/sql/postgresql/notifications-package-create.sql 28 Aug 2003 09:41:58 -0000 1.12 @@ -236,23 +236,24 @@ end; ' language 'plpgsql'; -select define_function_args ('notification__new','notification_id,type_id,object_id,notif_date,response_id,notif_subject,notif_text,notif_html,creation_date,creation_user,creation_ip,context_id'); +select define_function_args ('notification__new','notification_id,type_id,object_id,notif_date,response_id,notif_user,notif_subject,notif_text,notif_html,creation_date,creation_user,creation_ip,context_id'); -create function notification__new(integer,integer,integer,timestamptz,integer,varchar,text,text,timestamptz,integer,varchar,integer) +create or replace function notification__new(integer,integer,integer,timestamptz,integer,integer,varchar,text,text,timestamptz,integer,varchar,integer) returns integer as ' declare p_notification_id alias for $1; p_type_id alias for $2; p_object_id alias for $3; p_notif_date alias for $4; p_response_id alias for $5; - p_notif_subject alias for $6; - p_notif_text alias for $7; - p_notif_html alias for $8; - p_creation_date alias for $9; - p_creation_user alias for $10; - p_creation_ip alias for $11; - p_context_id alias for $12; + p_notif_user alias for $6; + p_notif_subject alias for $7; + p_notif_text alias for $8; + p_notif_html alias for $9; + p_creation_date alias for $10; + p_creation_user alias for $11; + p_creation_ip alias for $12; + p_context_id alias for $13; v_notification_id integer; v_notif_date notifications.notif_date%TYPE; begin @@ -273,9 +274,9 @@ insert into notifications - (notification_id, type_id, object_id, notif_date, response_id, notif_subject, notif_text, notif_html) + (notification_id, type_id, object_id, notif_date, response_id, notif_user, notif_subject, notif_text, notif_html) values - (v_notification_id, p_type_id, p_object_id, v_notif_date, p_response_id, p_notif_subject, p_notif_text, p_notif_html); + (v_notification_id, p_type_id, p_object_id, v_notif_date, p_response_id, p_notif_user, p_notif_subject, p_notif_text, p_notif_html); return v_notification_id; end; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/sql/postgresql/upgrade/upgrade-4.6.2-4.6.4.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/tcl/apm-callback-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/tcl/delivery-method-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/tcl/delivery-method-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.7 -r1.8 --- openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 17 Jun 2003 01:04:46 -0000 1.7 +++ openacs-4/packages/notifications/tcl/delivery-method-procs.tcl 28 Aug 2003 09:41:58 -0000 1.8 @@ -14,79 +14,108 @@ } -namespace eval notification::delivery { +namespace eval notification::delivery {} - 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 {}] - } - ad_proc -public send { - {-delivery_method_id:required} - {-reply_object_id ""} - {-notification_type_id:required} - {-to_user_id:required} - {-subject:required} - {-content:required} - } { - 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] } { - ns_log notice "Blocked notification to $to_user_id subject:$subject" - return "Blocked" - } +ad_proc -private notification::delivery::get_impl_key { + {-delivery_method_id:required} +} { + Return the service contract implementation key for notification delivery methods +} { + return [db_string select_impl_key {}] +} - # Get the implementation key - set impl_key [get_impl_key -delivery_method_id $delivery_method_id] - - # Prepare the arguments - set args [list $to_user_id $reply_object_id $notification_type_id $subject $content] - - # Make the generic call - return [acs_sc_call NotificationDeliveryMethod Send $args $impl_key] +ad_proc -public notification::delivery::send { + {-delivery_method_id:required} + {-reply_object_id ""} + {-notification_type_id:required} + {-from_user_id ""} + {-to_user_id:required} + {-subject:required} + {-content:required} +} { + 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] } { + ns_log notice "Blocked notification to $to_user_id subject:$subject" + return "Blocked" } - ad_proc -public scan_replies { - {-delivery_method_id:required} - } { - 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] + # Get the implementation key + set impl_key [get_impl_key -delivery_method_id $delivery_method_id] - # Prepare the arguments - set args [list] + # Prepare the arguments + set args [list $from_user_id $to_user_id $reply_object_id $notification_type_id $subject $content] - # ns_log Notice "NOTIF-DELIV-METHOD: about to call acs_sc on $impl_key" + # Make the generic call + return [acs_sc_call NotificationDeliveryMethod Send $args $impl_key] +} - # Make the generic call - return [acs_sc_call NotificationDeliveryMethod ScanReplies $args $impl_key] - } +ad_proc -public notification::delivery::scan_replies { + {-delivery_method_id:required} +} { + 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] - ad_proc -public get_id_from_name { - -name:required - } { + # Prepare the arguments + set args [list] - Return the delivery_method_id for the given name + # ns_log Notice "NOTIF-DELIV-METHOD: about to call acs_sc on $impl_key" - @param name A delivery type name (email etc) + # Make the generic call + return [acs_sc_call NotificationDeliveryMethod ScanReplies $args $impl_key] +} - @author Don Baccus (dhogaza@pacifier.com) +ad_proc -public notification::delivery::new { + {-delivery_method_id ""} + {-sc_impl_id:required} + {-short_name:required} + {-pretty_name:required} +} { + Register a new delivery method with the notification service. +} { + set extra_vars [ns_set create] - } { + oacs_util::vars_to_ns_set \ + -ns_set $extra_vars \ + -var_list {delivery_method_id sc_impl_id short_name pretty_name} + + return [package_instantiate_object \ + -extra_vars $extra_vars \ + "notification_delivery_method"] +} - return [db_string get_delivery_method_id {}] +ad_proc -public notification::delivery::delete { + {-delivery_method_id:required} +} { + Unregister a delivery method with the notification service. +} { + db_exec_plsql delete {} +} - } +ad_proc -public notification::delivery::update_sc_impl_id { + {-delivery_method_id ""} + {-sc_impl_id:required} +} { + Register a new service contract implementation with an existing delivery method. +} { + db_dml update {} +} +ad_proc -public notification::delivery::get_id { + {-short_name:required} +} { + Return the delivery_method_id from the short_name. +} { + return [db_string select_delivery_method_id {}] } + Index: openacs-4/packages/notifications/tcl/delivery-method-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/delivery-method-procs.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/notifications/tcl/delivery-method-procs.xql 17 Jun 2003 01:04:46 -0000 1.3 +++ openacs-4/packages/notifications/tcl/delivery-method-procs.xql 28 Aug 2003 09:41:58 -0000 1.4 @@ -2,20 +2,28 @@ - - - select impl_name from acs_sc_impls, notification_delivery_methods - where acs_sc_impls.impl_id = notification_delivery_methods.sc_impl_id + + + select impl_name from acs_sc_impls, notification_delivery_methods + where acs_sc_impls.impl_id = notification_delivery_methods.sc_impl_id and delivery_method_id= :delivery_method_id - - + + + + + select delivery_method_id + from notification_delivery_methods + where short_name = :short_name + + - - - select delivery_method_id - from notification_delivery_methods where short_name = 'email' - - + + + update notification_delivery_methods + set sc_impl_id = :sc_impl_id + where delivery_method_id = :delivery_method_id + + 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.12 -r1.13 --- openacs-4/packages/notifications/tcl/notification-email-procs.tcl 17 May 2003 10:54:25 -0000 1.12 +++ openacs-4/packages/notifications/tcl/notification-email-procs.tcl 28 Aug 2003 09:41:58 -0000 1.13 @@ -81,13 +81,16 @@ } ad_proc -public send { + from_user_id to_user_id reply_object_id notification_type_id subject content } { - Send the actual email + Send the actual email. + + @param from_user_id The user_id of the user that the email should be sent as. Leave empty for the standard mailer from address. } { # Get email set email [cc_email_from_party $to_user_id] @@ -96,11 +99,31 @@ set manage_notifications_url [manage_notifications_url] append content "\n[_ notifications.lt_Getting_too_much_emai]" + # Use this to build up extra mail headers + set extra_headers [ns_set new] + + # This should disable most auto-replies. + ns_set put $extra_headers Precedence list + + set reply_to [reply_address -object_id $reply_object_id -type_id $notification_type_id] + + if { ![empty_string_p $from_user_id] && [db_0or1row get_person {}]} { + set from_email "\"$first_names $last_name\" <[cc_email_from_party $from_user_id]>" + + # Set the Reply-To and Mail-Followup-To addresses to the + # address of the notifications handler. + ns_set put $extra_headers Reply-To $reply_to + ns_set put $extra_headers Mail-Followup-To $reply_to + } else { + set from_email $reply_to + } + acs_mail_lite::send \ -to_addr $email \ - -from_addr [reply_address -object_id $reply_object_id -type_id $notification_type_id] \ + -from_addr $from_email \ -subject $subject \ - -body $content + -body $content \ + -extraheaders $extra_headers } ad_proc -private load_qmail_mail_queue { @@ -131,9 +154,9 @@ if [catch {set f [open $msg r]}] { continue } - set file [read $f] + set orig_file [read $f] close $f - set file [split $file "\n"] + set file [split $orig_file "\n"] set new_messages 1 set end_of_headers_p 0 @@ -142,35 +165,63 @@ set headers [list] # walk through the headers and extract each one + set is_auto_reply_p 0 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 } + set multiline_header_p 0 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} { - append line $next_line - incr i + 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 } - lappend headers [string tolower $name] $value + } if {$end_of_headers_p} { - incr i - break + incr i + break } } else { # The headers and the body are delimited by a null line as specified by RFC822 if {[regexp {^[ ]*$} $line match]} { - incr i - break + incr i + break } } incr i - set line [lindex $file $i] + if { $multiline_header_p } { + append line [lindex $file $i] + } else { + set line [lindex $file $i] + } } - set body "\n[join [lrange $file $i end] "\n"]" + # 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 Notice "NOTIF-INCOMING-EMAIL: message is from an auto-responder, skipping" + if {[catch {ns_unlink $msg} errmsg]} { + ns_log Notice "NOTIF-INCOMING-EMAIL: couldn't remove message $msg: $errmsg" + } + continue + } + + 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 @@ -192,7 +243,7 @@ if {[empty_string_p $from_user]} { ns_log Notice "NOTIF-INCOMING-EMAIL: no user $from" if {[catch {ns_unlink $msg} errmsg]} { - ns_log Notice "NOTIF-INCOMING-EMAIL: couldn't remove message" + ns_log Notice "NOTIF-INCOMING-EMAIL: couldn't remove message $msg: $errmsg" } continue } @@ -203,7 +254,7 @@ if {[empty_string_p $to_stuff]} { ns_log Notice "NOTIF-INCOMING-EMAIL: bad to address $to" if {[catch {ns_unlink $msg} errmsg]} { - ns_log Notice "NOTIF-INCOMING-EMAIL: couldn't remove message" + ns_log Notice "NOTIF-INCOMING-EMAIL: couldn't remove message $msg: $errmsg" } continue } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/notifications/tcl/notification-email-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? 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.7 -r1.8 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 17 May 2003 10:54:25 -0000 1.7 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 28 Aug 2003 09:41:58 -0000 1.8 @@ -83,6 +83,7 @@ {-force:boolean} {-default_request_data {}} {-return_notified:boolean} + {-notif_user {}} } { Create a new notification if any notification requests exist for the object and type. @@ -264,6 +265,10 @@ } } + if { [empty_string_p $notif_user] && [ad_conn isconnected] } { + set notif_user [ad_conn user_id] + } + # Actually carry out inserting the notification db_transaction { if { $subset_arg_p || $already_notified_arg_p } { @@ -290,9 +295,14 @@ set object_id $action_id } + # Truncate notif_subject to the max len of 100 + set notif_subject [string_truncate -len 100 $notif_subject] + # Set up the vars set extra_vars [ns_set create] - oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html} + oacs_util::vars_to_ns_set \ + -ns_set $extra_vars \ + -var_list {notification_id type_id object_id response_id notif_subject notif_text notif_html notif_user} # Create the notification package_instantiate_object -extra_vars $extra_vars notification 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.4 -r1.5 --- openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 30 Nov 2002 17:40:18 -0000 1.4 +++ openacs-4/packages/notifications/tcl/notification-reply-procs.tcl 28 Aug 2003 09:41:58 -0000 1.5 @@ -25,6 +25,10 @@ store a new reply } { set extra_vars [ns_set create] + + # Truncate subject to 100 chars, which is the limit in the data model (for some obscure reason) + set subject [string range $subject 0 99] + oacs_util::vars_to_ns_set -ns_set $extra_vars -var_list {reply_id object_id type_id from_user subject content reply_date} set reply_id [package_instantiate_object -extra_vars $extra_vars notification_reply] Index: openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-oracle.xql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 4 Jul 2003 21:18:32 -0000 1.13 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 28 Aug 2003 09:41:58 -0000 1.14 @@ -34,7 +34,8 @@ notification_requests.delivery_method_id, notification_requests.request_id, notifications.response_id, - notifications.notif_date + notifications.notif_date, + notifications.notif_user from notifications, notification_requests where notifications.type_id = notification_requests.type_id and notifications.object_id = notification_requests.object_id Index: openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-postgresql.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 4 Jul 2003 21:18:32 -0000 1.6 +++ openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 28 Aug 2003 09:41:58 -0000 1.7 @@ -26,7 +26,8 @@ type_id, delivery_method_id, response_id, - notif_date + notif_date, + notif_user from notifications inner join notification_requests using (type_id, object_id) inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) left outer join notification_user_map using (notification_id, user_id) 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.14 -r1.15 --- openacs-4/packages/notifications/tcl/sweep-procs.tcl 17 May 2003 10:54:26 -0000 1.14 +++ openacs-4/packages/notifications/tcl/sweep-procs.tcl 28 Aug 2003 09:41:58 -0000 1.15 @@ -128,12 +128,13 @@ db_transaction { # Send it notification::delivery::send \ - -to_user_id [ns_set get $notif user_id] \ - -notification_type_id [ns_set get $notif type_id] \ - -subject [ns_set get $notif notif_subject] \ - -content [ns_set get $notif notif_text] \ - -reply_object_id [ns_set get $notif response_id] \ - -delivery_method_id [ns_set get $notif delivery_method_id] + -from_user_id [ns_set get $notif notif_user] \ + -to_user_id [ns_set get $notif user_id] \ + -notification_type_id [ns_set get $notif type_id] \ + -subject [ns_set get $notif notif_subject] \ + -content [ns_set get $notif notif_text] \ + -reply_object_id [ns_set get $notif response_id] \ + -delivery_method_id [ns_set get $notif delivery_method_id] # Markt it as sent notification::mark_sent \ 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 -r1.4 -r1.5 --- openacs-4/packages/robot-detection/robot-detection.info 17 May 2003 11:14:29 -0000 1.4 +++ openacs-4/packages/robot-detection/robot-detection.info 28 Aug 2003 09:41:58 -0000 1.5 @@ -49,7 +49,7 @@ - + Index: openacs-4/packages/robot-detection/tcl/robot-detection-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/tcl/robot-detection-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/robot-detection/tcl/robot-detection-procs.tcl 9 Mar 2002 02:00:02 -0000 1.2 +++ openacs-4/packages/robot-detection/tcl/robot-detection-procs.tcl 28 Aug 2003 09:41:58 -0000 1.3 @@ -4,7 +4,7 @@ @author Michael Yoon (michael@yoon.org) @author Roger Hsueh (rogerh@arsdigita.com) @creation-date 1999-05-27 - @cvs-id $Id$ + @cvs-id robot-detection-procs.tcl,v 1.2 2002/03/09 02:00:02 donb Exp } ad_proc ad_replicate_web_robots_db {} { Replicates data from the Web Robots Database @@ -39,12 +39,17 @@ db_dml delete_old_robots_table { delete from robots } - set robot_id [db_null] - set robot_name [db_null] - set robot_details_url [db_null] - set robot_useragent [db_null] + set robot_id "" + set robot_name "" + set robot_details_url "" + set robot_useragent "" foreach line $page { if {![regexp {\w+} $line]} { + + if { [string equal $robot_name ""] } { + set robot_name $robot_id + } + #detected a blank line, that means we are should try to #insert a row into the robots table, if robot_id and robot_useragent are not null if {[exists_and_not_null robot_id] && [exists_and_not_null robot_useragent]} { @@ -55,16 +60,17 @@ } } # start clean for a new record - set robot_id [db_null] - set robot_name [db_null] - set robot_details_url [db_null] - set robot_useragent [db_null] + set robot_id "" + set robot_name "" + set robot_details_url "" + set robot_useragent "" continue } - if {[regexp {robot-id: *(.+)} $line match robot_id] || - [regexp {robot-name: *(.+)} $line match robot_name] || - [regexp {robot-details-url: *(.+)} $line match robot_details_url] || - [regexp {robot-useragent: *(.+)} $line match robot_useragent] } { + + if {[regexp {robot-id:\s*([^\s]+)\s*} $line match robot_id] || + [regexp {robot-name:\s*([^\s]+)\s*} $line match robot_name] || + [regexp {robot-details-url:\s*([^\s]+)\s*} $line match robot_details_url] || + [regexp {robot-useragent:\s*([\s]+)\s*} $line match robot_useragent] } { continue } } Index: openacs-4/packages/robot-detection/www/admin/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/robot-detection/www/admin/index.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/robot-detection/www/admin/index.adp 6 Sep 2002 15:36:39 -0000 1.2 +++ openacs-4/packages/robot-detection/www/admin/index.adp 28 Aug 2003 09:41:58 -0000 1.3 @@ -20,7 +20,7 @@

      -Courtesy of the Web Robots Database, +Courtesy of the Web Robots Database, this installation of the ACS can recognize the following robots:

        Index: openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql 17 May 2003 11:22:12 -0000 1.2 +++ openacs-4/packages/rss-support/tcl/rss-generation-service-procs-oracle.xql 28 Aug 2003 09:41:58 -0000 1.3 @@ -9,12 +9,12 @@ r.timeout, r.summary_context_id, i.impl_name, - nvl2(r.lastbuild, date_part('epoch',r.lastbuild), 0) as lastbuild + nvl2(r.lastbuild, (r.lastbuild-to_date('1970-01-01'))*60*60*24, 0) as lastbuild from rss_gen_subscrs r, acs_sc_impls i where i.impl_id = r.impl_id and (r.lastbuild is null - or sysdate > r.lastbuild + r.timeout/(60*60*24) + or sysdate > r.lastbuild + r.timeout/(60*60*24)) Index: openacs-4/packages/workflow/workflow.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/workflow.info,v diff -u -r1.5 -r1.6 --- openacs-4/packages/workflow/workflow.info 5 Mar 2003 17:17:05 -0000 1.5 +++ openacs-4/packages/workflow/workflow.info 28 Aug 2003 09:41:59 -0000 1.6 @@ -8,7 +8,7 @@ t workflow - + oracle postgresql @@ -22,10 +22,10 @@ <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 -r1.2 -r1.3 --- openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql 5 Mar 2003 17:17:18 -0000 1.2 +++ openacs-4/packages/workflow/sql/oracle/workflow-procedural-create.sql 28 Aug 2003 09:41:59 -0000 1.3 @@ -10,7 +10,7 @@ --------------------------------- -- Workflow level, Generic Model --------------------------------- -create or replace package workflow_case +create or replace package workflow_case_pkg as function get_pretty_state( workflow_short_name in varchar, @@ -21,11 +21,11 @@ delete_case_id in integer ) return integer; -end workflow_case; +end workflow_case_pkg; / show errors -create or replace package body workflow_case +create or replace package body workflow_case_pkg as function get_pretty_state( workflow_short_name in varchar, @@ -74,7 +74,7 @@ return 0; end delete; -end workflow_case; +end workflow_case_pkg; / show errors @@ -114,7 +114,7 @@ from workflow_cases where workflow_id = delete_workflow_id) loop - foo := workflow_case.delete(rec.case_id); + foo := workflow_case_pkg.delete(rec.case_id); end loop; acs_object.delete(delete_workflow_id); 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 -r1.2 -r1.3 --- openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql 5 Mar 2003 17:17:18 -0000 1.2 +++ openacs-4/packages/workflow/sql/oracle/workflow-tables-create.sql 28 Aug 2003 09:41:59 -0000 1.3 @@ -341,7 +341,7 @@ create table workflow_cases ( case_id integer - constraint wf_cases_pk + constraint workflow_cases_pk primary key, workflow_id constraint wf_cases_workflow_id_nn not null 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 -r1.6 -r1.7 --- openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql 5 Mar 2003 17:17:33 -0000 1.6 +++ openacs-4/packages/workflow/sql/postgresql/workflow-procedural-create.sql 28 Aug 2003 09:41:59 -0000 1.7 @@ -22,15 +22,15 @@ from workflow_cases where workflow_id = delete_workflow_id loop - perform workflow_case__delete (rec.case_id); + perform workflow_case_pkg__delete (rec.case_id); end loop; perform acs_object__delete(delete_workflow_id); return 0; end;' language 'plpgsql'; -create or replace function workflow_case__delete (integer) +create or replace function workflow_case_pkg__delete (integer) returns integer as ' declare delete_case_id alias for $1; @@ -48,7 +48,7 @@ -- All workflow data cascades from the case id delete from workflow_cases - where object_id = delete_case_id; + where case_id = delete_case_id; return 0; end;' language 'plpgsql'; @@ -101,7 +101,7 @@ -- Function for getting the pretty state of a case -create or replace function workflow_case__get_pretty_state ( +create or replace function workflow_case_pkg__get_pretty_state ( varchar, -- workflow_short_name integer -- object_id ) Index: openacs-4/packages/workflow/sql/postgresql/workflow-procedural-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/sql/postgresql/workflow-procedural-drop.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/workflow/sql/postgresql/workflow-procedural-drop.sql 12 Feb 2003 14:22:35 -0000 1.4 +++ openacs-4/packages/workflow/sql/postgresql/workflow-procedural-drop.sql 28 Aug 2003 09:41:59 -0000 1.5 @@ -36,5 +36,13 @@ varchar -- creation_ip ); +drop function workflow_case_pkg__delete (integer); + +drop function workflow_case_pkg__get_pretty_state ( + varchar, -- workflow_short_name + integer -- object_id +); + + delete from acs_function_args where function = 'workflow_case_log_entry__new'; 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 -r1.2 -r1.3 --- openacs-4/packages/workflow/tcl/case-procs-oracle.xql 5 Mar 2003 17:18:10 -0000 1.2 +++ openacs-4/packages/workflow/tcl/case-procs-oracle.xql 28 Aug 2003 09:41:59 -0000 1.3 @@ -93,5 +93,12 @@ + + + begin + :1 := workflow_case.delete(:case_id); + end; + + Index: openacs-4/packages/workflow/tcl/case-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 5 Mar 2003 17:18:10 -0000 1.3 +++ openacs-4/packages/workflow/tcl/case-procs-postgresql.xql 28 Aug 2003 09:41:59 -0000 1.4 @@ -85,4 +85,10 @@ + + + select workflow_case_pkg__delete(:case_id) + + + Index: openacs-4/packages/workflow/tcl/case-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/workflow/tcl/case-procs.tcl 5 Mar 2003 17:18:10 -0000 1.6 +++ openacs-4/packages/workflow/tcl/case-procs.tcl 28 Aug 2003 09:41:59 -0000 1.7 @@ -24,13 +24,13 @@ {-object_id:required} } { Internal procedure that creates a new workflow case in the - database. Should not be used by applications. + database. Should not be used by applications. Use workflow::case::new instead. @param object_id The object_id which the case is about @param workflow_short_name The short_name of the workflow. @return The case_id of the case. Returns the empty string if no case could be found. - @see + @see workflow::case::new @author Lars Pind (lars@collaboraid.biz) } { @@ -147,6 +147,18 @@ return $row($element) } +ad_proc -public workflow::case::delete { + {-case_id:required} +} { + Delete a workflow case. + + @param case_id The case_id you wish to delete + + @author Simon Carstensen (simon@collaboraid.biz) +} { + db_exec_plsql delete_case {} +} + ad_proc -public workflow::case::get_user_roles { {-case_id:required} -user_id @@ -262,11 +274,339 @@ workflow::case::role::flush_cache $case_id } +ad_proc -private workflow::case::get_activity_html { + {-case_id:required} + {-action_id ""} +} { + Get the activity log for a case as an HTML chunk. + If action_id is non-empty, it means that we're in + the progress of executing that action, and the + corresponding line for the current action will be appended. + @param case_id The case for which you want the activity log. + @param action_id optional action which is currently being executed. + @return Activity log as HTML + @author Lars Pind (lars@collaboraid.biz) +} { + set log_html {} + set template { + @creation_date_pretty@ @action_pretty_past_tense@ @log_title@ by @community_member_link@ +
        @comment_html@
        + } + # Compile and evaluate the template + set code [template::adp_compile -string $template] + foreach entry_arraylist [get_activity_log_info -case_id $case_id] { + foreach { var value } $entry_arraylist { + set $var $value + } + + set comment_html [ad_html_text_convert -from $comment_mime_type -to "text/html" -- $comment] + set community_member_link [acs_community_member_link -user_id $creation_user -label "$user_first_names $user_last_name"] + + append log_html [template::adp_eval code] + } + + if { ![empty_string_p $action_id] } { + set pretty_past_tense [workflow::action::get_element -action_id $action_id -element pretty_past_tense] + + # sets first_names, last_name, email + ad_get_user_info + + set now_pretty [clock format [clock seconds] -format "%m/%d/%Y"] + # Get rid of leading zeros + regsub {^0} $now_pretty {} now_pretty + regsub {/0} $now_pretty {/} now_pretty + + append log_html "

        $now_pretty $pretty_past_tense by $first_names $last_name

        " + } + + return $log_html +} + +ad_proc -private workflow::case::get_activity_text { + {-case_id:required} +} { + Get the activity log for a case as a text chunk + + @author Lars Pind +} { + set log_text {} + + foreach entry_arraylist [get_activity_log_info -case_id $case_id] { + foreach { var value } $entry_arraylist { + set $var $value + } + + set entry_text "$creation_date_pretty $action_pretty_past_tense [ad_decode $log_title "" "" "$log_title "]y $user_first_names $user_last_name ($user_email)" + + if { ![empty_string_p $comment] } { + append entry_text ":\n\n [join [split [ad_html_text_convert -from $comment_mime_type -to "text/plain" -maxlen 66 -- $comment] "\n"] "\n "]" + } + + lappend log_text $entry_text + + + } + return [join $log_text "\n\n"] +} + +ad_proc -private workflow::case::get_activity_log_info { + {-case_id:required} +} { + Get the data for the case activity log. + + @return a list of array-lists with the following entries: + comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title + user_first_names user_last_name user_email creation_user data_arraylist + + @author Lars Pind +} { + global __cache__workflow__case__get_activity_log_info + if { ![info exists __cache__workflow__case__get_activity_log_info] } { + set __cache__workflow__case__get_activity_log_info [get_activity_log_info_not_cached -case_id $case_id] + } + return $__cache__workflow__case__get_activity_log_info +} + +ad_proc -private workflow::case::get_activity_log_info_not_cached { + {-case_id:required} +} { + Get the data for the case activity log. This version is cached for a single thread. + + @return a list of array-lists with the following entries: + comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title + user_first_names user_last_name user_email creation_user data_arraylist + + @author Lars Pind +} { + set workflow_id [workflow::case::get_element -case_id $case_id -element workflow_id] + set object_id [workflow::case::get_element -case_id $case_id -element object_id] + set contract_name [workflow::service_contract::activity_log_format_title] + + # Get the name of any title Tcl callback proc + set impl_names [workflow::get_callbacks \ + -workflow_id $workflow_id \ + -contract_name $contract_name] + + # First, we build up a multirow so we have all the data in memory, which lets us peek ahead at the contents + db_multirow -extend {comment} -local entries select_log {} { set comment $comment_string } + + + set rowcount [template::multirow -local size entries] + set counter 1 + + set last_entry_id {} + set data_arraylist [list] + + # Then iterate over the multirow to build up the activity log HTML + # We need to peek ahead, because this is an outer join to get the rows in workflow_case_log_data + + set entries [list] + template::multirow -local foreach entries { + + if { ![empty_string_p $key] } { + lappend data_arraylist $key $value + } + + if { $counter == $rowcount || ![string equal $last_entry_id [set "entries:[expr $counter + 1](entry_id)"]] } { + + set log_title_elements [list] + foreach impl_name $impl_names { + set result [acs_sc::invoke \ + -contract $contract_name \ + -operation "GetTitle" \ + -impl $impl_name \ + -call_args [list $case_id $object_id $action_id $entry_id $data_arraylist]] + if { ![empty_string_p $result] } { + lappend log_title_elements $result + } + } + set log_title [ad_decode [llength $log_title_elements] 0 "" "([join $log_title_elements ", "])"] + + set row [list] + foreach var { + comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title + user_first_names user_last_name user_email creation_user data_arraylist + } { + lappend row $var [set $var] + } + lappend entries $row + + set data_arraylist [list] + } + set last_entry_id $entry_id + incr counter + } + + return $entries +} + +ad_proc workflow::case::get_notification_object { + {-type:required} + {-workflow_id ""} + {-case_id ""} +} { + Get the relevant object for this notification type. + + @param type Type is one of 'workflow_assignee', 'workflow_my_cases', + 'workflow_case' (requires case_id), and 'workflow' (requires + workflow_id). +} { + switch $type { + workflow_case { + if { ![exists_and_not_null case_id] } { + return {} + } + return [workflow::case::get_element -case_id $case_id -element object_id] + } + default { + if { ![exists_and_not_null workflow_id] } { + return {} + } + return [workflow::get_element -workflow_id $workflow_id -element object_id] + } + } +} + +ad_proc workflow::case::get_notification_request_url { + {-type:required} + {-workflow_id ""} + {-case_id ""} + {-return_url ""} + {-pretty_name ""} +} { + Get the URL to subscribe to notifications + + @param type Type is one of 'workflow_assignee', 'workflow_my_cases', + 'workflow_case' (requires case_id), and 'workflow' (requires + workflow_id). +} { + if { [ad_conn user_id] == 0 } { + return {} + } + + set object_id [get_notification_object \ + -type $type \ + -workflow_id $workflow_id \ + -case_id $case_id] + + if { [empty_string_p $object_id] } { + return {} + } + + if { ![exists_and_not_null return_url] } { + set return_url [ad_return_url] + } + + set url [notification::display::subscribe_url \ + -type $type \ + -object_id $object_id \ + -url $return_url \ + -user_id [ad_conn user_id] \ + -pretty_name $pretty_name] + + return $url +} + +ad_proc workflow::case::get_notification_requests_multirow { + {-multirow_name:required} + {-label ""} + {-workflow_id ""} + {-case_id ""} + {-return_url ""} +} { + Returns a multirow with columns url, label, title, + of the possible workflow notification types. Use this to present the user with a list of + subscription links. +} { + array set pretty { + workflow_assignee {my actions} + workflow_my_cases {my cases} + workflow_case {this case} + workflow {cases in this workflow} + } + + template::multirow create $multirow_name url label title + foreach type { + workflow_assignee workflow_my_cases workflow_case workflow + } { + set url [get_notification_request_url \ + -type $type \ + -workflow_id $workflow_id \ + -case_id $case_id \ + -return_url $return_url] + + if { ![empty_string_p $url] } { + set title "Subscribe to $pretty($type)" + if { ![empty_string_p $label] } { + set row_label $label + } else { + set row_label $title + } + template::multirow append $multirow_name $url $row_label $title + } + } +} + +ad_proc workflow::case::add_log_data { + {-entry_id:required} + {-key:required} + {-value:required} +} { + Adds extra data information to a log entry, which can later + be retrieved using workflow::case::get_log_data_by_key. + Data are stored as simple key/value pairs. + + @param entry_id The ID of the log entry to which you want to attach data. + @param key The data key. + @param value The data value + + @see workflow::case::get_log_data_by_key + @see workflow::case::get_log_data + @author Lars Pind (lars@collaboraid.biz) +} { + db_dml insert_log_data {} +} + +ad_proc workflow::case::get_log_data_by_key { + {-entry_id:required} + {-key:required} +} { + Retrieve extra data for a workflow log entry, previously stored using workflow::case::add_log_data. + + @param entry_id The ID of the log entry to which the data you want are attached. + @param key The key of the data you're looking for. + @return The value, or the empty string if no such key exists for this entry. + + @see workflow::case::add_log_data + @see workflow::case::get_log_data + @author Lars Pind (lars@collaboraid.biz) +} { + db_string select_log_data {} -default {} +} + +ad_proc workflow::case::get_log_data { + {-entry_id:required} +} { + Retrieve extra data for a workflow log entry, previously stored using workflow::case::add_log_data. + + @param entry_id The ID of the log entry to which the data you want are attached. + @return A tcl list of key/value pairs in array-list format, i.e. { key1 value1 key2 value2 ... }. + + @see workflow::case::add_log_data + @see workflow::case::get_log_data_by_key + @author Lars Pind (lars@collaboraid.biz) +} { + db_string select_log_data {} -default {} +} + + + + ##### # # workflow::case::role namespace @@ -394,19 +734,12 @@ -impl $impl_name \ -call_args [list $case_id $object_id $role_id]] - ns_log Notice "LARS: $contract_name, $impl_name = $subquery" - if { ![empty_string_p $subquery] } { # Return after the first non-empty list break } } - ns_log Notice "LARS: subquery = $subquery" - - ns_log Notice "LARS: returning [db_map select_search_results]" - - return [db_map select_search_results] @@ -432,8 +765,8 @@ set query [workflow::case::role::get_search_query -case_id $case_id -role_id $role_id] set picklist [workflow::case::role::get_picklist -case_id $case_id -role_id $role_id] - return [list "${element}:search(search)" [list label $role(pretty_name)] [list mode display] \ - [list search_query $query] [list options $picklist] optional] + return [list "${element}:search(search),optional" [list label $role(pretty_name)] [list mode display] \ + [list search_query $query] [list options $picklist]] } ad_proc -public workflow::case::role::add_assignee_widgets { @@ -610,262 +943,9 @@ } } -ad_proc -private workflow::case::get_activity_html { - {-case_id:required} -} { - Get the activity log for a case as an HTML chunk - @author Lars Pind -} { - set log_html {} - set template { - @creation_date_pretty@ @action_pretty_past_tense@ @log_title@ by @community_member_link@ -
        @comment_html@
        - } - # Compile and evaluate the template - set code [template::adp_compile -string $template] - - foreach entry_arraylist [get_activity_log_info -case_id $case_id] { - foreach { var value } $entry_arraylist { - set $var $value - } - - set comment_html [ad_html_text_convert -from $comment_mime_type -to "text/html" -- $comment] - set community_member_link [acs_community_member_link -user_id $creation_user -label "$user_first_names $user_last_name"] - - append log_html [template::adp_eval code] - } - - return $log_html -} - -ad_proc -private workflow::case::get_activity_text { - {-case_id:required} -} { - Get the activity log for a case as a text chunk - - @author Lars Pind -} { - set log_text {} - - foreach entry_arraylist [get_activity_log_info -case_id $case_id] { - foreach { var value } $entry_arraylist { - set $var $value - } - - set entry_text "$creation_date_pretty $action_pretty_past_tense $log_title by $user_first_names $user_last_name ($user_email)" - - if { ![empty_string_p $comment] } { - append entry_text ":\n\n [join [split [ad_html_text_convert -from $comment_mime_type -to "text/plain" -maxlen 66 -- $comment] "\n"] "\n "]" - } - - lappend log_text $entry_text - - - } - return [join $log_text "\n\n"] -} - -ad_proc -private workflow::case::get_activity_log_info { - {-case_id:required} -} { - Get the data for the case activity log. - - @return a list of array-lists with the following entries: - comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title - user_first_names user_last_name user_email creation_user data_arraylist - - @author Lars Pind -} { - global __cache__workflow__case__get_activity_log_info - if { ![info exists __cache__workflow__case__get_activity_log_info] } { - set __cache__workflow__case__get_activity_log_info [get_activity_log_info_not_cached -case_id $case_id] - } - return $__cache__workflow__case__get_activity_log_info -} - -ad_proc -private workflow::case::get_activity_log_info_not_cached { - {-case_id:required} -} { - Get the data for the case activity log. This version is cached for a single thread. - - @return a list of array-lists with the following entries: - comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title - user_first_names user_last_name user_email creation_user data_arraylist - - @author Lars Pind -} { - set workflow_id [workflow::case::get_element -case_id $case_id -element workflow_id] - set object_id [workflow::case::get_element -case_id $case_id -element object_id] - set contract_name [workflow::service_contract::activity_log_format_title] - - # Get the name of any title Tcl callback proc - set impl_names [workflow::get_callbacks \ - -workflow_id $workflow_id \ - -contract_name $contract_name] - - # First, we build up a multirow so we have all the data in memory, which lets us peek ahead at the contents - db_multirow -extend {comment} -local entries select_log {} { set comment $comment_string } - - - set rowcount [template::multirow -local size entries] - set counter 1 - - set last_entry_id {} - set data_arraylist [list] - - # Then iterate over the multirow to build up the activity log HTML - # We need to peek ahead, because this is an outer join to get the rows in workflow_case_log_data - - set entries [list] - template::multirow -local foreach entries { - - if { ![empty_string_p $key] } { - lappend data_arraylist $key $value - } - - if { $counter == $rowcount || ![string equal $last_entry_id [set "entries:[expr $counter + 1](entry_id)"]] } { - - set log_title_elements [list] - foreach impl_name $impl_names { - set result [acs_sc::invoke \ - -contract $contract_name \ - -operation "GetTitle" \ - -impl $impl_name \ - -call_args [list $case_id $object_id $action_id $entry_id $data_arraylist]] - if { ![empty_string_p $result] } { - lappend log_title_elements $result - } - } - set log_title [ad_decode [llength $log_title_elements] 0 "" "([join $log_title_elements ", "])"] - - set row [list] - foreach var { - comment comment_mime_type creation_date_pretty action_pretty_past_tense log_title - user_first_names user_last_name user_email creation_user data_arraylist - } { - lappend row $var [set $var] - } - lappend entries $row - - set data_arraylist [list] - } - set last_entry_id $entry_id - incr counter - } - - return $entries -} - -ad_proc workflow::case::get_notification_object { - {-type:required} - {-workflow_id ""} - {-case_id ""} -} { - Get the relevant object for this notification type. - - @param type Type is one of 'workflow_assignee', 'workflow_my_cases', - 'workflow_case' (requires case_id), and 'workflow' (requires - workflow_id). -} { - switch $type { - workflow_case { - if { ![exists_and_not_null case_id] } { - return {} - } - return [workflow::case::get_element -case_id $case_id -element object_id] - } - default { - if { ![exists_and_not_null workflow_id] } { - return {} - } - return [workflow::get_element -workflow_id $workflow_id -element object_id] - } - } -} - -ad_proc workflow::case::get_notification_request_url { - {-type:required} - {-workflow_id ""} - {-case_id ""} - {-return_url ""} - {-pretty_name ""} -} { - Get the URL to subscribe to notifications - - @param type Type is one of 'workflow_assignee', 'workflow_my_cases', - 'workflow_case' (requires case_id), and 'workflow' (requires - workflow_id). -} { - if { [ad_conn user_id] == 0 } { - return {} - } - - set object_id [get_notification_object \ - -type $type \ - -workflow_id $workflow_id \ - -case_id $case_id] - - if { [empty_string_p $object_id] } { - return {} - } - - if { ![exists_and_not_null return_url] } { - set return_url [util_get_current_url] - } - - set url [notification::display::subscribe_url \ - -type $type \ - -object_id $object_id \ - -url $return_url \ - -user_id [ad_conn user_id] \ - -pretty_name $pretty_name] - - return $url -} - -ad_proc workflow::case::get_notification_requests_multirow { - {-multirow_name:required} - {-label ""} - {-workflow_id ""} - {-case_id ""} - {-return_url ""} -} { - -} { - array set pretty { - workflow_assignee {my actions} - workflow_my_cases {my cases} - workflow_case {this case} - workflow {cases in this workflow} - } - - template::multirow create $multirow_name url label title - foreach type { - workflow_assignee workflow_my_cases workflow_case workflow - } { - set url [get_notification_request_url \ - -type $type \ - -workflow_id $workflow_id \ - -case_id $case_id \ - -return_url $return_url] - - if { ![empty_string_p $url] } { - set title "Subscribe to $pretty($type)" - if { ![empty_string_p $label] } { - set row_label $label - } else { - set row_label $title - } - template::multirow append $multirow_name $url $row_label $title - } - } -} - - - ##### # # workflow::case::fsm @@ -1139,17 +1219,18 @@ -case_id $case_id \ -action_id $action_id \ -entry_id $entry_id - - # Notifications - notify \ - -case_id $case_id \ - -action_id $action_id \ - -entry_id $entry_id \ - -comment $comment \ - -comment_mime_type $comment_mime_type + } workflow::case::flush_cache $case_id + + # Notifications + notify \ + -case_id $case_id \ + -action_id $action_id \ + -entry_id $entry_id \ + -comment $comment \ + -comment_mime_type $comment_mime_type return $entry_id } @@ -1206,38 +1287,38 @@ } { # Get workflow_id workflow::case::get \ - -case_id $case_id \ - -array case - + -case_id $case_id \ + -array case + workflow::get \ - -workflow_id $case(workflow_id) \ - -array workflow - + -workflow_id $case(workflow_id) \ + -array workflow + set hr [string repeat "=" 70] - + array set latest_action [lindex [workflow::case::get_activity_log_info -case_id $case_id] end] - set latest_action_chunk "$latest_action(action_pretty_past_tense) $latest_action(log_title) by $latest_action(user_first_names) $latest_action(user_last_name) ($latest_action(user_email))" + set latest_action_chunk "$latest_action(action_pretty_past_tense) [ad_decode $latest_action(log_title) "" "" "$latest_action(log_title) "]by $latest_action(user_first_names) $latest_action(user_last_name) ($latest_action(user_email))" if { ![empty_string_p $latest_action(comment)] } { append latest_action_chunk ":\n\n [join [split [ad_html_text_convert -from $latest_action(comment_mime_type) -to "text/plain" -maxlen 66 -- $latest_action(comment)] "\n"] "\n "]" } - + # Callback to get notification info set contract_name [workflow::service_contract::notification_info] set impl_names [workflow::get_callbacks \ -workflow_id $case(workflow_id) \ -contract_name $contract_name] # We only use the first callback set impl_name [lindex $impl_names 0] - + if { ![empty_string_p $impl_name] } { set notification_info [acs_sc::invoke \ -contract $contract_name \ -operation "GetNotificationInfo" \ -impl $impl_name \ -call_args [list $case_id $case(object_id)]] - + } # Make sure the notification info list has at least 4 elements, so we can do below lindex's safely @@ -1288,7 +1369,7 @@ set activity_log_chunk [workflow::case::get_activity_text -case_id $case_id] - set the_subject "[ad_decode $object_notification_tag "" "" "\[$object_notification_tag\] "]$object_one_line: $latest_action(action_pretty_past_tense) $latest_action(log_title) by $latest_action(user_first_names) $latest_action(user_last_name)" + set the_subject "[ad_decode $object_notification_tag "" "" "\[$object_notification_tag\] "]$object_one_line: $latest_action(action_pretty_past_tense) [ad_decode $latest_action(log_title) "" "" "$latest_action(log_title) "]by $latest_action(user_first_names) $latest_action(user_last_name)" # List of user_id's for people who are in the assigned_role to any enabled actions set assignee_list [db_list enabled_action_assignees {}] @@ -1353,8 +1434,6 @@ if { ![empty_string_p $object_id] } { - ns_log Notice "LARS: $body($type)" - set notified_list [concat $notified_list [notification::new \ -type_id [notification::type::get_type_id -short_name $type] \ -object_id $object_id \ Index: openacs-4/packages/workflow/tcl/case-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/case-procs.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/workflow/tcl/case-procs.xql 5 Mar 2003 17:18:10 -0000 1.6 +++ openacs-4/packages/workflow/tcl/case-procs.xql 28 Aug 2003 09:41:59 -0000 1.7 @@ -84,6 +84,33 @@ + + + insert into workflow_case_log_data + (entry_id, key, value) + values + (:entry_id, :key, :value) + + + + + + select value + from workflow_case_log_data + where entry_id = :entry_id + and key = :key + + + + + + select key, value + from workflow_case_log_data + where entry_id = :entry_id + order by key + + + select impl.impl_name Index: openacs-4/packages/workflow/tcl/implementation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/implementation-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/workflow/tcl/implementation-procs.tcl 5 Mar 2003 17:18:10 -0000 1.3 +++ openacs-4/packages/workflow/tcl/implementation-procs.tcl 28 Aug 2003 09:41:59 -0000 1.4 @@ -115,7 +115,6 @@ } { Return a subquery for all registered users. } { - ns_log Notice "LARS: getsubquery returning [db_map cc_users]" return [db_map cc_users] } Index: openacs-4/packages/workflow/tcl/install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/tcl/install-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/workflow/tcl/install-procs.tcl 5 Mar 2003 17:18:10 -0000 1.5 +++ openacs-4/packages/workflow/tcl/install-procs.tcl 28 Aug 2003 09:41:59 -0000 1.6 @@ -103,7 +103,7 @@ iscachable_p "t" } GetPrettyName { - description "Get the pretty name of this implementation. Will be localized, so i may contain #...#." + description "Get the pretty name of this implementation." output { pretty_name:string } iscachable_p "t" } @@ -136,7 +136,7 @@ iscachable_p "t" } GetPrettyName { - description "Get the pretty name of this implementation. Will be localized, so i may contain #...#." + description "Get the pretty name of this implementation." output { pretty_name:string } iscachable_p "t" } @@ -169,7 +169,7 @@ iscachable_p "t" } GetPrettyName { - description "Get the pretty name of this implementation. Will be localized, so it may contain #...#." + description "Get the pretty name of this implementation." output { pretty_name:string } iscachable_p "t" } @@ -202,8 +202,8 @@ iscachable_p "t" } GetPrettyName { - description "Get the pretty name of this implementation. Will be localized, so it may contain #...#." - output { object_type:string } + description "Get the pretty name of this implementation." + output { pretty_name:string } iscachable_p "t" } DoSideEffect { @@ -237,7 +237,7 @@ } GetPrettyName { description "Get the pretty name of this implementation. Will be localized, so it may contain #...#." - output { object_type:string } + output { pretty_name:string } iscachable_p "t" } GetTitle { @@ -275,7 +275,7 @@ } GetPrettyName { description "Get the pretty name of this implementation. Will be localized, so it may contain #...#." - output { object_type:string } + output { pretty_name:string } iscachable_p "t" } GetNotificationInfo { Index: openacs-4/packages/workflow/www/doc/developer-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/doc/developer-guide.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/workflow/www/doc/developer-guide.html 5 Mar 2003 17:19:09 -0000 1.1 +++ openacs-4/packages/workflow/www/doc/developer-guide.html 28 Aug 2003 09:41:59 -0000 1.2 @@ -2,20 +2,67 @@ Package Developer's Guide to Workflow

        Package Developer's Guide to Workflow

        +Workflow Documentation : Package Developer's Guide + +
        +

        By Lars Pind

        Introduction

        -

        Workflow is used to coordinate the actions of multiple people -working together to accomplish something.

        +

        + The workflow package manages a collaborative process surrounding + some object. +

        +

        + Examples of the object could be a bug in a bug tracker, + a ticket in a ticket tracker, a content item in a content management + system, a user contribution in a moderated forum/comments/whatever + application, a user's request for particpation in a + course/event/whatever. +

        +

        For example, when a new bug is submitted, someone's assigned to fix it, and whoever submitted it is assigned to verify the fix and close the bug. Once the bug's fixed, the submitter will get notified, @@ -45,15 +92,1290 @@

      • Integrate workflow into your application's queries
      • + + +

        Let's first look at some concepts before getting into the +technicalities of how you actually do this. For a working example of +building workflow-based applications, we recommend you take a look at +bug-tracker.

        + +

        Workflow Concepts

        + +

        What's in a workflow

        + +

        + In its broadest, most conceptual sense, a workflow is defined as + (and this does get a little hairy, so feel free to skip if you just + want to start developing your applicaton): +

        + +
          +
        • + A number of actions that can + be executed (open, edit, comment, resolve, edit, publish, approve, + reject, etc.) Whether or not an action is enabled, meaning + it can be executed at this point in time, will depend on the + current state of the workflow. Executing an action may + change the state of the workflow. +
        • +
        • + A definition of the possible states that the + workflow can be in. This could simply be an enumeration of states, + such as "Open", "Resolved", "Closed", in which case we're talking + about a "Finite State Machine" (because there's a finite number of + possible states). Other models, such as petri nets, have an + infinite number of possible states. This makes things a lot more + complicated, and you don't need to bother since this first + implementation of workflow only supports finite state machines. +
        • +
        • + People participate in a workflow through their role. For a + bug tracker, the roles could be "Submitter", "Resolver", and + "Tester". For a publication workflow, they'd be "Author", "Editor", + and "Publisher". Actions will be to roles, which in turn will be + linked to users or groups of users in a particular workflow + case. The reason we link people to actions through the concept of + roles is to allow you to specify that two or more actions should + be done by the same party. In bug-tracker, for example, the same + user who opened the bug should also close it. +
        -

        Let's look at each of these in order.

        +

        Finite State Machines (FSMs)

        -

        Defining Your Process

        +

        + As mentioned, workflow is designed to support workflows based on any + model, however the only model currently implemented is the finite + state machine. +

        -

        Your process +

        + The workflow API is designed so that whenver you're using features + that are specific to finite state machines, the procedure name will + include the letters "fsm" in the name, as in workflow::case::fsm::get. That + way you'll know when you're hard-wiring a dependency on the + particular workflow model. +

        +

        + It's considered good practice to only use non-fsm API calls, but in + practice, it can be hard to create good user experiences without. So + feel free. +

        +
        + Notation: +

        + [Action] (State) {Role} +

        +

        + (State1) -> [Action1] -> (State2) -> [Action2] -> (State3) +

        +
        + + +

        Cases

        + +

        + So much for defining the workflow. When you start "running" your + workflow, that's called a workflow case, or simply a + case. A case is concerned with a particular object, it's always in a + particular state, and it has specific people or groups assigned to + its different roles. +

        + +

        In-flow and out-of-flow

        + +

        + When defining actions, we differentiate between in-flow and + out-of-flow. In-flow refers to the normal idealized flow of the + workflow, out-of-flow are the rest. Concretely what it means is that + if you're assigned to an in-flow action, we'll bug you about it + through notifications, and potentially get mad at you if you don't + come and do something to get the workflow moving along. We don't do + that with out-of-flow actions. So we'll send a notification that + says "Please come back and resolve this bug", whereas we'll not + notify everybody who are allowed to comment saying "Please come back + and comment on this bug". +

        + +

        + For bug-tracker, the normal flow (in-flow) is this: +

        + +
        + (Open) -> [Resolve] -> (Resolved) -> [Close] -> (Closed) +
        + +

        + Other actions not in the normal flow are [Edit] and [Comment], which + are always enabled, but never change the state. And [Reopen] which + throw you back to the (Open) state. And finally [Resolved] is + in-flow when in the (Open) state, but out-of-flow when in the + (Resolved) state, meaning that you can re-resolve a bug if you need + to, but you're not required to. +

        + +

        + In-flow and out-of-flow depends on the action, the state, and the + user's role in the case. For example, it might be that users in the + {Submitter} role are allowed to resolve their own bugs, but the + [Resolve] action will still only be considered in-flow to people in + the {Assignee} or {Resolver} role. +

        + +

        The Six Steps Conceptually

        + +

        + The recommended way a workflow is linked to an application is this: + As part of developing your application, you define your default + workflow, which will be used as a template for customization by the + users of your applications. This workflow will be installed using + the APM after-install callback, and will be linked to your + application's package-key. +

        + +

        + Then when a new instance of your application is created, your + default workflow will be cloned, and the clone linked to the + new instance, so that your users can customize the workflow for each + instance of your application individually. The default copy + installed along with your package is never actually used except for + cloning when creating a new instance. This means that your users can + customize this deafult workflow, and the modified version will serve + as the boilerplate for all new package instances. +

        + +

        + In order to integrate workflow with your application, you'll want to + implement one or more of the callback service + contracts. These can do things like determine default assignees + based on certain data in your application, get information about + your application's object for use when sending out notifications, or + perform side-effects, such as actually changing the publication + state of a content item when you execute the [Publish] action. +

        + +

        + When integrating the workflow with your application's user + experience, what workflow will give you is essentially the list of + actions that the given user can perform on the given object at the + given time. In bug-tracker, for example, bug-tracker takes care of + displaying the form displaying and editing a bug, while workflow + takes care of displaying the buttons that say [Comment], [Edit], + [Resolve], [Reopen], [Close], etc., along the bottom of the + form. Workflow also has a place to store which form elements should + be opened for editing depending on the action being executed. +

        + +

        + Your application should typically have an API for creating a new + object, editing an object, etc. This application object API will + need to be workflow-aware, so when a new object is created, a + new workflow case will be started as well. And when the object's + edited, that should generally only happen through a workflow action, + so that needs to be taken into account as well. +

        + +

        + The final step is integrating workflow into your application's + queries when you want to filter an object listing/count based on + the workflow state. This is the only place where you'll directly + be dependent on the workflow data model. +

        + + +

        Defining Your Process (FSM)

        + +

        + The current version of workflow only supports workflows based on a + finite state machine (FSM). Support for other models, such as petri + nets and directed graphs are possible, but not currently designed or + implemented. +

        + +

        + An FSM-based workflow consists of a set of states, actions, and roles. +

        + +

        + You define a new workflow like this: +

        + +
        +set spec {
        +    workflow-short-name {
        +        ...
        +        roles {
        +            role-short-name {
        +               ...
        +            }
        +            ...
        +        }
        +        states {
        +            state-short-name {
        +               ...
        +            }
        +            ...
        +        }
        +        actions {
        +            action-short-name {
        +               ...
        +            }
        +            ...
        +        }
        +    }
        +}
        +
        +set workflow_id [workflow::fsm::new_from_spec -spec $spec]
        +
        + +

        + All the items (workflow, roles, states, actions) have a short-name, + which should be lowercase and use underbar (_) instead of + spaces. These are mainly used to refer to the items in other parts + of the spec. +

        + +

        + The workflow short name can be used to refer to the + workflow in your application, which is useful if you have several + different workflows. The bug-tracker, for example, could have a + workflow for bugs and another one for patches. +

        + +

        + Finally, you can also refer states, roles, and actions in your + application using short names, although this creates a dependency in + your application on a particular form of the workflow, and there's + currently no mechanism for ensuring that your workflow contains the + states, roles, and actions you'd refer to. This is on the todo-list. +

        + +

        Workflow

        + +

        + These are the attributes you can specify for the workflow itself: +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Workflow Attributes
        AttributeDescription
        pretty_name + Name used in the user interface. +
        package_key + The package that defined this workflow. +
        object_type + The parent object type which this workflow can be applied + to. If your workflow applies to any object, say 'acs_object'. + This is used in relation to callbacks when we build + the user interface for defining workflows. More on this in the + section on callbacks. +
        callbacks + Callbacks that apply to the whole workflow. If you add + side-effect callbacks, these are executed every time any action + is executed. +
        roles + Denotes the section of the spec that defines the workflow's roles. +
        states + Denotes the section of the spec that defines the workflow's states. +
        actions + Denotes the section of the spec that defines the workflow's actions. +
        + +
        + Internationalization Note: +

        + When we make workflow internationalized for OpenACS 5.0, pretty + names will contain message keys in the form + "#message-key#". More about this in the package developer's + guide to internationalization. +

        +
        + +

        Roles

        + +

        + Attributes for roles: +

        + + + + + + + + + + + + + + + + + +
        Role Attributes
        AttributeDescription
        pretty_name + Name used in the user interface. +
        callbacks + Callbacks that define how assignment of this role to users is done. +
        + + +

        States

        + +

        + A few typical examples of states: +

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Examples of States
        ApplicationStates
        Ticket Tracker + (Open),(Completed), and (Closed) +
        Bug Tracker + (Open), (Triaged), (Resolved), and (Closed) +
        Content Management System Publication + (Authored), (Edited), and (Published) +
        Simple Approval + (Requested), (Approved), and (Rejected) +
        + +

        + These are the state attributes in the workflow specification: +

        + + + + + + + + + + + + + + + + + +
        State Attributes
        AttributeDescription
        pretty_name + Name used in the user interface. +
        hide_fields + A tcl list of form elements/object attributes that don't make + sense in this state. In bug-tracker, the element "Fixed in + version" doesn't make sense when the bug is (Open), and thus not + yet fixed. It's currently up to your application to do + incorporate this into your application. +
        + + +

        Actions

        + +

        + Actions are what the workflow allows you to do to your object. +

        + +
        + Terminology: +
        +
        Enabled
        +
        + The action is allowed to be executed in the workflow's current state. +
        +
        Allowed
        +
        + The given user is allowed to execute the action given his + current relationship to the workflow case and the object. +
        +
        Assigned
        +
        + The same as allowed, but the action is in-flow for this user. +
        +
        Available
        +
        + The action is both enabled and allowed for this user. +
        +
        +
        + +

        + Some actions will always be enabled. In bug-tracker, for + example, we have [Comment] and [Edit] actions, which are always + allowed, regardless of whether the bug is (Open), (Resolved), or + (Closed). +

        + +

        + Other actions, however, will only be enabled in certain + states. In bug-tracker, for example, the [Close] action is only + available in the (Resolved) state. +

        + +

        + Another distinction is that some actions change the state, and + others do not. [Comment] and [Edit], for example, do + not. [Resolve], [Close], and [Reopen] do. For an FSM, when an action + changes the state, you simply specify what the new state should be. +

        + +

        + There's a special action called the initial action. This is + implicitly executed when a new case is started for this workflow, + and must always specify the "new_state" attribute to define which + state new cases start out in. +

        + +

        + Attributes for actions: +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Action Attributes
        AttributeDescription
        pretty_name + Name used in the user interface. +
        pretty_past_tense + This is used in the case log to say "<pretty_past_teense> + by <user> on <date>", for example "Resolved by Jeff + Davis on April 15, 2003". +
        new_state + The short_name of the state this action puts the case + into. Leave out if the action shouldn't change the state. +
        initial_action_p + Say 't' if this is the initial action. Leave out or set to 'f' otherwise. +
        allowed_roles + A list of roles that are allowed but not assigned to perform this action. +
        assigned_role + A single role which is assigned to this action. +
        privileges + A list of privileges. Users who have been granted one of these + privileges on the case's object will be allowed to execute this action. +
        always_enabled_p + Say 't' if this action should be enabled regardless of the + case's current state. Say 'f' or leave out otherwise. +
        enabled_states + If not always enabled, enumerate the states in which this action + is enabled but not assigned. +
        assigned_states + Enumerate the states in which this action + is enabled and assigned. +
        edit_fields + A tcl list of fields which should be opened for editing when the + user is performing this action. Again, it's up to the application + to act on this. +
        callbacks + Side-effect callbacks which are executed when this action is executed. +
        + +

        Putting A Workflow Together

        + +

        + When you put this all together, here's a real live example of what + defining a workflow could look like: +

        + +
        +ad_proc -private bug_tracker::bug::workflow_create {} {
        +    Create the 'bug' workflow for bug-tracker
        +} {
        +    set spec {
        +        bug {
        +            pretty_name "Bug"
        +            package_key "bug-tracker"
        +            object_type "bt_bug"
        +            callbacks { 
        +                bug-tracker.FormatLogTitle 
        +                bug-tracker.BugNotificationInfo
        +            }
        +            roles {
        +                submitter {
        +                    pretty_name "Submitter"
        +                    callbacks { 
        +                        workflow.Role_DefaultAssignees_CreationUser
        +                    }
        +                }
        +                assignee {
        +                    pretty_name "Assignee"
        +                    callbacks {
        +                        bug-tracker.ComponentMaintainer
        +                        bug-tracker.ProjectMaintainer
        +                        workflow.Role_PickList_CurrentAssignees
        +                        workflow.Role_AssigneeSubquery_RegisteredUsers
        +                    }
        +                }
        +            }
        +            states {
        +                open {
        +                    pretty_name "Open"
        +                    hide_fields { resolution fixed_in_version }
        +                }
        +                resolved {
        +                    pretty_name "Resolved"
        +                }
        +                closed {
        +                    pretty_name "Closed"
        +                }
        +            }
        +            actions {
        +                open {
        +                    pretty_name "Open"
        +                    pretty_past_tense "Opened"
        +                    new_state "open"
        +                    initial_action_p t
        +                }
        +                comment {
        +                    pretty_name "Comment"
        +                    pretty_past_tense "Commented"
        +                    allowed_roles { submitter assignee }
        +                    privileges { read write }
        +                    always_enabled_p t
        +                }
        +                edit {
        +                    pretty_name "Edit"
        +                    pretty_past_tense "Edited"
        +                    allowed_roles { submitter assignee }
        +                    privileges { write }
        +                    always_enabled_p t
        +                    edit_fields { 
        +                        component_id 
        +                        summary 
        +                        found_in_version
        +                        role_assignee
        +                        fix_for_version
        +                        resolution 
        +                        fixed_in_version 
        +                    }
        +                }
        +                reassign {
        +                    pretty_name "Reassign"
        +                    pretty_past_tense "Reassigned"
        +                    allowed_role { submitter assignee }
        +                    privileges { write }
        +                    enabled_states { resolved }
        +                    assigned_states { open }
        +                    edit_fields { role_assignee }
        +                }
        +                resolve {
        +                    pretty_name "Resolve"
        +                    pretty_past_tense "Resolved"
        +                    assigned_role "assignee"
        +                    enabled_states { resolved }
        +                    assigned_states { open }
        +                    new_state "resolved"
        +                    privileges { write }
        +                    edit_fields { resolution fixed_in_version }
        +                    callbacks { bug-tracker.CaptureResolutionCode }
        +                }
        +                close {
        +                    pretty_name "Close"
        +                    pretty_past_tense "Closed"
        +                    assigned_role "submitter"
        +                    assigned_states { resolved }
        +                    new_state "closed"
        +                    privileges { write }
        +                }
        +                reopen {
        +                    pretty_name "Reopen"
        +                    pretty_past_tense "Reopened"
        +                    allowed_roles { submitter }
        +                    enabled_states { resolved closed }
        +                    new_state "open"
        +                    privileges { write }
        +                }
        +            }
        +        }
        +    }
        +
        +    set workflow_id [workflow::fsm::new_from_spec -spec $spec]
        +    
        +    return $workflow_id
        +}
        +
        + + +

        Defining Callbacks

        + +

        + There are a number of different types of callbacks, each of which applies to + different workflow items (workflows, roles, states, actions). They're all + defined as service contracts. +

        + +

        + In order to make use of them, your application will need to + implement these service contracts, and register the implementation + with the relevant workflow item through the 'callbacks' attribute in + the spec above. +

        + +

        + Here are the types of callbacks defined, how they're used, and the + workflow items they apply to. +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Service contracts
        Service ContractApplies ToDescription
        Workflow.Role_DefaultAssignees + Roles + + Used to get the default assignees for a role. Called for all + roles when a case is started. Also called for roles with no + assignees, when that role is assigned to an action. Should return a + list of party_id's. +
        Workflow.Role_AssigneePickList + Roles + + Used when the users wants to reassign a role to populate a + drop-down list of the most likely users/groups to assign this role + to. Should return less than 25 users/groups. Should return a + list of party_id's. +
        Workflow.Role_AssigneeSubQuery + Roles + + A subquery used to limit the scope of the user's search for a + new assignee for a role. Could typically be used to limit the + search to members of a particular group, organizers of a + particular event, etc. +

        + Should return a subquery ready to be + included in the from-clause of a query, which will be used when + querying for users, for example '(select * from parties where + ...)', (sub-selects must be in parenthesis), or simply + 'cc_users' or 'parties'. Defaults to 'cc_users'. +

        Workflow.Action_SideEffect + Workflows, Actions + + This is executed whenever the given action is executed. If + specified for the workflow, it will be executed whenever any + action is executed on the workflow. For details about how to use + this in conjunction with log entry data and format log title, + see below. +

        + Side-effects are executed after the application object has been + updated, after the workflow state has been changed, after the + log entry has been crated, and roles assigned, but before + notifications have been sent out. +

        Workflow.ActivityLog_FormatTitle + Workflows + + Used to format the title of the case log. In bug-tracker, this + is used to get the resolution code displayed in the case log as + "Resolved (Fixed)" or "Resolved (Not Reproducable)". +

        + The implementation should return the text string that should go + into the parenthesis. The parenthesis are automatically added + if the returned string is non-empty. +

        Workflow.NotificationInfo + Workflows + + Allows the application to supply information about the case + object for the notification. +

        + + Should return the notification information as a 4-element list + containing: +

          +
        1. url +
        2. one-line summary +
        3. details about the object in + the form of an array-list with label/value +
        4. tag for the notification subject (optional). If present, + it will be put inside brackets []. +
        +
        + +

        + All the service contracts have 3 operations each. The first two are + the same for all service contracts, and they really just act like + static variables: +

        + + + + + + + + + + + + + + + + + + + + + + + +
        Common service contract operations
        OperationInputOutputDescription
        GetObjectType + None + + object_type:string + + Get the object type for which this implementation is valid. If + your implementation is valid for any object, return + 'acs_object', otherwise return the object type. +
        GetPrettyName + None + + pretty_name:string + + Get the pretty name of this implementation. This will be used in + the user interface to let the workflow designer pick which + implementation to use. +
        + +

        + The third operation is the one that does the real work. Here are the + inputs and outputs: +

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        Specific service contract operations
        ContractOperationInputOutput
        + Workflow.Role_DefaultAssignees + + GetAssignees + + case_id:integer
        + object_id:integer
        + role_id:integer +
        + party_ids:integer,multiple +
        Workflow.Role_AssigneePickList + GetPickList + + case_id:integer
        + object_id:integer
        + role_id:integer +
        + party_ids:integer,multiple +
        Workflow.Role_AssigneeSubQuery + GetSubquery + + case_id:integer
        + object_id:integer
        + role_id:integer +
        + subquery:string +
        Workflow.Action_SideEffect + DoSideEffect + + case_id:integer + object_id:integer + action_id:integer + entry_id:integer + + None +
        Workflow.ActivityLog_FormatTitle + GetTitle + + case_id:integer + object_id:integer + action_id:integer + entry_id:integer + data_arraylist:string,multiple + + title:string +
        Workflow.NotificationInfo + GetNotificationInfo + + case_id:integer + object_id:integer + + info:string,multiple +
        + +

        + For the most up-to-date information about the service contracts, + your safest bet is to refer to the user-visible pages of the + acs-service-contract package itself, which will let you view your + currently installed contracts and implementations. +

        + +

        Log Entry Data and Log Entry Titles

        + +

        + One noteworthy thing that side-effects can be used for, is to + record information about a log entry for use later in displaying a + more detailed log entry title, or can be used to e.g. tie a workflow + log entry to a particular content repository revision, etc. +

        + +

        + Using workflow::case::add_log_data, you can add arbitrary key/value + pairs to a log entry. These can the be retrieved later using + workflow::case::get_log_data_by_key, and workflow::case::get_log_data. +

        + + +

        Installing and Instantiating (APM Tcl Callbacks)

        + +

        + Here are the workflow-related operations that you'll typically want + your application to do from the APM Tcl Callbacks: +

        + +
        +
        after-install
        +
        + +
        + +
        before-uninstall
        +
        +
          +
        • Delete default workflow (workflow::delete) +
        • Unregister service contract implementations +
        +
        + +
        before-upgrade
        +
        +
          +
        • Add new service contract implementations +
        • Add new workflows +
        • Make changes to existing default workflows (if the installed + verison is not modified) (this isn't yet supported on the workflow API) +
        +
        + +
        after-instantiate
        +
        +
          +
        • + Clone default workflow to create a new workflow attached to + the instance (workflow::fsm::clone) +
        • +
        +
        + +
        before-uninstantiate
        +
        + +
        +
        + +

        + To see what this could look like in practice, check out + packages/bug-tracker/tcl/install-procs.tcl. +

        + + +

        Integrating With Your Application's API

        + +

        + Newer applications will define a namespace for each of the objects + it defines, which will contain procs like "get", "new", "delete", + etc., to manipulate these objects. +

        + +

        + Given such a setup, here are the procs that you want to integrate + workflow into for your workflow-integrated objects. For a real-life + example, see packages/bug-tracker/tcl/bug-procs.tcl and + search for "workflow::". +

        + +
        +
        get
        +
        + In addition to your application's object data, you'll want to call + workflow::case::get_id to get the case_id for your + object, and then either workflow::case::get or + workflow::case::fsm::get in order to get state + information from workflow to include in the data set returned by + your API proc. +
        + +
        new
        +
        + When creating a new object, you should also start a new workflow + case for that object using workflow::case::new. +
        + +
        edit
        +
        + Editing an object should only happen through a workflow action, if + you want to have a complete audit log (workflow case log). Thus, + your edit proc should take the following arguments, in addition to + the object_id and the array containing the object data: +
        +      -action_id:required
        +      -comment:required
        +      -comment_format:required
        +      {-entry_id {}}
        +    
        + (entry_id is for double-click protection). +

        + First, you should update your application object data as normal. + Then you'll probably want to use + workflow::case::get_id to find the case_id. If you + have assignment integrated in your form, you'll want to call + workflow::case::role::assign to pass these on to + workflow, and finally you'll say + workflow::case::action::execute to execute the + action, including state changes, side-effects, and notifications. +

        +
        + +

        Integrating With Your Application's User Interface

        + +

        + Usually, you'll want one page that lists all the objects in your + package instance, and another that lets the user view/edit one + object, called the object form page. This section is about the + object form page, the next section is about the object listing page. +

        + +

        + For a real-life example, look at + packages/bug-tracker/www/bug.tcl. You may want to have + that handy while reading through this. +

        + +

        + We're hoping to make some streamlining of both ad_form and workflow + to make this form page integration even easier at some point. But no promises. +

        + +

        + Use workflow::case::get_id to get the case_id. +

        + +

        + If you want buttons along the bottom of the form like bug-tracker, + use the new 'action' feature of the form builder. What you do is + pass a list of possible actions to the form builder as a + list-of-lists with { label value }. These will be + displayed as buttons at the bottom of the form. +

        + +

        + When one of these buttons are clicked, the form will be in + edit-mode, and you can use form get_action to get the + value of the action chosen. +

        + +

        + So up top, you'll want to ask the form if an action is in progress, + and which one it is, by saying set action_id [form get_action + form-id]. If no action is in progress this will return + the empty string. +

        + +

        + Then you should check that this action is currently available to + this user by saying + workflow::case::action::available_p. +

        + +

        + To get the currently available actions so you can offer them to the + user, use workflow::case::get_available_actions which + will return the action_id's, then workflow::action::get + to get the details about each of the actions. +

        + +

        + If you're using ad_form, and you want only one assignee + per role, and you want assignment integrated with your form, use + workflow::case::role::add_assignee_widgets to add the + widgets. It'll do an ad_form -extend, so they'll appear + at the point at which you call this proc. +

        + +

        + To set the editable fields as defined for the action, do this: +

        + +
        +if { ![empty_string_p $action_id] } {
        +    foreach field [workflow::action::get_element -action_id $action_id -element edit_fields] { 
        +	element set_properties bug $field -mode edit 
        +    }
        +}
        +
        + +

        + Similarly, on submit, you'll want to set the value of the editable fields. +

        + +

        + To populate values of the assignee widgets, use + workflow::case::role::set_assignee_values in your + on_request block. +

        + +

        + To add the case log to the comment field, use + workflow::case::get_activity_html and feed it to the + before_html property of a textarea. +

        + + +

        Integrating With Your Application's Queries

        + +

        + Here's an example of how the bug-tracker integrates with workflow + for nformation about the current state of bugs. +

        + +
        +select b.bug_id,
        +       ...
        +
        +       st.pretty_name as pretty_state,
        +       st.short_name as state_short_name,
        +       st.state_id,
        +       st.hide_fields,
        +
        +       assignee.party_id as assignee_party_id,
        +       assignee.email as assignee_email,
        +       assignee.name as assignee_name
        +
        +from   bt_bugs b,
        +       workflow_cases cas left outer join
        +       (select rpm.case_id,
        +               p.party_id,
        +               p.email,
        +               acs_object__name(p.party_id) as name
        +          from workflow_case_role_party_map rpm,
        +               parties p
        +         where rpm.role_id = :action_role
        +           and p.party_id = rpm.party_id
        +         ) assignee on (cas.case_id = assignee.case_id),
        +       workflow_case_fsm cfsm,
        +       workflow_fsm_states st 
        +where  cas.workflow_id = :workflow_id
        +and    cas.object_id = b.bug_id
        +and    cfsm.case_id = cas.case_id
        +and    st.state_id = cfsm.current_state
        +and    b.project_id = :package_id
        +order  by $order_by_clause
        +
        + +

        + Note the outer join to get the assignee(s). The joins to get + information about the current state is straight-forward. +

        + +

        Good Luck!

        + +

        + That's all I think you'll need to know to start developing + workflow-enabled applications. +

        + +

        + Let me know how it goes, or of something's missing, by posting on + the OpenACS Forums. +

        +
        lars@pinds.com
        Index: openacs-4/packages/workflow/www/doc/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/doc/index.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/workflow/www/doc/index.html 5 Mar 2003 17:19:09 -0000 1.1 +++ openacs-4/packages/workflow/www/doc/index.html 28 Aug 2003 09:41:59 -0000 1.2 @@ -2,17 +2,21 @@ Workflow Documentation

        Workflow Documentation

        +Workflow Documentation + +
        +

        By Lars Pind

        -
        -

        The workflow package provides a service to keep track of a process involving multiple people around some object. Workflow keeps track @@ -37,10 +41,84 @@

        This is the document we wrote before implementing workflow specifying - how we intended to implement the package then. + how we intended to implement the package then. It is inaccurate in a + number of places where reality forced us to make changes.
        +

        Version History

        + +
          +
        • + 1.0d4 Resolved conflicts with old acs-workflow package, so they install side by side. (May 11, 2003) +
        • +
        • + 1.0d3 Added Tcl API workflow::case::delete ; + fixed bug in PL/SQL implementation of workflow_case.delete/workflow_case__delete ; + added @see to workflow::case::insert. +
        • +
        • + 1.0d2 Completed package developer's guide. Added -action_id + switch to workflow::case::get_activity_html.
        • + +
        • + 1.0d1 Bumped up the version number to 1.0 to reflect the + fact that this package is actually at a steady state and fully + useful as is. Also added a little API and cleaned up things a bit, + the kind of things you learn while writing the documentation. +
        • + +
        • + 0.2d2 First version released along with OpenACS 4.6.2. +
        • +
        + +

        Todo

        + +
          +
        • + Internationalization. +
        • +
        • + Add API for modifying live workflows, including ensuring that the modifications are + always safe (i.e. you can't delete a state that's used.) +
        • +
        • + Add a user interface for defining workflows. +
        • +
        • + Add a user interface for monitoring workflows and bulk changing + the state of workflows. +
        • +
        • + Periodically notify people of their outstanding assigned actions. +
        • +
        • + Add a task list user interface, either as part of the Workflow package, or as a separate pacakge. +
        • +
        • + Add support for petri nets and other models. +
        • +
        • + Add timing of actions, deadlines, and integrate those with calendar. +
        • +
        • + Application integration with certain states and actions. For + example, in bug-tracker, we treat the "Open" and "Closed" states + specially. We also treat the "Resolve" action specially. Should be + possible to define this link. +
        • +
        • + Add workflow variants, so you can ship your application with + multiple default implementations of the same workflow and let the + user choose between the available variants (e.g. simple approval + vs. multiple approval variants, choice of triage and Q&A steps in + the bug-tracker, etc.). This should probably be tied to some + concept of an 'application' as in the bullet above. +
        • +
        + +
        lars@pinds.com
        Index: openacs-4/packages/workflow/www/doc/specification.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/workflow/www/doc/specification.html,v diff -u -r1.1 -r1.2 --- openacs-4/packages/workflow/www/doc/specification.html 5 Mar 2003 17:19:09 -0000 1.1 +++ openacs-4/packages/workflow/www/doc/specification.html 28 Aug 2003 09:41:59 -0000 1.2 @@ -1,9 +1,18 @@ -Workflow Specification +Workflow Functional Specification + -

        Workflow Specification

        +

        Workflow Functional Specification

        +Workflow Documentation : Functional Specification + +
        +

        By Lars Pind

        @@ -158,7 +167,7 @@

        - A workflow is associated with an oject, which would typically be one + A workflow is associated with an object, which would typically be one of the following:

        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 -r1.11 -r1.12 --- openacs-4/packages/wp-slim/wp-slim.info 17 May 2003 12:49:05 -0000 1.11 +++ openacs-4/packages/wp-slim/wp-slim.info 28 Aug 2003 09:41:59 -0000 1.12 @@ -6,191 +6,24 @@ Wimpy Points f f - - + + oracle postgresql - Jack Purswani -and Sidharth Widge(Porter) - Paul Konigsberg - Haolan Qin + Rocael Hernandez Rizzardini Wimpy Point allows users to collaborate and share online presentations. - 2001-01-26 - ArsDigita Corporation - Ported (Jack). Fixed several bugs. Added new features (e.g. versioning and authorization). + 2003-08-07 + 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). - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/sql/oracle/upgrade-4.0b-4.0b1.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/sql/oracle/wp-slim-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/oracle/wp-slim-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/sql/oracle/wp-slim-create.sql 17 May 2003 12:49:23 -0000 1.4 +++ openacs-4/packages/wp-slim/sql/oracle/wp-slim-create.sql 28 Aug 2003 09:41:59 -0000 1.5 @@ -40,30 +40,51 @@ where not exists (select 1 from cr_mime_types where mime_type = 'application/octet-stream'); +create sequence wp_style_seq; + create table wp_styles ( style_id integer constraint wp_styles_style_id_pk primary key, name varchar2(400) constraint wp_styles_name_nn not null, - -- CSS source css varchar(4000), - -- HTML style properties. Colors are in the form '192,192,255'. - text_color varchar2(20) check(text_color like '%,%,%'), - background_color varchar2(20) check(background_color like '%,%,%'), - background_image varchar2(200), - link_color varchar2(20) check(link_color like '%,%,%'), - alink_color varchar2(20) check(alink_color like '%,%,%'), - vlink_color varchar2(20) check(vlink_color like '%,%,%') + text_color varchar(20) check(text_color like '%,%,%'), + background_color varchar(20) check(background_color like '%,%,%'), + background_image integer default 0, + link_color varchar(20) check(link_color like '%,%,%'), + alink_color varchar(20) check(alink_color like '%,%,%'), + vlink_color varchar(20) check(vlink_color like '%,%,%'), + public_p char(1) default 'f' check(public_p in ('t','f')), + owner integer + constraint wp_styles_to_users + references users (user_id) ); --- Insert the magic, "default" style. + insert into wp_styles(style_id, name, css) values(-1, 'Default (Plain)', 'BODY { back-color: white; color: black } P { line-height: 120% } UL { line-height: 140% }'); +-- this is also a new index! roc@ +create index wp_styles_by_owner on wp_styles(owner); +-- new table for supporting background images! +-- Images used for styles. + +create table wp_style_images ( +-- this one references to a cr! + wp_style_images_id integer primary key, + style_id integer references wp_styles(style_id) on delete cascade not null, + file_size integer not null, + file_name varchar(200) not null +); + +create index wp_style_images_style_id on wp_style_images(style_id); + + + create table cr_wp_presentations ( presentation_id integer constraint cr_wp_presentations_id_fk @@ -88,7 +109,10 @@ -- Show last-modified date for slides? show_modified_p char(1) default 'f' constraint cr_wp_show_p_ck - check(show_modified_p in ('t','f')) + check(show_modified_p in ('t','f')), + show_comments_p char(1) default 'f' + constraint cr_wp_pres_show_comments_p + check(show_comments_p in ('t','f')) ); @@ -533,20 +557,7 @@ show errors --- begin - -- bind privileges to global names - - -- acs_privilege.add_child('create','wp_create_presentation'); - -- acs_privilege.add_child('write','wp_edit_presentation'); - -- acs_privilege.add_child('delete','wp_delete_presentation'); - -- acs_privilege.add_child('read','wp_view_presentation'); - -- commit; --- end; --- / --- show errors - - declare default_context acs_objects.object_id%TYPE; registered_users acs_objects.object_id%TYPE; @@ -555,7 +566,7 @@ default_context := acs.magic_object_id('default_context'); registered_users := acs.magic_object_id('registered_users'); - the_public := acs.magic_object_id('the_public'); +-- the_public := acs.magic_object_id('the_public'); -- give registered users the power to create presentations by default @@ -567,11 +578,12 @@ -- give the public the power to view by default - acs_permission.grant_permission ( - object_id => default_context, - grantee_id => the_public, - privilege => 'wp_view_presentation' - ); +-- this commented out because permission, with this any user could see an slide that has not become public! +-- acs_permission.grant_permission ( +-- object_id => default_context, +-- grantee_id => the_public, +-- privilege => 'wp_view_presentation' +-- ); end; / @@ -1672,4 +1684,90 @@ show errors +-- adding some new permissions roc@ + +Begin + + acs_privilege.add_child('wp_edit_presentation', 'wp_view_presentation'); + acs_privilege.add_child('wp_admin_presentation', 'wp_create_presentation'); + acs_privilege.add_child('wp_admin_presentation', 'wp_edit_presentation'); + acs_privilege.add_child('wp_admin_presentation', 'wp_delete_presentation'); + +-- lets give site-wide permissions, wp-permissions! + acs_privilege.add_child('admin', 'wp_admin_presentation'); + +end; +/ + +--style package roc@ + +create or replace package wp_style +as + +procedure delete ( + p_style_id in wp_styles.style_id%TYPE +); + +procedure image_delete( + p_revision_id in wp_style_images.wp_style_images_id%TYPE +); + +end wp_style; +/ +show errors + + + +create or replace package body wp_style +as + +procedure delete ( + p_style_id in wp_styles.style_id%TYPE +) +is + p_item_id integer; +begin + + for one_image in ( + select * from wp_style_images + where wp_style_images_id = (select background_image from wp_styles where style_id = wp_style.delete.p_style_id)) + loop + delete from wp_style_images where wp_style_images_id = one_image.wp_style_images_id; + select item_id into p_item_id from cr_revisions where revision_id = one_image.wp_style_images_id; + + content_item.delete(item_id => p_item_id); + end loop; + + update cr_wp_slides set style = -1 where style = wp_style.delete.p_style_id; + update cr_wp_presentations set style = -1 where style = wp_style.delete.p_style_id; + delete from wp_styles where style_id = wp_style.delete.p_style_id; + +end; + + + +procedure image_delete( + p_revision_id in wp_style_images.wp_style_images_id%TYPE +) +is + p_item_id integer; +begin + + update wp_styles set background_image = 0 where background_image = wp_style.image_delete.p_revision_id; + + delete from wp_style_images + where wp_style_images_id = wp_style.image_delete.p_revision_id; + + select item_id into p_item_id from cr_revisions where revision_id = wp_style.image_delete.p_revision_id; + + content_item.delete(item_id => p_item_id); + +end; + + +end wp_style; +/ +show errors + + commit; Index: openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql 13 Mar 2002 22:50:53 -0000 1.3 +++ openacs-4/packages/wp-slim/sql/oracle/wp-slim-drop.sql 28 Aug 2003 09:41:59 -0000 1.4 @@ -195,25 +195,35 @@ default_context := acs.magic_object_id('default_context'); registered_users := acs.magic_object_id('registered_users'); - the_public := acs.magic_object_id('the_public'); +-- the_public := acs.magic_object_id('the_public'); acs_permission.revoke_permission ( object_id => default_context, grantee_id => registered_users, privilege => 'wp_create_presentation' ); - acs_permission.revoke_permission ( - object_id => default_context, - grantee_id => the_public, - privilege => 'wp_view_presentation' - ); +-- acs_permission.revoke_permission ( +-- object_id => default_context, +-- grantee_id => the_public, +-- privilege => 'wp_view_presentation' +-- ); end; / show errors begin + + + acs_privilege.remove_child('admin', 'wp_admin_presentation'); + + acs_privilege.remove_child('wp_edit_presentation', 'wp_view_presentation'); + acs_privilege.remove_child('wp_admin_presentation', 'wp_create_presentation'); + acs_privilege.remove_child('wp_admin_presentation', 'wp_edit_presentation'); + acs_privilege.remove_child('wp_admin_presentation', 'wp_delete_presentation'); + + delete from acs_permissions where privilege in ('wp_admin_presentation', 'wp_create_presentation', 'wp_edit_presentation', 'wp_delete_presentation', 'wp_view_presentation'); acs_privilege.drop_privilege('wp_admin_presentation'); @@ -253,6 +263,15 @@ drop view cr_wp_presentationsx; drop table cr_wp_presentations; +-- droping style definitions roc@ + +drop package wp_style; + + +drop sequence wp_style_seq; + +drop table wp_style_images; + drop table wp_styles; commit; Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/sql/oracle/upgrade/upgrade-4.0b-4.0b1.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/sql/oracle/upgrade/upgrade-4.0b1-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/wp-slim/sql/postgresql/wp-packages-create.sql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql 17 May 2003 12:49:58 -0000 1.7 +++ openacs-4/packages/wp-slim/sql/postgresql/wp-slim-create.sql 28 Aug 2003 09:42:00 -0000 1.8 @@ -38,27 +38,51 @@ from dual where not exists (select 1 from cr_mime_types where mime_type ='application/octet-stream'); ---jackp: Create the different styles + +create sequence wp_style_seq; + create table wp_styles ( style_id integer constraint wp_styles_style_id_pk primary key, name varchar(400) constraint wp_styles_name_nn not null, - css varchar(4000), + css text, text_color varchar(20) check(text_color like '%,%,%'), background_color varchar(20) check(background_color like '%,%,%'), - background_image varchar(200), + background_image integer default 0, link_color varchar(20) check(link_color like '%,%,%'), alink_color varchar(20) check(alink_color like '%,%,%'), - vlink_color varchar(20) check(vlink_color like '%,%,%') + vlink_color varchar(20) check(vlink_color like '%,%,%'), + public_p char(1) default 'f' check(public_p in ('t','f')), + owner integer + constraint wp_styles_to_users + references users (user_id) ); + insert into wp_styles(style_id, name, css) values(-1, 'Default (Plain)', 'BODY { back-color: white; color: black } P { line-height: 120% } UL { line-height: 140% }'); +-- this is also a new index! roc@ +create index wp_styles_by_owner on wp_styles(owner); + +-- new table for supporting background images! +-- Images used for styles. + +create table wp_style_images ( +-- this one references to a cr! + wp_style_images_id integer primary key, + style_id integer references wp_styles(style_id) on delete cascade not null, + file_size integer not null, + file_name varchar(200) not null +); + +create index wp_style_images_style_id on wp_style_images(style_id); + + --jackp: p_create the presentation table create table cr_wp_presentations ( presentation_id integer @@ -84,7 +108,10 @@ -- Show last-modified date for slide? show_modified_p boolean constraint cr_wp_show_p_ck - check(show_modified_p in ('t','f')) + check(show_modified_p in ('t','f')), + show_comments_p char(1) default 'f' + constraint cr_wp_comments_p + check(show_comments_p in ('t','f')) ); @@ -684,6 +711,7 @@ select inline_10 (); drop function inline_10 (); + --jackp: set the permissions applicable to the package create function inline_11 () returns integer as' @@ -694,1132 +722,32 @@ begin default_context := acs__magic_object_id(''default_context''); registered_users := acs__magic_object_id(''registered_users''); - the_public := acs__magic_object_id(''the_public''); +-- the_public := acs__magic_object_id(''the_public''); PERFORM acs_permission__grant_permission( default_context, registered_users, ''wp_create_presentation'' ); - PERFORM acs_permission__grant_permission( - default_context, - the_public, - ''wp_view_presentation'' - ); +-- this commented out because permission, with this any user could see an slide that has not become public! +-- PERFORM acs_permission__grant_permission( +-- default_context, +-- the_public, +-- ''wp_view_presentation'' +-- ); return 0; end;' language 'plpgsql'; select inline_11 (); drop function inline_11 (); ---jackp: From here on the functions are defined +-- new permissions roc@ +select acs_privilege__add_child('wp_edit_presentation', 'wp_view_presentation'); +select acs_privilege__add_child('wp_admin_presentation', 'wp_create_presentation'); +select acs_privilege__add_child('wp_admin_presentation', 'wp_edit_presentation'); +select acs_privilege__add_child('wp_admin_presentation', 'wp_delete_presentation'); ---jackp: To p_create each presentation -create function wp_presentation__new ( - timestamptz, - integer, - varchar(400), - varchar(400), - varchar(400), - varchar, - integer, - boolean, - boolean, - varchar, - varchar, - integer -) -returns integer as' -declare - p_creation_date alias for $1; - p_creation_user alias for $2; - p_creation_ip alias for $3; - p_pres_title alias for $4; - p_page_signature alias for $5; - p_copyright_notice alias for $6; - p_style alias for $7; - p_public_p alias for $8; - p_show_modified_p alias for $9; - aud alias for $10; - back alias for $11; - p_parent_id alias for $12; - v_item_id cr_items.item_id%TYPE; - v_audience_item_id cr_items.item_id%TYPE; - v_background_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_audience_revision_id cr_revisions.revision_id%TYPE; - v_background_revision_id cr_revisions.revision_id%TYPE; - v_max_id integer; - v_name cr_wp_presentations.pres_title%TYPE; -begin - select coalesce(max(item_id),0) into v_max_id - from cr_items - where content_type = ''cr_wp_presentation'' - and name like p_pres_title || ''%''; - - v_name := p_pres_title || ''_'' || v_max_id; +-- lets give site-wide permissions, wp-permissions! +select acs_privilege__add_child('admin', 'wp_admin_presentation'); - v_item_id := content_item__new( - v_name, - p_parent_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_presentation'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - v_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - null, - v_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_revision_id); - ---jackp: Actually place the information entered by the user into the table - insert into cr_wp_presentations - ( - presentation_id, - pres_title, - page_signature, - copyright_notice, - style, - public_p, - show_modified_p - ) values ( - v_revision_id, - p_pres_title, - p_page_signature, - p_copyright_notice, - p_style, - p_public_p, - p_show_modified_p - ); - - v_audience_item_id := content_item__new( - aud, - v_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_presentation_aud'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - - v_audience_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - aud, - v_audience_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_audience_revision_id); - - insert into cr_wp_presentations_aud - ( - id, - presentation_id - ) values ( - v_audience_revision_id, - v_revision_id - ); - - v_background_item_id := content_item__new( - back, - v_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_presentation_back'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - - v_background_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - back, - v_background_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_background_revision_id); - - insert into cr_wp_presentations_back - ( - id, - presentation_id - ) values ( - v_background_revision_id, - v_revision_id - ); - - return v_item_id; -end;' language 'plpgsql'; - -create function wp_presentation__delete_audience ( - integer -) -returns integer as' -declare - audience_item_id alias for $1; -begin - delete from cr_wp_presentations_aud - where exists (select 1 from cr_revisions where revision_id = cr_wp_presentations_aud.id and item_id = audience_item_id); - delete from cr_item_publish_audit - where item_id = audience_item_id; - - PERFORM content_item__delete(audience_item_id); -return 0; -end;' language 'plpgsql'; - -create function wp_presentation__delete_background ( - integer -) -returns integer as' -declare - background_item_id alias for $1; -begin - delete from cr_wp_presentations_back - where exists (select 1 from cr_revisions where revision_id = cr_wp_presentations_back.id and item_id = background_item_id); - delete from cr_item_publish_audit - where item_id = background_item_id; - - PERFORM content_item__delete(background_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_presentation__delete ( - integer -) -returns integer as' -declare - pres_item_id alias for $1; - v_audience_item_id cr_items.item_id%TYPE; - v_background_item_id cr_items.item_id%TYPE; - del_rec record; -begin - for del_rec in select item_id as slide_item_id - from cr_items - where content_type = ''cr_wp_slide'' - and parent_id = pres_item_id - loop - PERFORM wp_slide__delete(del_rec.slide_item_id); - end loop; - - select item_id into v_audience_item_id - from cr_items - where content_type = ''cr_wp_presentation_aud'' - and parent_id = pres_item_id; - - PERFORM wp_presentation__delete_audience(v_audience_item_id); - - select item_id into v_background_item_id - from cr_items - where content_type = ''cr_wp_presentation_back'' - and parent_id = pres_item_id; - - PERFORM wp_presentation__delete_background(v_background_item_id); - - delete from acs_permissions where object_id = pres_item_id; - -- update acs_objects set context_id=null where context_id = pres_item_id; - delete from cr_wp_presentations where exists (select 1 from cr_revisions where cr_revisions.revision_id = cr_wp_presentations.presentation_id and cr_revisions.item_id = pres_item_id); - PERFORM content_item__delete(pres_item_id); -return 0; -end;' language 'plpgsql'; - --- DRB: All these could've been implemented as a single function with a type argument --- but I'm not going to rewrite all of wp-slim's queries just to clean this up... - -create function wp_presentation__get_ad_revision (integer) returns text as ' -declare - p_pres_revision_id alias for $1; -begin - return r.content - from cr_revisions r, - cr_wp_presentations_aud pa - where pa.presentation_id = p_pres_revision_id - and r.revision_id = pa.id; -end;' language 'plpgsql'; - -create function wp_presentation__get_audience ( - integer -) returns text as' -declare - p_pres_item_id alias for $1; -begin - return content - from cr_revisions, cr_items - where cr_items.content_type = ''cr_wp_presentation_aud'' - and cr_items.parent_id = p_pres_item_id - and cr_revisions.revision_id = cr_items__live_revision; -end;' language 'plpgsql'; - -create function wp_presentation__get_bg_revision (integer) returns text as ' -declare - p_pres_revision_id alias for $1; -begin - return r.content - from cr_revisions r, - cr_wp_presentations_aud pa - where pa.presentation_id = p_pres_revision_id - and r.revision_id = pa.id; -end;' language 'plpgsql'; - -create function wp_presentation__get_background ( - integer -) returns text as' -declare - pres_item_id alias for $1; -begin - return content - from cr_revisions, cr_items - where cr_items.content_type = ''cr_wp_presentation_bak'' - and cr_items.parent_id = p_pres_item_id - and cr_revisions.revision_id = cr_items__live_revision; -end;' language 'plpgsql'; - - -create function wp_presentation__new_revision ( - timestamptz, - integer, - varchar, - integer, - varchar(400), - varchar(200), - varchar(400), - integer, - boolean, - boolean, - varchar, - varchar -) returns integer as' -declare - p_creation_date alias for $1; - p_creation_user alias for $2; - p_creation_ip alias for $3; - p_pres_item_id alias for $4; - p_pres_title alias for $5; - p_page_signature alias for $6; - p_copyright_notice alias for $7; - p_style alias for $8; - p_public_p alias for $9; - p_show_modified_p alias for $10; - p_audience alias for $11; - p_background alias for $12; - v_audience_item_id cr_items.item_id%TYPE; - v_background_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_audience_revision_id cr_revisions.revision_id%TYPE; - v_background_revision_id cr_revisions.revision_id%TYPE; -begin - v_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - null, - p_pres_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_revision_id); - - insert into cr_wp_presentations - ( - presentation_id, - pres_title, - page_signature, - copyright_notice, - style, - public_p, - show_modified_p - ) values ( - v_revision_id, - p_pres_title, - p_page_signature, - p_copyright_notice, - p_style, - p_public_p, - p_show_modified_p - ); - - select item_id into v_audience_item_id - from cr_items - where parent_id = p_pres_item_id - and content_type = ''cr_wp_presentation_aud''; - - v_audience_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_audience, - v_audience_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_audience_revision_id); - - insert into cr_wp_presentations_aud - ( - id, - presentation_id - ) values ( - v_audience_revision_id, - v_revision_id - ); - - select item_id into v_background_item_id - from cr_items - where parent_id = p_pres_item_id - and content_type = ''cr_wp_presentation_back''; - - v_background_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_background, - v_background_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_background_revision_id); - - insert into cr_wp_presentations_back - ( - id, - presentation_id - ) values ( - v_background_revision_id, - v_revision_id - ); - return 0; -end;' language 'plpgsql'; - -create function wp_slide__new ( - integer, - timestamptz, - integer, - varchar, - varchar, - integer, - integer, - integer, - varchar, - varchar, - varchar, - boolean, - boolean, - integer -) returns integer as' -declare - p_pres_item_id alias for $1; - p_creation_date alias for $2; - p_creation_user alias for $3; - p_creation_ip alias for $4; - p_slide_title alias for $5; - p_style alias for $6; - p_original_slide_id alias for $7; - p_sort_key alias for $8; - p_preamble alias for $9; - p_bullet_items alias for $10; - p_postamble alias for $11; - p_include_in_outline_p alias for $12; - p_context_break_after_p alias for $13; - p_context_id alias for $14; - v_item_id cr_items.item_id%TYPE; - v_preamble_item_id cr_items.item_id%TYPE; - v_postamble_item_id cr_items.item_id%TYPE; - v_bullet_items_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_preamble_revision_id cr_revisions.revision_id%TYPE; - v_postamble_revision_id cr_revisions.revision_id%TYPE; - v_bullet_items_revision_id cr_revisions.revision_id%TYPE; - v_max_id integer; - v_name varchar; -begin - select coalesce(max(item_id),0) into v_max_id - from cr_items - where content_type = ''cr_wp_slide'' - and name like p_slide_title || ''%''; - - v_name := p_slide_title || ''_'' || v_max_id; - - v_item_id := content_item__new( - v_name, - p_pres_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_slide'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - - v_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - null, - v_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_revision_id); - - update cr_wp_slides - set sort_key = sort_key + 1 - where sort_key >= p_sort_key - and exists (select 1 from cr_items, cr_revisions where parent_id = - p_pres_item_id and cr_items.item_id = cr_revisions.item_id - and cr_revisions.revision_id=cr_wp_slides.slide_id); - - insert into cr_wp_slides - ( - slide_id, - original_slide_id, - sort_key, - slide_title, - include_in_outline_p, - context_break_after_p, - style - ) values ( - v_revision_id, - p_original_slide_id, - p_sort_key, - p_slide_title, - p_include_in_outline_p, - p_context_break_after_p, - p_style - ); - - v_preamble_item_id := content_item__new( - ''preamble'', - v_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_slide_preamble'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - - v_preamble_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_preamble, - v_preamble_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_preamble_revision_id); - - insert into cr_wp_slides_preamble - ( - id, - slide_id - ) values ( - v_preamble_revision_id, - v_revision_id - ); - - v_postamble_item_id := content_item__new( - ''postamble'', - v_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_slide_postamble'', - null, - null, - ''text/plain'', - null, - null, - ''text'' - ); - - - v_postamble_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_postamble, - v_postamble_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_postamble_revision_id); - - insert into cr_wp_slides_postamble - ( - id, - slide_id - ) values ( - v_postamble_revision_id, - v_revision_id - ); - - v_bullet_items_item_id := content_item__new( - ''bullet_items'', - v_item_id, - null, - null, - p_creation_date, - p_creation_user, - null, - p_creation_ip, - ''content_item'', - ''cr_wp_slide_bullet_items'', - null, - null, - null, - ''text/plain'', - null, - ''text'' - ); - - - v_bullet_items_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_bullet_items, - v_bullet_items_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_bullet_items_revision_id); - - insert into cr_wp_slides_bullet_items - ( - id, - slide_id - ) values ( - v_bullet_items_revision_id, - v_revision_id - ); - return v_item_id; -end;' language 'plpgsql'; - -create function wp_slide__delete_preamble ( - integer -) returns integer as' -declare - delete_preamble__preamble_item_id alias for $1; -begin - delete from cr_wp_slides_preamble - where exists (select 1 from cr_revisions where revision_id = - cr_wp_slides_preamble.id - and item_id = delete_preamble__preamble_item_id); - - delete from cr_item_publish_audit - where item_id = delete_preamble__preamble_item_id; - - PERFORM content_item__delete(delete_preamble__preamble_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_slide__delete_postamble( - integer -) returns integer as' -declare - delete_postamble__postamble_item_id alias for $1; -begin - delete from cr_wp_slides_postamble - where exists (select 1 from cr_revisions where revision_id = - cr_wp_slides_postamble.id - and item_id = delete_postamble__postamble_item_id); - - delete from cr_item_publish_audit - where item_id = delete_postamble__postamble_item_id; - - PERFORM content_item__delete(delete_postamble__postamble_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_slide__delete_bullet_items( - integer -) returns integer as' -declare - delete_bullet_items__bullet_items_item_id alias for $1; -begin - delete from cr_wp_slides_bullet_items - where exists (select 1 from cr_revisions where revision_id = - cr_wp_slides_bullet_items.id - and item_id = delete_bullet_items__bullet_items_item_id); - - delete from cr_item_publish_audit - where item_id = delete_bullet_items__bullet_items_item_id; - - PERFORM content_item__delete(delete_bullet_items__bullet_items_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_slide__delete( - integer -) returns integer as' -declare - del_rec record; - slide_item_id alias for $1; - v_sort_key cr_wp_slides.sort_key%TYPE; - v_pres_item_id cr_items.item_id%TYPE; - v_preamble_item_id cr_items.item_id%TYPE; - v_postamble_item_id cr_items.item_id%TYPE; - v_bullet_items_item_id cr_items.item_id%TYPE; -begin - for del_rec in select item_id as attach_item_id - from cr_items - where content_type in (''cr_wp_image_attachment'', ''cr_wp_file_attachment'') - and parent_id = slide_item_id - loop - wp_attachment__delete(del_rec.attach_item_id); - end loop; - - select item_id into v_preamble_item_id - from cr_items - where content_type = ''cr_wp_slide_preamble'' - and parent_id = slide_item_id; - - PERFORM wp_slide__delete_preamble(v_preamble_item_id); - - select item_id into v_postamble_item_id - from cr_items - where content_type = ''cr_wp_slide_postamble'' - and parent_id = slide_item_id; - - PERFORM wp_slide__delete_postamble(v_postamble_item_id); - - select item_id into v_bullet_items_item_id - from cr_items - where content_type = ''cr_wp_slide_bullet_items'' - and parent_id = slide_item_id; - - PERFORM wp_slide__delete_bullet_items(v_bullet_items_item_id); - --- sort_key of all revisions should be the same - select max(s.sort_key), max(i.parent_id) into v_sort_key, - v_pres_item_id - from cr_wp_slides s, cr_revisions r, cr_items i - where r.item_id = slide_item_id - and r.revision_id = s.slide_id - and i.item_id = r.item_id; - - delete from cr_wp_slides where exists (select 1 from cr_revisions - where cr_revisions.revision_id = cr_wp_slides.slide_id - and cr_revisions.item_id = slide_item_id); - - update cr_wp_slides set sort_key = sort_key - 1 - where sort_key > v_sort_key and exists - (select 1 from cr_revisions r, cr_items i - where i.parent_id = v_pres_item_id and i.item_id = r.item_id - and r.revision_id = cr_wp_slides.slide_id); - --- update acs_objects set context_id=null --- where context_id = slide_item_id; - - delete from cr_item_publish_audit where item_id = slide_item_id; - - PERFORM content_item__delete(slide_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_slide__get_preamble_revision ( - integer -) returns text as ' -declare - p_slide_revision_id alias for $1; -begin - return content - from cr_revisions r, cr_wp_slides_preamble sp - where sp.slide_id = p_slide_revision_id - and r.revision_id = sp.id; -end;' language 'plpgsql'; - -create function wp_slide__get_postamble_revision ( - integer -) returns text as ' -declare - p_slide_revision_id alias for $1; -begin - return content - from cr_revisions r, cr_wp_slides_postamble sp - where sp.slide_id = p_slide_revision_id - and r.revision_id = sp.id; -end;' language 'plpgsql'; - -create function wp_slide__get_bullet_items_revision ( - integer -) returns text as ' -declare - p_slide_revision_id alias for $1; -begin - return content - from cr_revisions r, cr_wp_slides_bullet_items sp - where sp.slide_id = p_slide_revision_id - and r.revision_id = sp.id; -end;' language 'plpgsql'; - -create function wp_slide__get_postamble( - integer -) returns text as ' -declare - p_slide_item_id alias for $1; -begin - return content - from cr_revisions, cr_items - where cr_items.content_type = ''cr_wp_slide_postamble'' - and cr_items.parent_id = p_slide_item_id - and cr_revisions.revision_id = cr_items.live_revision; -end;' language 'plpgsql'; - -create function wp_slide__get_preamble( - integer -) returns text as' -declare - p_slide_item_id alias for $1; -begin - return content - from cr_revisions, cr_items - where cr_items.content_type = ''cr_wp_slide_preamble'' - and cr_items.parent_id = p_slide_item_id - and cr_revisions.revision_id = cr_items.live_revision; -end;' language 'plpgsql'; - -create function wp_slide__get_bullet_items( - integer -) returns text as' -declare - p_slide_item_id alias for $1; -begin - return content - from cr_revisions, cr_items - where cr_items.content_type = ''cr_wp_slide_bullet_items'' - and cr_items.parent_id = p_slide_item_id - and cr_revisions.revision_id = cr_items.live_revision; -end;' language 'plpgsql'; - -create function wp_slide__new_revision( - timestamptz, - integer, - varchar, - integer, - varchar, - text, - varchar, - varchar, - integer, - integer, - integer, - boolean, - boolean -) returns integer as' -declare - p_creation_date alias for $1; - p_creation_user alias for $2; - p_creation_ip alias for $3; - p_slide_item_id alias for $4; - p_slide_title alias for $5; - p_preamble alias for $6; - p_bullet_items alias for $7; - p_postamble alias for $8; - p_style alias for $9; - p_original_slide_id alias for $10; - p_sort_key alias for $11; - p_include_in_outline_p alias for $12; - p_context_break_after_p alias for $13; - v_preamble_item_id cr_items.item_id%TYPE; - v_postamble_item_id cr_items.item_id%TYPE; - v_bullet_items_item_id cr_items.item_id%TYPE; - v_revision_id cr_revisions.revision_id%TYPE; - v_preamble_revision_id cr_revisions.revision_id%TYPE; - v_postamble_revision_id cr_revisions.revision_id%TYPE; - v_bullet_items_revision_id cr_revisions.revision_id%TYPE; -begin - v_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - null, - p_slide_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_revision_id); - - insert into cr_wp_slides - ( - slide_id, - slide_title, - style, - original_slide_id, - sort_key, - include_in_outline_p, - context_break_after_p - ) values ( - v_revision_id, - p_slide_title, - p_style, - p_original_slide_id, - p_sort_key, - p_include_in_outline_p, - p_context_break_after_p - ); - - select item_id into v_preamble_item_id - from cr_items - where parent_id = p_slide_item_id - and content_type = ''cr_wp_slide_preamble''; - - v_preamble_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_preamble, - v_preamble_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_preamble_revision_id); - - insert into cr_wp_slides_preamble - ( - id, - slide_id - ) values ( - v_preamble_revision_id, - v_revision_id - ); - - select item_id into v_postamble_item_id - from cr_items - where parent_id = p_slide_item_id - and content_type = ''cr_wp_slide_postamble''; - - v_postamble_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_postamble, - v_postamble_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_postamble_revision_id); - - insert into cr_wp_slides_postamble - ( - id, - slide_id - ) values ( - v_postamble_revision_id, - v_revision_id - ); - - select item_id into v_bullet_items_item_id - from cr_items - where parent_id = p_slide_item_id - and content_type = ''cr_wp_slide_bullet_items''; - - v_bullet_items_revision_id := content_revision__new( - null, - null, - current_timestamp, - ''text/plain'', - null, - p_bullet_items, - v_bullet_items_item_id, - null, - p_creation_date, - p_creation_user, - p_creation_ip - ); - - PERFORM content_item__set_live_revision(v_bullet_items_revision_id); - - insert into cr_wp_slides_bullet_items - ( - id, - slide_id - ) values ( - v_bullet_items_revision_id, - v_revision_id - ); - return 0; -end;' language 'plpgsql'; - -create function wp_attachment__delete( - integer -) returns integer as' -declare - p_attach_item_id alias for $1; -begin - delete from cr_wp_file_attachments - where exists (select 1 from cr_revisions where revision_id - = cr_wp_file_attachments.attach_id - and item_id = p_attach_item_id); - - delete from cr_wp_image_attachments - where exists (select 1 from cr_revisions where revision_id - = cr_wp_image_attachments.attach_id - and item_id = p_attach_item_id); - - delete from cr_item_publish_audit - where item_id = p_attach_item_id; - - PERFORM content_item__delete(p_attach_item_id); - return 0; -end;' language 'plpgsql'; - -create function wp_attachment__new_revision ( - integer -) returns integer as' -declare - p_attach_item_id alias for $1; -begin - return 0; -end; 'language 'plpgsql'; - - - - -create function wp_presentation__set_live_revision(integer) returns integer as ' -declare - p_revision_id alias for $1; - v_revision_id integer; -begin - perform content_item__set_live_revision(p_revision_id); - - select id into v_revision_id - from cr_wp_presentations_aud - where presentation_id = p_revision_id; - - perform content_item__set_live_revision(v_revision_id); - - select id into v_revision_id - from cr_wp_presentations_back - where presentation_id = p_revision_id; - - perform content_item__set_live_revision(v_revision_id); - return 0; -end;' language 'plpgsql'; - - - Index: openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 17 May 2003 12:49:58 -0000 1.4 +++ openacs-4/packages/wp-slim/sql/postgresql/wp-slim-drop.sql 28 Aug 2003 09:42:00 -0000 1.5 @@ -315,26 +315,35 @@ default_context := acs__magic_object_id(''default_context''); registered_users := acs__magic_object_id(''registered_users''); - the_public := acs__magic_object_id(''the_public''); +-- the_public := acs__magic_object_id(''the_public''); PERFORM acs_permission__revoke_permission ( default_context, registered_users, ''wp_create_presentation'' ); - PERFORM acs_permission__revoke_permission ( - default_context, - the_public, - ''wp_view_presentation'' - ); +-- PERFORM acs_permission__revoke_permission ( +-- default_context, +-- the_public, +-- ''wp_view_presentation'' +-- ); return 0; end;' language 'plpgsql'; select inline_11 (); drop function inline_11 (); --checked + +select acs_privilege__remove_child('admin', 'wp_admin_presentation'); + +select acs_privilege__remove_child('wp_edit_presentation', 'wp_view_presentation'); +select acs_privilege__remove_child('wp_admin_presentation', 'wp_create_presentation'); +select acs_privilege__remove_child('wp_admin_presentation', 'wp_edit_presentation'); +select acs_privilege__remove_child('wp_admin_presentation', 'wp_delete_presentation'); + + create function inline_12 () returns integer as' begin @@ -469,9 +478,9 @@ integer, varchar, integer, - varchar(400), - varchar(200), - varchar(400), + varchar, + varchar, + varchar, integer, boolean, boolean, @@ -500,10 +509,19 @@ drop view cr_wp_presentationsx; drop table cr_wp_presentations; -drop table wp_styles; drop function wp_slide__get_bullet_items_revision(integer); drop function wp_slide__get_postamble_revision(integer); drop function wp_slide__get_bullet_items(integer); drop function wp_slide__get_postamble(integer); drop function wp_presentation__set_live_revision(integer); + +drop sequence wp_style_seq; + + +drop function wp_style__delete(integer); + +drop function wp_style__image_delete(integer); +drop table wp_style_images; +drop table wp_styles; + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/sql/postgresql/upgrade/upgrade-4.0b3-4.1.sql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/tcl/printer-view-procs-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/tcl/printer-view-procs-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/tcl/printer-view-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/tcl/printer-view-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/tcl/printer-view-procs.tcl 17 May 2003 12:50:28 -0000 1.2 +++ openacs-4/packages/wp-slim/tcl/printer-view-procs.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -7,16 +7,6 @@ slide_item_id } { -db_multirow attach_list get_attachments { - - select live_revision as attach_id, display, name as file_name - from (select live_revision, name - from cr_items - where parent_id = :slide_item_id and - content_type in ('cr_wp_image_attachment', 'cr_wp_file_attachment') - ) a - left join cr_wp_image_attachments on (a.live_revision = attach_id) +db_multirow attach_list get_attachments { *SQL* } } - -} Index: openacs-4/packages/wp-slim/tcl/printer-view-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/tcl/printer-view-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/tcl/printer-view-procs.xql 17 May 2003 12:50:28 -0000 1.2 +++ openacs-4/packages/wp-slim/tcl/printer-view-procs.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -1,6 +1,6 @@ - + select live_revision as attach_id, display, name as file_name Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/tcl/wp-slim-procs.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/tcl/wp-slim-procs.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/attach-del.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-del.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/attach-del.tcl 4 Oct 2001 04:29:01 -0000 1.2 +++ openacs-4/packages/wp-slim/www/attach-del.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -10,8 +10,12 @@ } { slide_item_id:naturalnum,notnull attach_item_id:naturalnum,notnull + pres_item_id:naturalnum,notnull } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_delete_presentation db_exec_plsql revisions_and_item_delete { @@ -20,4 +24,4 @@ end; } -ad_returnredirect "attach-list?[export_url_vars slide_item_id]" +ad_returnredirect "attach-list?[export_url_vars slide_item_id pres_item_id]" Index: openacs-4/packages/wp-slim/www/attach-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-detail.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/attach-detail.tcl 6 Sep 2002 15:32:23 -0000 1.4 +++ openacs-4/packages/wp-slim/www/attach-detail.tcl 28 Aug 2003 09:42:00 -0000 1.5 @@ -30,6 +30,11 @@ and item_id = :slide_item_id }] +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + + set context [list [list "edit-slide?[export_url_vars slide_item_id pres_item_id]" "Edit Slide"] "Details"] db_multirow revisions revisions_get { Index: openacs-4/packages/wp-slim/www/attach-list.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/attach-list.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/attach-list.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -4,7 +4,7 @@ Index: openacs-4/packages/wp-slim/www/attach-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach-list.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/attach-list.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/attach-list.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -10,13 +10,18 @@ @cvs-id $Id$ } { slide_item_id:naturalnum,notnull + pres_item_id:naturalnum,notnull } -properties { slide_item_id context att:multirow } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set pres_item_id [db_string pres_item_id_get { select parent_id from cr_items Index: openacs-4/packages/wp-slim/www/attach.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/attach.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/wp-slim/www/attach.tcl 17 May 2003 12:50:50 -0000 1.7 +++ openacs-4/packages/wp-slim/www/attach.tcl 28 Aug 2003 09:42:00 -0000 1.8 @@ -70,5 +70,4 @@ ad_script_abort } - ad_returnredirect edit-slide?[export_url_vars slide_item_id pres_item_id] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/create-presentation-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/create-presentation.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/create-presentation.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/create-presentation.adp 22 May 2003 15:18:55 -0000 1.5 +++ openacs-4/packages/wp-slim/www/create-presentation.adp 28 Aug 2003 09:42:00 -0000 1.6 @@ -16,7 +16,7 @@
    Title:
    @@ -25,7 +25,7 @@
    Page Signature:
    @@ -37,7 +37,7 @@
    Copyright Notice:
    @@ -81,10 +81,7 @@
    Style: + @available_styles@
    Title: +
    @@ -30,7 +30,7 @@
    Page Signature:
    @@ -42,7 +42,7 @@
    Copyright Notice:
    @@ -105,12 +105,7 @@
    Style: - @available_styles@
    Index: openacs-4/packages/wp-slim/www/edit-presentation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/edit-presentation.tcl 17 May 2003 12:50:50 -0000 1.5 +++ openacs-4/packages/wp-slim/www/edit-presentation.tcl 28 Aug 2003 09:42:00 -0000 1.6 @@ -19,15 +19,15 @@ } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set header [ad_header "Edit Presentation"] -db_1row get_presentation_data { - select p.pres_title, p.page_signature, p.copyright_notice, p.public_p, p.show_modified_p - from cr_wp_presentations p, cr_items i - where i.item_id = :pres_item_id - and i.live_revision = p.presentation_id -} +db_1row get_presentation_data { *SQL* } + db_1row get_aud_data { select name as audience from cr_revisions, cr_items @@ -53,4 +53,20 @@ set audience [ad_quotehtml $audience] set background [ad_quotehtml $background] +set items [db_list_of_lists wp_styles { *SQL* }] + + set names [list] + set values [list] + foreach image $items { + lappend names [lindex $image 1] + lappend values [lindex $image 0] + } + + lappend names "none" + lappend values -1 + + set available_styles "\n" + + ad_return_template Index: openacs-4/packages/wp-slim/www/edit-presentation.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-presentation.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/edit-presentation.xql 15 Nov 2001 01:47:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/edit-presentation.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -35,5 +35,16 @@ + + + + select style_id, (case when owner = :user_id then name || ' (yours)' else name end) as name + from wp_styles + where owner = :user_id + or public_p = 't' + order by name + + + Index: openacs-4/packages/wp-slim/www/edit-slide-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-slide-2.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/edit-slide-2.tcl 17 May 2003 12:50:50 -0000 1.5 +++ openacs-4/packages/wp-slim/www/edit-slide-2.tcl 28 Aug 2003 09:42:00 -0000 1.6 @@ -24,12 +24,15 @@ } +#added permission checking roc@ set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set creation_ip [ad_conn peeraddr] # construct the list of bullet_items set bullet_items [list] -for {set index 1} {$index < [expr $bullet_num + 1]} {incr index} { +for {set index 1} {$index <= [expr $bullet_num + 1]} {incr index} { if {![empty_string_p $bullet($index)]} { lappend bullet_items $bullet($index) } Index: openacs-4/packages/wp-slim/www/edit-slide.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-slide.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/edit-slide.adp 22 May 2003 15:18:55 -0000 1.5 +++ openacs-4/packages/wp-slim/www/edit-slide.adp 28 Aug 2003 09:42:00 -0000 1.6 @@ -71,5 +71,3 @@ - - Index: openacs-4/packages/wp-slim/www/edit-slide.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/Attic/edit-slide.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/edit-slide.tcl 17 May 2003 12:50:50 -0000 1.5 +++ openacs-4/packages/wp-slim/www/edit-slide.tcl 28 Aug 2003 09:42:00 -0000 1.6 @@ -21,8 +21,12 @@ } -set context [list "Edit Slide"] +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation +set context [list "presentation-top?[export_url_vars pres_item_id] {presentation}" {Edit Slide}] + db_1row get_slide_info { select s.slide_title, s.sort_key, @@ -63,6 +67,8 @@ set bullet_num 0 multirow create bullets item widget rows prev +# up to 3 bullets now! roc@ +lappend bullet_items {} {} foreach item $bullet_items { if {[string length $item] < 60} { set rows 1 @@ -74,7 +80,7 @@ multirow append bullets $item $widget $rows $bullet_num incr bullet_num } -incr bullet_num +incr bullet_num set bullet_max [expr $bullet_num + 1] # quote html tags contained in bullet items Index: openacs-4/packages/wp-slim/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index-oracle.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/index-oracle.xql 13 Mar 2002 22:50:53 -0000 1.2 +++ openacs-4/packages/wp-slim/www/index-oracle.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -3,6 +3,14 @@ oracle8.1.6 + + + + and ao.create_date >= (sysdate - $show_age) + + + + @@ -17,6 +25,7 @@ and ao.creation_user = p.person_id and pres.public_p = 't' and ao.context_id = :package_id + $extra_where_clauses @@ -33,6 +42,7 @@ and ao.object_id = i.item_id and ao.creation_user = :user_id and ao.context_id = :package_id + $extra_where_clauses @@ -52,8 +62,14 @@ and ao.object_id = i.item_id and ao.creation_user <> :user_id and ao.creation_user = p.person_id - and acs_permission.permission_p(i.item_id, :user_id, 'wp_view_presentation') = 't' and ao.context_id = :package_id + $extra_where_clauses + and exists (select 1 + from acs_object_party_privilege_map m + where m.object_id = i.item_id + and m.party_id = :user_id + and m.privilege = 'wp_view_presentation') + $extra_where_clauses Index: openacs-4/packages/wp-slim/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/index-postgresql.xql 13 Mar 2002 22:50:53 -0000 1.2 +++ openacs-4/packages/wp-slim/www/index-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -3,6 +3,14 @@ postgresql7.1 + + + + and ao.creation_date >= (current_timestamp - cast('$show_age days' as interval)) + + + + @@ -17,6 +25,7 @@ and ao.creation_user = p.person_id and pres.public_p = 't' and ao.context_id = :package_id + $extra_where_clauses @@ -33,6 +42,7 @@ and ao.object_id = i.item_id and ao.creation_user = :user_id and ao.context_id = :package_id + $extra_where_clauses @@ -41,22 +51,25 @@ - select i.item_id as pres_item_id, - pres.pres_title, - to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, - ao.creation_user, - p.first_names || ' ' || p.last_name as full_name, + select i.item_id as pres_item_id, + pres.pres_title, + to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, + ao.creation_user, + p.first_names || ' ' || p.last_name as full_name, acs_permission__permission_p(i.item_id, :user_id, 'wp_edit_presentation') as edit_p - from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao - where i.live_revision = pres.presentation_id - and ao.object_id = i.item_id - and ao.creation_user <> :user_id - and ao.creation_user = p.person_id - and acs_permission__permission_p(i.item_id, :user_id, 'wp_view_presentation') = 't' - and ao.context_id = :package_id - + from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao + where i.live_revision = pres.presentation_id + and ao.object_id = i.item_id + and ao.creation_user <> :user_id + and ao.creation_user = p.person_id + and ao.context_id = :package_id + $extra_where_clauses + and exists (select 1 + from acs_object_party_privilege_map m + where m.object_id = i.item_id + and m.party_id = :user_id + and m.privilege = 'wp_view_presentation') - Index: openacs-4/packages/wp-slim/www/index-unregistered.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index-unregistered.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/index-unregistered.adp 6 Sep 2002 21:51:10 -0000 1.3 +++ openacs-4/packages/wp-slim/www/index-unregistered.adp 28 Aug 2003 09:42:00 -0000 1.4 @@ -2,6 +2,49 @@ WimpyPoint + + + + +
    +[ + +Last Week + + +Last Week + +| + +Last Two Weeks + + +Last Two Weeks + +| + +Last Month + + +Last Month + +| + +All + + +All + +] + +

    Options

    + +
    +
    +

    Everyone's Presentations

      @@ -10,8 +53,3 @@
    -

    Options

    - \ No newline at end of file Index: openacs-4/packages/wp-slim/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/index.adp 22 May 2003 15:18:55 -0000 1.5 +++ openacs-4/packages/wp-slim/www/index.adp 28 Aug 2003 09:42:00 -0000 1.6 @@ -2,29 +2,84 @@ WimpyPoint @context;noquote@ + + + + + + +
    +[ + +Last Week + + +Last Week + +| + +Last Two Weeks + + +Last Two Weeks + +| + +Last Month + + +Last Month + +| + +All + + +All + +] + +[ + +Yours +| +Everyone's + + +Yours +| +Everyone's + +] +
    +

    My Presentations

    +

    Options

    + + + +

    Everyone's Presentations

    +
    - -

    Options

    - \ No newline at end of file Index: openacs-4/packages/wp-slim/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/index.tcl 6 Sep 2002 15:32:23 -0000 1.4 +++ openacs-4/packages/wp-slim/www/index.tcl 28 Aug 2003 09:42:00 -0000 1.5 @@ -5,10 +5,13 @@ and give you some options...like creating a new presentation or editing an old one. - @author Paul Konigsberg (paul@arsdigita.com) + @author Rocael Hernandez (roc@viaro.net) openacs package owner + @author Paul Konigsberg (paul@arsdigita.com, original) @creation-date Wed Nov 8 17:33:21 2000 - @cvs-id $Id$ + @cvs-id index.tcl,v 1.4.2.1 2003/05/21 15:31:03 rocaelh Exp } { + {show_age:integer "14"} + {show_user "yours"} } set package_id [ad_conn package_id] @@ -17,47 +20,25 @@ set user_id [ad_verify_and_get_user_id] +set show_user_value "show_user=$show_user" +set show_age_value "show_age=$show_age" + +if {$show_age != 0} { + set extra_where_clauses [db_map extra_where_clauses] +} else { + set extra_where_clauses "" +} + if {$user_id == 0} { - db_multirow allpresentations get_all_public_presentations { - select i.item_id as pres_item_id, - pres.pres_title, - to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, - ao.creation_user, - p.first_names || ' ' || p.last_name as full_name - from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao - where i.live_revision = pres.presentation_id - and ao.object_id = i.item_id - and ao.creation_user = p.person_id - and pres.public_p = 't' - } + db_multirow allpresentations get_all_public_presentations { *SQL* } set return_url [ns_urlencode [ad_conn url]] ad_return_template index-unregistered } else { - db_multirow presentations get_my_presentations { - select i.item_id as pres_item_id, - p.pres_title, - to_char(ao.creation_date, 'Month DD, YYYY') as creation_date - from cr_items i, cr_wp_presentations p, acs_objects ao - where i.live_revision = p.presentation_id - and ao.object_id = i.item_id - and ao.creation_user = :user_id - } + db_multirow presentations get_my_presentations { *SQL* } - db_multirow allpresentations get_all_visible_presentations { - select i.item_id as pres_item_id, - pres.pres_title, - to_char(ao.creation_date, 'Month DD, YYYY') as creation_date, - ao.creation_user, - p.first_names || ' ' || p.last_name as full_name, - acs_permission.permission_p(i.item_id, :user_id, 'wp_edit_presentation') as edit_p - from cr_items i, cr_wp_presentations pres, persons p, acs_objects ao - where i.live_revision = pres.presentation_id - and ao.object_id = i.item_id - and ao.creation_user <> :user_id - and ao.creation_user = p.person_id - and acs_permission.permission_p(i.item_id, :user_id, -'wp_view_presentation') = 'f' + if {$show_user == "all"} { + db_multirow allpresentations get_all_visible_presentations { *SQL* } } ad_return_template index Index: openacs-4/packages/wp-slim/www/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/index.vuh,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/index.vuh 31 Oct 2001 20:42:07 -0000 1.2 +++ openacs-4/packages/wp-slim/www/index.vuh 28 Aug 2003 09:42:00 -0000 1.3 @@ -51,6 +51,11 @@ global ad_conn set ad_conn(file) "$file_path/get-binary-data.tcl" adp_parse_ad_conn_file +} elseif {[regexp {^styles/(default|[0-9]+)/(.*)} $url match style_id file_name]} { + # Serve a specific attachment + global ad_conn + set ad_conn(file) "$file_path/serve-style.tcl" + adp_parse_ad_conn_file } else { # Didn't understand the URL. ns_log notice "## Wimpy Point: Sorry I could not resolve the URL you requested: $url" Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-oracle.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-oracle.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -3,35 +3,12 @@ oracle8.1.6 - + - - declare - cursor v_cursor is - select member_id - from group_member_map - where group_id = :group_id; - begin - if :role = 'read' then - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - end loop; - elsif (:role = 'write') then - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_edit_presentation'); - end loop; - else - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_edit_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_admin_presentation'); - end loop; - end if; - end; - + begin + acs_permission.grant_permission(:pres_item_id, :member_id, :permission); + end; - Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-postgresql.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-acl-add-group-3-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -3,42 +3,12 @@ postgresql7.1 - + - - - select - if :role = ''read'' then - for record in select member_id - from group_member_map - where group_id = :group_id; - loop - acs_permission__grant_permission(:pres_item_id, c.member_id,''wp_view_presentation''); - end loop; - else if (:role = ''write'') then - for record in select member_id - from group_member_map - where group_id = :group_id; - loop - acs_permission__grant_permission(:pres_item_id, c.member_id, ''wp_view_presentation''); - acs_permission__grant_permission(:pres_item_id, c.member_id, -''wp_edit_presentation''); - end loop; - else - for record in select member_id - from group_member_map - where group_id = :group_id; - loop - acs_permission__grant_permission(:pres_item_id, c.member_id, -''wp_view_presentation''); - acs_permission__grant_permission(:pres_item_id, c.member_id, -''wp_edit_presentation''); - acs_permission__grant_permission(:pres_item_id, c.member_id, -''wp_admin_presentation''); - end loop; - end if; - - + begin + perform acs_permission__grant_permission(:pres_item_id, :member_id, :permission); + return 0; + end; Index: openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl 20 Apr 2001 20:51:24 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.tcl 28 Aug 2003 09:42:00 -0000 1.2 @@ -16,30 +16,15 @@ ad_require_permission $pres_item_id wp_admin_presentation # adds a group of users -db_exec_plsql group_add { - declare - cursor v_cursor is - select member_id - from group_member_map - where group_id = :group_id; - begin - if :role = 'read' then - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - end loop; - elsif (:role = 'write') then - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_edit_presentation'); - end loop; - else - for c in v_cursor loop - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_view_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_edit_presentation'); - acs_permission.grant_permission(:pres_item_id, c.member_id, 'wp_admin_presentation'); - end loop; - end if; - end; +db_foreach group_grant { *SQL } { + if {$role == "write"} { + set permission "wp_edit_presentation" + } elseif {$role == "admin"} { + set permission "wp_admin_presentation" + } else { + set permission "wp_view_presentation" + } + db_exec_plsql permission_grant { *SQL } } -ad_returnredirect presentation-acl?[export_url_vars pres_item_id] \ No newline at end of file +ad_returnredirect presentation-acl?[export_url_vars pres_item_id] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/presentation-acl-add-group-3.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/presentation-acl.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-acl.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/presentation-acl.tcl 6 Sep 2002 15:32:23 -0000 1.2 +++ openacs-4/packages/wp-slim/www/presentation-acl.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -16,20 +16,10 @@ pres_item_id } -ad_require_permission $pres_item_id wp_admin_presentation +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_admin_presentation -set user_id [ad_maybe_redirect_for_registration] -#wp_check_authorization $pres_item_id $user_id "write" -#db_1row pres_select { -#select title, -# creation_user, -# public_p, -# group_id -#from wp_presentations -#where pres_item_id = :pres_item_id -#} - db_1row get_presentaiton { select p.pres_title as title, p.public_p, @@ -90,4 +80,4 @@ db_release_unused_handles -ad_return_template \ No newline at end of file +ad_return_template Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/presentation-print-view-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/presentation-print-view-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/presentation-print-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-print-view.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/presentation-print-view.adp 22 May 2003 15:18:55 -0000 1.2 +++ openacs-4/packages/wp-slim/www/presentation-print-view.adp 28 Aug 2003 09:42:00 -0000 1.3 @@ -1,5 +1,6 @@ @pres_title;noquote@ +@context;noquote@

    @pres_title@

    a Wimpy Point Presentation owned by @owner_name@ Index: openacs-4/packages/wp-slim/www/presentation-print-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-print-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-print-view.tcl 21 Sep 2002 17:09:10 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-print-view.tcl 28 Aug 2003 09:42:00 -0000 1.2 @@ -2,7 +2,8 @@ ad_page_contract { This generates a printer friendly view of a presentation, suitable for print-out thru' a browser. @author Samir Joshi(samir@symphinity.com) - @creation-date Thu 8 Aug 2002 + @author Rocael HR (roc@viaro.net) + @creation-date Thu 1 Apr 2003 } { item_id:naturalnum,notnull @@ -18,7 +19,11 @@ owner_name:onevalue owner_id : onevalue } + +set context [list "Print View"] set user_id [ad_verify_and_get_user_id] +## permission checking roc@ +permission::require_permission -party_id $user_id -object_id $item_id -privilege wp_view_presentation set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name Index: openacs-4/packages/wp-slim/www/presentation-print-view.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-print-view.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-print-view.xql 21 Sep 2002 17:09:10 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-print-view.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -51,18 +51,4 @@
    - - - select s.slide_title as title , - i.item_id as slide_id , - s.sort_key,wp_slide__get_preamble(i.item_id) as preamble, - wp_slide__get_postamble(i.item_id) as postamble, - wp_slide__get_bullet_items(i.item_id) as bullet_list - from cr_wp_slides s, cr_items i - where i.parent_id = :pres_item_id - and i.live_revision = s.slide_id - order by s.sort_key - - -
    Index: openacs-4/packages/wp-slim/www/presentation-revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-revisions.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/presentation-revisions.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/presentation-revisions.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -14,7 +14,12 @@ } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + + db_multirow revisions revisions_get { select r.revision_id, to_char(ao.creation_date, 'HH24:MI:SS Mon DD, YYYY') as creation_date, Index: openacs-4/packages/wp-slim/www/presentation-top-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-top-oracle.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-top-oracle.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -3,14 +3,16 @@ oracle8.1.6 - + select p.public_p, p.pres_title as presentation_title, acs_permission.permission_p(:pres_item_id, :user_id, 'wp_admin_presentation') as admin_p, acs_permission.permission_p(:pres_item_id, :user_id, 'wp_delete_presentation') as delete_p, - ao.creation_user + ao.creation_user, + p.show_comments_p, + p.presentation_id from cr_wp_presentations p, cr_items i, acs_objects ao @@ -21,19 +23,23 @@ - - + + - select first_names || ' ' || last_name as full_name, - person_id, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_view_presentation') as view_p, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_edit_presentation') as edit_p, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_admin_presentation') as admin_p - from persons - where acs_permission.permission_p(:pres_item_id, person_id, 'wp_view_presentation') = 't' - or acs_permission.permission_p(:pres_item_id, person_id, 'wp_edit_presentation') = 't' - or acs_permission.permission_p(:pres_item_id, person_id, 'wp_admin_presentation') = 't' + select distinct (p.person_id), + p.first_names || ' ' || p.last_name as full_name, + perm.privilege + from persons p, + acs_permissions perm + where perm.object_id = :pres_item_id + and perm.grantee_id = p.person_id + and + (perm.privilege = 'wp_view_presentation' + or perm.privilege = 'wp_edit_presentation' + or perm.privilege = 'wp_admin_presentation' + ) + order by p.person_id, perm.privilege ASC Index: openacs-4/packages/wp-slim/www/presentation-top-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top-postgresql.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/presentation-top-postgresql.xql 17 May 2003 12:50:50 -0000 1.2 +++ openacs-4/packages/wp-slim/www/presentation-top-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -3,14 +3,16 @@ postgresql7.1 - + select p.public_p, p.pres_title as presentation_title, acs_permission__permission_p(:pres_item_id, :user_id, 'wp_admin_presentation') as admin_p, acs_permission__permission_p(:pres_item_id, :user_id, 'wp_delete_presentation') as delete_p, - ao.creation_user + ao.creation_user, + p.show_comments_p, + p.presentation_id from cr_wp_presentations p, cr_items i, acs_objects ao @@ -21,19 +23,23 @@ - - + + - select first_names || ' ' || last_name as full_name, - person_id, - acs_permission__permission_p(:pres_item_id, person_id, 'wp_view_presentation') as view_p, - acs_permission__permission_p(:pres_item_id, person_id, 'wp_edit_presentation') as edit_p, - acs_permission__permission_p(:pres_item_id, person_id, 'wp_admin_presentation') as admin_p - from persons - where acs_permission__permission_p(:pres_item_id, person_id, 'wp_view_presentation') = 't' - or acs_permission__permission_p(:pres_item_id, person_id, 'wp_edit_presentation') = 't' - or acs_permission__permission_p(:pres_item_id, person_id, 'wp_admin_presentation') = 't' + select distinct on (p.person_id) p.person_id, + p.first_names || ' ' || p.last_name as full_name, + perm.privilege + from persons p, + acs_permissions perm + where perm.object_id = :pres_item_id + and perm.grantee_id = p.person_id + and + (perm.privilege = 'wp_view_presentation' + or perm.privilege = 'wp_edit_presentation' + or perm.privilege = 'wp_admin_presentation' + ) + order by p.person_id, perm.privilege ASC Index: openacs-4/packages/wp-slim/www/presentation-top.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/presentation-top.adp 22 May 2003 15:18:55 -0000 1.5 +++ openacs-4/packages/wp-slim/www/presentation-top.adp 28 Aug 2003 09:42:00 -0000 1.6 @@ -3,7 +3,6 @@ @context;noquote@

    The Slides

    - Create the first slide. @@ -16,7 +15,7 @@
    [ edit | - delete | + delete | attach | view revisions] @@ -37,6 +36,7 @@

    Options

    Index: openacs-4/packages/wp-slim/www/presentation-top.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/presentation-top.tcl 6 Sep 2002 15:32:23 -0000 1.4 +++ openacs-4/packages/wp-slim/www/presentation-top.tcl 28 Aug 2003 09:42:00 -0000 1.5 @@ -22,22 +22,13 @@ } +#added permission checking roc@ set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation -db_1row get_presentaiton { -select p.public_p, - p.pres_title as presentation_title, - acs_permission.permission_p(:pres_item_id, :user_id, 'wp_admin_presentation') as admin_p, - acs_permission.permission_p(:pres_item_id, :user_id, 'wp_delete_presentation') as delete_p, - ao.creation_user -from cr_wp_presentations p, - cr_items i, - acs_objects ao -where i.item_id = :pres_item_id -and i.live_revision = p.presentation_id -and ao.object_id = :pres_item_id -} +db_1row get_presentation { *SQL* } + set encoded_title [ns_urlencode $presentation_title] set context [list "$presentation_title"] set subsite_name [ad_conn package_url] @@ -51,18 +42,17 @@ order by s.sort_key } -db_multirow viewers get_viewers { - select first_names || ' ' || last_name as full_name, - person_id, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_view_presentation') as view_p, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_edit_presentation') as edit_p, - acs_permission.permission_p(:pres_item_id, person_id, 'wp_admin_presentation') as admin_p - from persons - where acs_permission.permission_p(:pres_item_id, person_id, 'wp_view_presentation') = 't' - or acs_permission.permission_p(:pres_item_id, person_id, 'wp_edit_presentation') = 't' - or acs_permission.permission_p(:pres_item_id, person_id, 'wp_admin_presentation') = 't' +#lets not show duplicate users for this +#the oracle select distinct (p.person_id) doesn't work? so lets verify it in the db_multirow, in PG works fine =) roc@ +set users_list [list] +db_multirow users get_users {} { + if {[lsearch $users_list $person_id] != -1} { + continue + } + lappend users_list $person_id } + #set public_p [db_string get_permissions { #select decode(count(1),1,'The Public','') #from acs_permissions Index: openacs-4/packages/wp-slim/www/presentation-top.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/presentation-top.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/presentation-top.xql 4 Oct 2001 04:29:01 -0000 1.1 +++ openacs-4/packages/wp-slim/www/presentation-top.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -14,5 +14,5 @@ - + Index: openacs-4/packages/wp-slim/www/serve-presentation-revision-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/serve-presentation-revision-oracle.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision-oracle.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -12,7 +12,8 @@ p.public_p, p.show_modified_p, wp_presentation.get_audience_revision(:pres_revision_id) as audience, - wp_presentation.get_background_revision(:pres_revision_id) as background + wp_presentation.get_background_revision(:pres_revision_id) as background, + p.style from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and p.presentation_id = :pres_revision_id Index: openacs-4/packages/wp-slim/www/serve-presentation-revision-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/serve-presentation-revision-postgresql.xql 4 Oct 2001 04:23:13 -0000 1.1 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision-postgresql.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -10,7 +10,8 @@ p.page_signature, p.copyright_notice, p.public_p, - p.show_modified_p + p.show_modified_p, + p.style from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and p.presentation_id = :pres_revision_id Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/wp-slim/www/serve-presentation-revision.adp 22 May 2003 15:18:55 -0000 1.6 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision.adp 28 Aug 2003 09:42:00 -0000 1.7 @@ -1,6 +1,9 @@ - + @pres_title;noquote@ @context;noquote@ +@style;noquote@ +@page_signature;noquote@ +@copyright_notice;noquote@

    One Revision

    @@ -30,7 +33,7 @@
    Show Modified Date? @show_modified_p@
    Audience @audience@
    -
    done | + done - next + | next

    @pres_title@

    a Wimpy Point Presentation owned by @owner_name@ + +
    in collaboration with + +@collaborators.full_name@ + + +
    +.
      @@ -22,6 +33,3 @@
    -

    Here is a printer-friendly version of the presentation. -
    -@page_signature@ Index: openacs-4/packages/wp-slim/www/serve-presentation.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/serve-presentation.tcl 21 Sep 2002 17:09:10 -0000 1.3 +++ openacs-4/packages/wp-slim/www/serve-presentation.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -24,6 +24,9 @@ ad_return_error "Wimpy Point" "Could not get a pres_item_id and slide_item_id out of url=$url" } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name @@ -37,12 +40,7 @@ and exists (select 1 from cr_wp_slides s where s.slide_id=cr_items.live_revision and s.sort_key=1) } -db_1row get_presentation_info { - select p.pres_title, p.page_signature - from cr_wp_presentations p, cr_items i - where i.item_id = :pres_item_id - and i.live_revision = p.presentation_id -} +db_1row get_presentation_info { *SQL* } db_1row get_owner_name { select first_names || ' ' || last_name as owner_name, person_id as owner_id @@ -59,4 +57,13 @@ order by s.sort_key " +set users_list [list] +db_multirow collaborators get_collaborators { *SQL* } { + if {[lsearch $users_list $person_id] != -1} { + continue + } + lappend users_list $person_id +} + + ad_return_template Index: openacs-4/packages/wp-slim/www/serve-presentation.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/serve-presentation.xql 4 Oct 2001 04:29:01 -0000 1.1 +++ openacs-4/packages/wp-slim/www/serve-presentation.xql 28 Aug 2003 09:42:00 -0000 1.2 @@ -17,7 +17,7 @@ - select p.pres_title, p.page_signature + select p.pres_title, p.page_signature, p.style, p.copyright_notice from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and i.live_revision = p.presentation_id @@ -50,5 +50,26 @@ + + + + + select p.person_id, + p.first_names || ' ' || p.last_name as full_name, + perm.privilege + from persons p, + acs_permissions perm + where perm.object_id = :pres_item_id + and perm.grantee_id <> :owner_id + and perm.grantee_id = p.person_id + and + ( perm.privilege = 'wp_edit_presentation' + or perm.privilege = 'wp_admin_presentation' + ) + order by p.person_id, perm.privilege ASC + + + + Index: openacs-4/packages/wp-slim/www/serve-slide-revision.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/serve-slide-revision.adp 22 May 2003 15:18:55 -0000 1.5 +++ openacs-4/packages/wp-slim/www/serve-slide-revision.adp 28 Aug 2003 09:42:00 -0000 1.6 @@ -1,6 +1,9 @@ - + @slide_title;noquote@ @context;noquote@ +@style;noquote@ +@page_signature;noquote@ +@copyright_notice;noquote@ Last modified @modified_date@ @@ -84,4 +87,4 @@ -@page_signature@ \ No newline at end of file +@page_signature@ Index: openacs-4/packages/wp-slim/www/serve-slide-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/serve-slide-revision.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/serve-slide-revision.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -31,6 +31,9 @@ ad_return_error "Wimpy Point" "Could not get a pres_item_id, slide_item_id and slide_revision_id out of url=$url" } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name Index: openacs-4/packages/wp-slim/www/serve-slide-revision.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide-revision.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/serve-slide-revision.xql 15 Nov 2001 01:47:13 -0000 1.2 +++ openacs-4/packages/wp-slim/www/serve-slide-revision.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -5,7 +5,9 @@ select p.page_signature, - p.show_modified_p + p.copyright_notice, + p.show_modified_p, + p.style from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and i.live_revision = p.presentation_id Index: openacs-4/packages/wp-slim/www/serve-slide.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/wp-slim/www/serve-slide.adp 22 May 2003 15:18:55 -0000 1.8 +++ openacs-4/packages/wp-slim/www/serve-slide.adp 28 Aug 2003 09:42:00 -0000 1.9 @@ -1,6 +1,9 @@ @slide_title;noquote@ @context;noquote@ +@style;noquote@ +@page_signature;noquote@ +@copyright_notice;noquote@ @@ -94,3 +97,23 @@ @page_signature@ + + + +

    Slide Comments

    +@comments@ +
    + +
    + + + + + +
      +
    • +@comment_link@ +
    +
    + +
    Index: openacs-4/packages/wp-slim/www/serve-slide.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/wp-slim/www/serve-slide.tcl 6 Sep 2002 15:32:23 -0000 1.5 +++ openacs-4/packages/wp-slim/www/serve-slide.tcl 28 Aug 2003 09:42:00 -0000 1.6 @@ -29,7 +29,19 @@ ad_return_error "Wimpy Point" "Could not get a pres_item_id and slide_item_id out of url=$url" } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_view_presentation +set edit_p 0 +if {[permission::permission_p -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation]} { + set edit_p 1 +} +set delete_p 0 +if {[permission::permission_p -party_id $user_id -object_id $pres_item_id -privilege wp_delete_presentation]} { + set delete_p 1 +} + set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name #set pkg_key [ad_conn package_key] @@ -48,13 +60,7 @@ and ao.object_id = s.slide_id } -db_1row get_presentation_page_signature { - select p.page_signature, - p.show_modified_p - from cr_wp_presentations p, cr_items i - where i.item_id = :pres_item_id - and i.live_revision = p.presentation_id -} +db_1row get_presentation_page_signature { *SQL* } set context [list [list "$subsite_name/display/$pres_item_id" "one presentation"] "one slide"] @@ -90,10 +96,8 @@ if {$sort_key == 1} { # this is the only slide. set href_back "" - set href_forward "top" - } else { - set href_forward {} } + set href_forward "top" } else { set href_forward "next" } @@ -107,5 +111,22 @@ and i.live_revision = x.attach_id } -set href_back_forward "$href_back $href_forward" +set extra "" +if {$edit_p == 1} { + append extra "edit | " +} +if {$delete_p == 1} { + append extra "delete |" +} + +set href_back_forward "$href_back $extra $href_forward" + + +#comments capability added roc@ +if {$edit_p == 1 || $show_comments_p == "t"} { + set comment_link [general_comments_create_link $slide_item_id $url] + set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 \ + $slide_item_id $url] +} + ad_return_template serve-slide Index: openacs-4/packages/wp-slim/www/serve-slide.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-slide.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/serve-slide.xql 15 Nov 2001 01:47:13 -0000 1.2 +++ openacs-4/packages/wp-slim/www/serve-slide.xql 28 Aug 2003 09:42:00 -0000 1.3 @@ -5,7 +5,10 @@ select p.page_signature, - p.show_modified_p + p.copyright_notice, + p.show_modified_p, + p.style, + p.show_comments_p from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and i.live_revision = p.presentation_id Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/serve-style.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/slide-publish.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-publish.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/slide-publish.tcl 20 Apr 2001 20:51:24 -0000 1.1 +++ openacs-4/packages/wp-slim/www/slide-publish.tcl 28 Aug 2003 09:42:00 -0000 1.2 @@ -10,8 +10,13 @@ } { revision_id:naturalnum,notnull return_url:notnull + pres_item_id:notnull } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + db_exec_plsql live_revision_set { declare v_revision_id cr_revisions.revision_id%TYPE; @@ -35,4 +40,4 @@ end; } -ad_returnredirect $return_url \ No newline at end of file +ad_returnredirect $return_url Index: openacs-4/packages/wp-slim/www/slide-revisions.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/slide-revisions.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/slide-revisions.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -14,7 +14,7 @@ Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view) -Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view | go live) +Created by @revisions.full_name@ from @revisions.creation_ip@ at @revisions.creation_date@ (view | go live) Index: openacs-4/packages/wp-slim/www/slide-revisions.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slide-revisions.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/slide-revisions.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/slide-revisions.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -16,7 +16,11 @@ subsite_name } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set subsite_name [ad_conn package_url] set context [list [list "presentation-top?[export_url_vars pres_item_id]" "Presentation"] "Slide Revisions"] Index: openacs-4/packages/wp-slim/www/slides-reorder-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder-2.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 4 Oct 2001 04:29:01 -0000 1.2 +++ openacs-4/packages/wp-slim/www/slides-reorder-2.tcl 28 Aug 2003 09:42:00 -0000 1.3 @@ -12,6 +12,10 @@ } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + # Just iterate over the values for slide_id in order and set their respective # sort_keys to 1, 2, 3, ... set counter 0 Index: openacs-4/packages/wp-slim/www/slides-reorder.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/slides-reorder.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/slides-reorder.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/slides-reorder.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -14,6 +14,10 @@ } +#added permission checking roc@ +set user_id [ad_verify_and_get_user_id] +permission::require_permission -party_id $user_id -object_id $pres_item_id -privilege wp_edit_presentation + set header [ad_header "Reorder Slides"] Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-delete.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit-2.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit-2.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-edit.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-add.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-add.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-image-delete.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list-oracle.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list-postgresql.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-list.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/style-view.xql'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/toggle-comments-view.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/toggle-comments-view.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/upload-attachments.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/upload-attachments.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/upload-attachments.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/upload-attachments.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -9,19 +9,14 @@

    - - - - - Index: openacs-4/packages/wp-slim/www/users.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/users.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/wp-slim/www/users.adp 22 May 2003 15:18:55 -0000 1.4 +++ openacs-4/packages/wp-slim/www/users.adp 28 Aug 2003 09:42:00 -0000 1.5 @@ -9,4 +9,8 @@
  • @users.first_names@ @users.last_name@, @users.email@ (@users.num_presentations@) - +

    +Note: this is not a complete list of the users. +Users who are collaborators on +presentations owned by others are excluded. Users who have created +only private presentations are excluded. Index: openacs-4/packages/wp-slim/www/users.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/users.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/users.tcl 6 Sep 2002 15:32:23 -0000 1.3 +++ openacs-4/packages/wp-slim/www/users.tcl 28 Aug 2003 09:42:00 -0000 1.4 @@ -32,11 +32,6 @@ group by p.person_id, p.first_names, p.last_name, parties.email } -set footer "Note: this is not a complete list of the users. -Users who are collaborators on -presentations owned by others are excluded. Users who have created -only private presentations are excluded. -[ad_footer]" ad_return_template Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/wp-slim/www/view-image.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/wp-slim/www/wp-presentation-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/wp-presentation-master.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/wp-slim/www/wp-presentation-master.adp 22 May 2003 15:18:55 -0000 1.3 +++ openacs-4/packages/wp-slim/www/wp-presentation-master.adp 28 Aug 2003 09:42:00 -0000 1.4 @@ -1,16 +1,20 @@ +default@style_id@/style.css" type="text/css"> @title@ @header_stuff@ - @attribute.key@="@attribute.value@"> +> +
    +@copyright_notice@ +


    -
    @signatory@
    +
    @page_signature@
    @ds_link@ Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/www/blank-master.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/www/blank-master.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/www/default-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/default-master.adp,v diff -u -r1.13 -r1.14 --- openacs-4/www/default-master.adp 26 Aug 2003 13:38:26 -0000 1.13 +++ openacs-4/www/default-master.adp 28 Aug 2003 09:49:50 -0000 1.14 @@ -1,10 +1,9 @@ -@doc_type;noquote@ - - -@title;noquote@ -@header_stuff;noquote@ - - @attribute.key@="@attribute.value@"> + + @title;noquote@ + @header_stuff;noquote@ + @focus;noquote@ + @doc_type;noquote@ + @@ -15,11 +14,8 @@ @context_bar;noquote@
    - +
    @signatory@
    -@ds_link;noquote@ - - Index: openacs-4/www/default-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/default-master.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/www/default-master.tcl 26 Aug 2003 13:39:13 -0000 1.13 +++ openacs-4/www/default-master.tcl 28 Aug 2003 09:49:50 -0000 1.14 @@ -8,16 +8,12 @@ # $Id$ # -# fall back on defaults for title, signatory and header_stuff +# fall back on defaults if { [template::util::is_nil title] } { set title [ad_conn instance_name] } -if { [template::util::is_nil doc_type] } { - set doc_type {} -} - if { [template::util::is_nil signatory] } { set signatory [ad_system_owner] } @@ -30,11 +26,7 @@ set context_bar [ad_context_bar] } -if { ![info exists header_stuff] } { - set header_stuff {} -} - # Attributes template::multirow create attribute key value @@ -54,29 +46,6 @@ [ad_parameter -package_id $pkg_id background dummy "/graphics/bg.gif"] } -if { ![template::util::is_nil focus] } { - # Handle elements wohse name contains a dot - - if { [regexp {^([^.]*)\.(.*)$} $focus match form_name element_name] } { - # Add safety code to test that the element exists - set header_stuff "$header_stuff - - " - - template::multirow append \ - attribute onload "javascript:acs_focus('${form_name}', '${element_name}')" - } -} - - # Developer-support if { [llength [namespace eval :: info procs ds_link]] == 1 } { Index: openacs-4/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/Attic/index-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/www/index-oracle.xql 15 Apr 2003 10:32:08 -0000 1.4 +++ openacs-4/www/index-oracle.xql 28 Aug 2003 09:49:50 -0000 1.5 @@ -18,7 +18,7 @@ 'read') = 't' and apm_packages.package_id = site_nodes.object_id and apm_package_types.package_key = apm_packages.package_key - order by initial_install_p, name + order by initial_install_p, upper(name), name Index: openacs-4/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/www/Attic/index-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/www/index-postgresql.xql 15 Apr 2003 10:32:08 -0000 1.4 +++ openacs-4/www/index-postgresql.xql 28 Aug 2003 09:49:50 -0000 1.5 @@ -18,7 +18,7 @@ 'read') = 't' and apm_packages.package_id = site_nodes.object_id and apm_package_types.package_key = apm_packages.package_key - order by initial_install_p, name + order by initial_install_p, upper(acs_object__name(object_id)) Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/www/lists.css'. Fisheye: No comparison available. Pass `N' to diff?
  • File Name   File Size   Display

    There are @attachment_count@ -@attachment_count@ +@attachment_count@ attachments currently associated with this slide.