Index: openacs-4/contrib/obsolete-packages/acs-content/sql/oracle/acs-content-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-content/sql/oracle/acs-content-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/acs-content/sql/oracle/acs-content-create.sql 3 Apr 2001 05:10:28 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/acs-content/sql/oracle/acs-content-create.sql 12 May 2002 20:57:01 -0000 1.2 @@ -33,7 +33,7 @@ content_id in acs_contents.content_id%TYPE , mime_type in acs_contents.mime_type%TYPE default 'text/plain', nls_language in acs_contents.nls_language%TYPE default null, - searchable_p in acs_contents.searchable_p%TYPE default 'f', + searchable_p in acs_contents.searchable_p%TYPE default 't', content in acs_contents.content%TYPE default empty_blob() ); @@ -58,12 +58,13 @@ end acs_content; / +show errors create or replace package body acs_content as procedure new ( content_id in acs_contents.content_id%TYPE, - mime_type in acs_contents.mime_type%TYPE default null, + mime_type in acs_contents.mime_type%TYPE default 'text/plain', nls_language in acs_contents.nls_language%TYPE default null, searchable_p in acs_contents.searchable_p%TYPE default 't', content in acs_contents.content%TYPE default empty_blob() @@ -132,6 +133,7 @@ end update_searchable_p; end acs_content; / +show errors @@ -144,4 +146,3 @@ - Index: openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/acs-workflow-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/acs-workflow-create.sql,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/acs-workflow-create.sql 19 Nov 2001 18:17:46 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/acs-workflow/sql/oracle/acs-workflow-create.sql 12 May 2002 20:57:02 -0000 1.3 @@ -14,7 +14,6 @@ @@ workflow-case-package @@ workflow-package @@ wf-callback-package -@@ jobs-start /* We create two sample processes */ @@ sample-expenses-create Index: openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp 29 Jun 2001 20:37:18 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/bboard/www/category-entry.adp 12 May 2002 20:57:02 -0000 1.3 @@ -1,8 +1,9 @@ @forum_name@: @title@ @context_bar@ +category.short_name -
+
Index: openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp 11 Jan 2002 20:22:50 -0000 1.3 +++ openacs-4/contrib/obsolete-packages/bboard/www/forum-entry.adp 12 May 2002 20:57:02 -0000 1.4 @@ -1,8 +1,9 @@ @context_bar@ @title@ +forum.short_name - +
Index: openacs-4/contrib/obsolete-packages/bboard/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/index.adp,v diff -u -r1.3 -r1.4 --- openacs-4/contrib/obsolete-packages/bboard/www/index.adp 11 Jan 2002 20:21:34 -0000 1.3 +++ openacs-4/contrib/obsolete-packages/bboard/www/index.adp 12 May 2002 20:57:02 -0000 1.4 @@ -5,7 +5,7 @@ [Manage Subscriptions] - There are no forums available.

+

There are no forums available.

Index: openacs-4/contrib/obsolete-packages/bboard/www/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/Attic/master.adp,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/bboard/www/master.adp 20 Apr 2001 20:51:09 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/bboard/www/master.adp 12 May 2002 20:57:02 -0000 1.2 @@ -1,9 +1,10 @@ @title@ + + @focus@ +

@title@

- - <%= [eval ad_context_bar $context_bar] %> - +<%= [eval ad_context_bar $context_bar] %>
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp 29 Jun 2001 20:37:18 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-attach.adp 12 May 2002 20:57:02 -0000 1.3 @@ -1,8 +1,9 @@ @title@ @context_bar@ +attach.file_title - + <%= [export_form_vars file_id message_id] %>
Index: openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp 29 Jun 2001 20:37:18 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-entry.adp 12 May 2002 20:57:02 -0000 1.3 @@ -1,8 +1,9 @@ @page_title@ @context_bar@ +message.title - + Index: openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp 29 Jun 2001 20:37:18 -0000 1.2 +++ openacs-4/contrib/obsolete-packages/bboard/www/message-mail.adp 12 May 2002 20:57:02 -0000 1.3 @@ -1,8 +1,9 @@ Mail to a friend @context_bar@ +mail.email - + 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.9 -r1.10 --- openacs-4/packages/acs-admin/www/apm/packages-install.tcl 29 Dec 2001 01:48:32 -0000 1.9 +++ openacs-4/packages/acs-admin/www/apm/packages-install.tcl 12 May 2002 20:57:01 -0000 1.10 @@ -30,6 +30,7 @@ # Determine which spec files are new installs; install all of the new items. set spec_files [list] +set warnings [list] foreach spec_file $all_spec_files { array set version [apm_read_package_info_file $spec_file] set version_name $version(name) @@ -39,10 +40,14 @@ if { [apm_package_registered_p $package_key] } { if { [apm_higher_version_installed_p $package_key $version_name] } { lappend spec_files $spec_file + } else { + lappend warnings "Package "$package_name" ($package_key) skipped because a later version is already installed." } } else { lappend spec_files $spec_file } + } else { + lappend warnings "Package "$package_name" ($package_key) skipped because it doesn't support [db_type]." } } @@ -51,6 +56,11 @@ ns_write "Done.

" +if { [llength $warnings] > 0 } { + ns_write "

Packages skipped

  • [join $warnings "
  • "]
" +} + + if { [empty_string_p $spec_files] } { # No spec files to work with. ns_write " Index: openacs-4/packages/acs-admin/www/users/one.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/one.xql,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/users/one.xql 21 Feb 2002 17:13:17 -0000 1.6 +++ openacs-4/packages/acs-admin/www/users/one.xql 12 May 2002 20:57:01 -0000 1.7 @@ -26,7 +26,7 @@ - select groups.group_id, groups.group_name + select distinct lower(groups.group_name) as group_name from groups, group_member_map gm where groups.group_id = gm.group_id and gm.member_id=:user_id order by lower(groups.group_name) Index: openacs-4/packages/acs-admin/www/users/user-add-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/user-add-2.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-admin/www/users/user-add-2.tcl 9 Mar 2002 02:00:02 -0000 1.3 +++ openacs-4/packages/acs-admin/www/users/user-add-2.tcl 12 May 2002 20:57:01 -0000 1.4 @@ -101,7 +101,7 @@ } -set administration_name [db_string unused "select +set administration_name [db_string admin_name "select first_names || ' ' || last_name from persons where person_id = :admin_user_id"] set context_bar [ad_admin_context_bar [list "index.tcl" "Users"] "Notify added user"] Index: openacs-4/packages/acs-admin/www/users/user-add-2.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/users/Attic/user-add-2.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-admin/www/users/user-add-2.xql 9 Mar 2002 02:00:02 -0000 1.4 +++ openacs-4/packages/acs-admin/www/users/user-add-2.xql 12 May 2002 20:57:01 -0000 1.5 @@ -1,13 +1,12 @@ - - - select count(email) -from parties where email = lower(:email) -and party_id <> :user_id - + + + select first_names || ' ' || last_name + from persons + where person_id = :admin_user_id + - Index: openacs-4/packages/acs-api-browser/acs-api-browser.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/acs-api-browser.info,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-api-browser/acs-api-browser.info 9 May 2001 22:32:25 -0000 1.3 +++ openacs-4/packages/acs-api-browser/acs-api-browser.info 12 May 2002 20:57:01 -0000 1.4 @@ -47,6 +47,8 @@ + + Index: openacs-4/packages/acs-api-browser/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/index.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-api-browser/www/index.adp 29 Aug 2001 21:22:48 -0000 1.2 +++ openacs-4/packages/acs-api-browser/www/index.adp 12 May 2002 20:57:01 -0000 1.3 @@ -42,9 +42,20 @@ AOLserver API Search:

- (enter exact procedure name) + (enter exact procedure name)
+ Browse AOLserver Tcl API +

+ +
+ Tcl Documentation Search:
+ +
+ (enter exact procedure name)
+ Browse the Tcl documentation + + Index: openacs-4/packages/acs-api-browser/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-api-browser/www/index.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-api-browser/www/index.tcl 12 May 2002 20:57:01 -0000 1.2 @@ -17,6 +17,10 @@ set title "API Browser" set context_bar [ad_context_bar] +set aolserver_tcl_api_root "http://www.aolserver.com/docs/devel/tcl/api/" + +set tcl_docs_root "http://dev.scriptics.com/man/tcl[info tclversion]/TclCmd/contents.htm" + db_multirow installed_packages installed_packages_select { select version_id, pretty_name, version_name from apm_package_version_info Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-api-browser/www/tcl-doc-search.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-api-browser/www/tcl-doc-search.tcl'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-api-browser/www/tcl-proc-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/tcl-proc-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-api-browser/www/tcl-proc-view.adp 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-api-browser/www/tcl-proc-view.adp 12 May 2002 20:57:01 -0000 1.2 @@ -7,8 +7,14 @@


-Sorry, no Tcl API procedures were found with that name.

+Sorry, no Tcl API procedures were found with that name. +

+ +You can try searching the AOLserver documentation yourself. + +

+

Index: openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-api-browser/www/tcl-proc-view.tcl 12 May 2002 20:57:01 -0000 1.2 @@ -9,189 +9,24 @@ tcl_proc:onevalue } -############################################### -# This is a big hack. -# It will work for now, I'll fix it on Monday -# (If the online AOL docs change this page won't work) -# If we want to download copy of docs something like this might be ok -# Of course not in this form -# Otherwize, should query page with index and search for tcl_proc in it -# with a regexp. -# -# -# Also note docs not formed well: -# ns_returnredirect can't be found, -# it is under ns_return -# the same way ns_db insert is under ns_db -# -############################################### -# START Perl Script Output: -### -set tcl_api_page(env) tapi-ch3.htm#155774 -set tcl_api_page(ns_adp_abort) tapi-ch4.htm#145894 -set tcl_api_page(ns_adp_argc) tapi-ch5.htm#205037 -set tcl_api_page(ns_adp_argv) tapi-ch6.htm#205045 -set tcl_api_page(ns_adp_bind_args) tapi-ch7.htm#205053 -set tcl_api_page(ns_adp_break) tapi-ch8.htm#200736 -set tcl_api_page(ns_adp_debug) tapi-ch9.htm#222048 -set tcl_api_page(ns_adp_dir) tapi-c10.htm#146426 -set tcl_api_page(ns_adp_dump) tapi-c11.htm#222437 -set tcl_api_page(ns_adp_eval) tapi-c12.htm#222438 -set tcl_api_page(ns_adp_exception) tapi-c13.htm#222439 -set tcl_api_page(ns_adp_include) tapi-c14.htm#146692 -set tcl_api_page(ns_adp_parse) tapi-c15.htm#145624 -set tcl_api_page(ns_adp_puts) tapi-c16.htm#222875 -set tcl_api_page(ns_adp_registertag) tapi-c17.htm#221672 -set tcl_api_page(ns_adp_return) tapi-c18.htm#296668 -set tcl_api_page(ns_adp_stream) tapi-c19.htm#223254 -set tcl_api_page(ns_adp_tell) tapi-c20.htm#287015 -set tcl_api_page(ns_adp_trunc) tapi-c21.htm#287024 -set tcl_api_page(ns_atclose) tapi-c22.htm#179148 -set tcl_api_page(ns_atexit) tapi-c23.htm#225714 -set tcl_api_page(ns_atshutdown) tapi-c24.htm#75924 -set tcl_api_page(ns_atsignal) tapi-c25.htm#87327 -set tcl_api_page(ns_cache_flush) tapi-c26.htm#236562 -set tcl_api_page(ns_cache_names) tapi-c27.htm#236563 -set tcl_api_page(ns_cache_size) tapi-c28.htm#236564 -set tcl_api_page(ns_cache_stats) tapi-c29.htm#236565 -set tcl_api_page(ns_checkurl) tapi-c30.htm#226180 -set tcl_api_page(ns_chmod) tapi-c31.htm#207399 -set tcl_api_page(ns_cond) tapi-c32.htm#226592 -set tcl_api_page(ns_config) tapi-c33.htm#3184 -set tcl_api_page(ns_configsection) tapi-c34.htm#227106 -set tcl_api_page(ns_configsections) tapi-c35.htm#227107 -set tcl_api_page(ns_conn) tapi-c36.htm#3206 -set tcl_api_page(ns_conncptofp) tapi-c37.htm#228287 -set tcl_api_page(ns_connsendfp) tapi-c38.htm#227925 -set tcl_api_page(ns_cp) tapi-c39.htm#58696 -set tcl_api_page(ns_cpfp) tapi-c40.htm#80619 -set tcl_api_page(ns_cport) tapi-c41.htm#228736 -set tcl_api_page(ns_critsec) tapi-c42.htm#80760 -set tcl_api_page(ns_crypt) tapi-c43.htm#3386 -set tcl_api_page(ns_db) tapi-c44.htm#67537 -set tcl_api_page(ns_dbconfigpath) tapi-c45.htm#67905 -set tcl_api_page(ns_dberror) tapi-c46.htm#67914 -set tcl_api_page(ns_dbformvalue) tapi-c47.htm#77098 -set tcl_api_page(ns_dbformvalueput) tapi-c48.htm#77112 -set tcl_api_page(ns_dbquotename) tapi-c49.htm#77217 -set tcl_api_page(ns_dbquotevalue) tapi-c50.htm#77226 -set tcl_api_page(ns_deleterow) tapi-c51.htm#77349 -set tcl_api_page(ns_eval) tapi-c52.htm#26310 -set tcl_api_page(ns_event) tapi-c53.htm#80907 -set tcl_api_page(ns_ext) tapi-c54.htm#82709 -set tcl_api_page(ns_findrowbyid) tapi-c55.htm#77814 -set tcl_api_page(ns_fmttime) tapi-c56.htm#179545 -set tcl_api_page(ns_ftruncate) tapi-c57.htm#174989 -set tcl_api_page(ns_getcsv) tapi-c58.htm#199439 -set tcl_api_page(ns_getform) tapi-c59.htm#190694 -set tcl_api_page(ns_get_multipart_formdata) tapi-c60.htm#148702 -set tcl_api_page(ns_geturl) tapi-c61.htm#31659 -set tcl_api_page(ns_gifsize) tapi-c62.htm#190984 -set tcl_api_page(ns_gmtime) tapi-c63.htm#302169 -set tcl_api_page(ns_guesstype) tapi-c64.htm#3596 -set tcl_api_page(ns_hostbyaddr) tapi-c65.htm#81032 -set tcl_api_page(ns_hrefs) tapi-c66.htm#3758 -set tcl_api_page(ns_httpget) tapi-c67.htm#68227 -set tcl_api_page(ns_httpopen) tapi-c68.htm#107131 -set tcl_api_page(ns_httptime) tapi-c69.htm#147715 -set tcl_api_page(ns_info) tapi-c70.htm#31528 -set tcl_api_page(ns_insertrow) tapi-c71.htm#167015 -set tcl_api_page(ns_jpegsize) tapi-c72.htm#216570 -set tcl_api_page(ns_kill) tapi-c73.htm#229131 -set tcl_api_page(ns_library) tapi-c74.htm#81247 -set tcl_api_page(ns_link) tapi-c75.htm#175248 -set tcl_api_page(ns_localsqltimestamp) tapi-c76.htm#77999 -set tcl_api_page(ns_localtime) tapi-c77.htm#3844 -set tcl_api_page(ns_log) tapi-c78.htm#32344 -set tcl_api_page(ns_logroll) tapi-c79.htm#229429 -set tcl_api_page(ns_markfordelete) tapi-c80.htm#229698 -set tcl_api_page(ns_menu) tapi-c81.htm#300772 -set tcl_api_page(ns_mkdir) tapi-c82.htm#59915 -set tcl_api_page(ns_mktemp) tapi-c83.htm#81346 -set tcl_api_page(ns_modlog) tapi-c84.htm#229969 -set tcl_api_page(ns_modlogcontrol) tapi-c85.htm#229970 -set tcl_api_page(ns_modulepath) tapi-c86.htm#230273 -set tcl_api_page(ns_mutex) tapi-c87.htm#81432 -set tcl_api_page(ns_normalizepath) tapi-c88.htm#65259 -set tcl_api_page(ns_param) tapi-c89.htm#227552 -set tcl_api_page(ns_parseheader) tapi-c90.htm#230562 -set tcl_api_page(ns_parsehttptime) tapi-c91.htm#163542 -set tcl_api_page(ns_parsequery) tapi-c92.htm#230777 -set tcl_api_page(ns_passwordcheck) tapi-c93.htm#297155 -set tcl_api_page(ns_perm) tapi-c94.htm#79412 -set tcl_api_page(ns_permpasswd) tapi-c95.htm#296291 -set tcl_api_page(ns_pooldescription) tapi-c96.htm#147140 -set tcl_api_page(ns_queryexists) tapi-c97.htm#191284 -set tcl_api_page(ns_queryget) tapi-c98.htm#191488 -set tcl_api_page(ns_querygetall) tapi-c99.htm#235507 -set tcl_api_page(ns_quotehtml) tapi-100.htm#3909 -set tcl_api_page(ns_rand) tapi-101.htm#235740 -set tcl_api_page(ns_register_adptag) tapi-102.htm#173981 -set tcl_api_page(ns_register_filter) tapi-103.htm#148224 -set tcl_api_page(ns_register_proc) tapi-104.htm#3937 -set tcl_api_page(ns_register_trace) tapi-105.htm#81668 -set tcl_api_page(ns_rename) tapi-106.htm#206851 -set tcl_api_page(ns_requestauthorize) tapi-107.htm#86251 -set tcl_api_page(ns_respond) tapi-108.htm#162338 -set tcl_api_page(ns_return) tapi-109.htm#3987 -set tcl_api_page(ns_rmdir) tapi-110.htm#61094 -set tcl_api_page(ns_rollfile) tapi-111.htm#235966 -set tcl_api_page(ns_rwlock) tapi-112.htm#200308 -set tcl_api_page(ns_schedule_daily) tapi-113.htm#81743 -set tcl_api_page(ns_schedule_proc) tapi-114.htm#81770 -set tcl_api_page(ns_schedule_weekly) tapi-115.htm#81782 -set tcl_api_page(ns_section) tapi-116.htm#227793 -set tcl_api_page(ns_sema) tapi-117.htm#81850 -set tcl_api_page(ns_sendmail) tapi-118.htm#48166 -set tcl_api_page(ns_server) tapi-119.htm#193657 -set tcl_api_page(ns_set) tapi-120.htm#197598 -set tcl_api_page(ns_setexpires) tapi-121.htm#147921 -set tcl_api_page(ns_set_precision) tapi-122.htm#198594 -set tcl_api_page(ns_share) tapi-123.htm#147998 -set tcl_api_page(ns_shutdown) tapi-124.htm#147915 -set tcl_api_page(ns_sleep) tapi-125.htm#32708 -set tcl_api_page(ns_sockaccept) tapi-126.htm#82156 -set tcl_api_page(ns_sockblocking) tapi-127.htm#232740 -set tcl_api_page(ns_sockcallback) tapi-128.htm#82176 -set tcl_api_page(ns_sockcheck) tapi-129.htm#82223 -set tcl_api_page(ns_socketpair) tapi-130.htm#175441 -set tcl_api_page(ns_socklisten) tapi-131.htm#233605 -set tcl_api_page(ns_socklistencallback) tapi-132.htm#232820 -set tcl_api_page(ns_socknonblocking) tapi-133.htm#232894 -set tcl_api_page(ns_socknread) tapi-134.htm#232969 -set tcl_api_page(ns_sockopen) tapi-135.htm#82248 -set tcl_api_page(ns_sockselect) tapi-136.htm#82277 -set tcl_api_page(ns_striphtml) tapi-137.htm#32426 -set tcl_api_page(ns_symlink) tapi-138.htm#175518 -set tcl_api_page(ns_thread) tapi-139.htm#82563 -set tcl_api_page(ns_time) tapi-140.htm#148150 -set tcl_api_page(ns_tmpnam) tapi-141.htm#63417 -set tcl_api_page(ns_truncate) tapi-142.htm#175579 -set tcl_api_page(ns_unlink) tapi-143.htm#62276 -set tcl_api_page(ns_unregister_proc) tapi-144.htm#64118 -set tcl_api_page(ns_unschedule_proc) tapi-145.htm#82663 -set tcl_api_page(ns_url2file) tapi-146.htm#4268 -set tcl_api_page(ns_urldecode) tapi-147.htm#32587 -set tcl_api_page(ns_urlencode) tapi-148.htm#32604 -set tcl_api_page(ns_uudecode) tapi-149.htm#225620 -set tcl_api_page(ns_uuencode) tapi-150.htm#225621 -set tcl_api_page(ns_write) tapi-151.htm#32524 -set tcl_api_page(ns_writecontent) tapi-152.htm#33391 -set tcl_api_page(ns_writefp) tapi-153.htm#198728 +set tcl_api_root "http://www.aolserver.com/docs/devel/tcl/api/" -## -# END Perl Script Output -######################### +set tcl_api_index_page [util_memoize "ns_httpget $tcl_api_root"] -set tcl_api_root "http://www.aolserver.com/docs/tcldev/" +set tcl_proc [lindex $tcl_proc 0] -set tcl_proc [lindex $tcl_proc 0] +set len [string length $tcl_proc] -if [info exists tcl_api_page($tcl_proc)] { - ad_returnredirect "$tcl_api_root$tcl_api_page($tcl_proc)" - return -} else { - set title "Tcl API Procedure Search for: \"$tcl_proc\"" - set context_bar [ad_context_bar "TCL API Search: $tcl_proc"] +for { set i [expr { $len-1 }] } { $i >= 0 } { incr i -1 } { + set search_for [string range $tcl_proc 0 $i] + if { [regexp "\]+#\[^>\]+)>$search_for" $tcl_api_index_page match relative_url] } { + ad_returnredirect "$tcl_api_root$relative_url" + return + } } +set title "Tcl API Procedure Search for: \"$tcl_proc\"" +set context_bar [ad_context_bar "TCL API Search: $tcl_proc"] + +ad_return_template + Index: openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 4 Apr 2002 03:00:11 -0000 1.8 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-item.sql 12 May 2002 20:57:01 -0000 1.9 @@ -641,7 +641,7 @@ function get_id ( item_path in varchar2, - root_folder_id in cr_items.item_id%TYPE default null, + root_folder_id in cr_items.item_id%TYPE default c_root_folder_id, resolve_index in char default 'f' ) return cr_items.item_id%TYPE is Index: openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 15 Nov 2001 01:47:13 -0000 1.4 +++ openacs-4/packages/acs-content-repository/sql/oracle/content-revision.sql 12 May 2002 20:57:02 -0000 1.5 @@ -63,7 +63,7 @@ publish_date in cr_revisions.publish_date%TYPE default sysdate, mime_type in cr_revisions.mime_type%TYPE default 'text/plain', nls_language in cr_revisions.nls_language%TYPE default null, - text in varchar2 default ' ', + text in varchar2 default null, item_id in cr_items.item_id%TYPE, revision_id in cr_revisions.revision_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, @@ -387,7 +387,7 @@ begin - ctx_doc.filter('cr_doc_filter_index', revision_id, tmp_clob); + ctx_doc.filter('cr_doc_filter_index', revision_id, tmp_clob, false); select content into blob_loc Index: openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 4 Apr 2002 03:00:11 -0000 1.5 +++ openacs-4/packages/acs-content-repository/sql/oracle/packages-create.sql 12 May 2002 20:57:02 -0000 1.6 @@ -27,7 +27,7 @@ default 'content_revision', pretty_name in acs_object_types.pretty_name%TYPE, pretty_plural in acs_object_types.pretty_plural%TYPE, - table_name in acs_object_types.table_name%TYPE, + table_name in acs_object_types.table_name%TYPE default null, id_column in acs_object_types.id_column%TYPE default 'XXX', name_method in acs_object_types.name_method%TYPE default null ); @@ -850,7 +850,7 @@ publish_date in cr_revisions.publish_date%TYPE default sysdate, mime_type in cr_revisions.mime_type%TYPE default 'text/plain', nls_language in cr_revisions.nls_language%TYPE default null, - text in varchar2 default '', + text in varchar2 default null, item_id in cr_items.item_id%TYPE, revision_id in cr_revisions.revision_id%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 2 Jan 2002 19:54:57 -0000 1.5 +++ openacs-4/packages/acs-content-repository/sql/postgresql/content-image.sql 12 May 2002 20:57:02 -0000 1.6 @@ -327,24 +327,11 @@ create function image__delete (integer) returns integer as ' declare - v_item_id alias $1; - v_revision_id integer; - -- order by used in cursur so latest revision will be deleted last - -- save resetting latest revision multiple times during delete process + v_item_id alias for $1; begin - for v_revision_id in select - revision_id - from - cr_revisions - where - item_id = v_item_id - order by revision_id asc - loop - PERFORM content_revision__delete ( - v_revision_id - ); - end loop; + -- This should take care of deleting revisions, too. PERFORM content_item__delete (v_item_id); - return 1; + return 0; + end; ' language 'plpgsql'; Index: openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql 1 Dec 2001 17:55:16 -0000 1.12 +++ openacs-4/packages/acs-kernel/sql/postgresql/rel-constraints-create.sql 12 May 2002 20:57:02 -0000 1.13 @@ -269,44 +269,6 @@ -- and rel_type = :rel_type -- --- create view rc_parties_in_required_segs as --- select parties_in_required_segs.group_id, --- parties_in_required_segs.rel_type, --- parties_in_required_segs.party_id --- from --- (select required_segs.group_id, --- required_segs.rel_type, --- seg_parties.party_id, --- count(*) as num_matching_segs --- from rc_required_rel_segments required_segs, --- rel_segment_party_map seg_parties --- where required_segs.required_rel_segment = seg_parties.segment_id --- group by required_segs.group_id, --- required_segs.rel_type, --- seg_parties.party_id) parties_in_required_segs, --- (select group_id, rel_type, count(*) as total --- from rc_required_rel_segments --- group by group_id, rel_type) total_num_required_segs --- where --- parties_in_required_segs.group_id = total_num_required_segs.group_id --- and parties_in_required_segs.rel_type = total_num_required_segs.rel_type --- and parties_in_required_segs.num_matching_segs = total_num_required_segs.total --- UNION ALL --- select group_rel_type_combos.group_id, --- group_rel_type_combos.rel_type, --- parties.party_id --- from rc_required_rel_segments, --- (select groups.group_id, comp_or_member_rel_types.rel_type --- from groups, --- (select object_type as rel_type from acs_object_types --- start with object_type = 'membership_rel' --- or object_type = 'composition_rel' --- -- connect by supertype = prior object_type) comp_or_member_rel_types --- ) group_rel_type_combos, --- parties --- where rc_required_rel_segments.group_id(+) = group_rel_type_combos.group_id --- and rc_required_rel_segments.rel_type(+) = group_rel_type_combos.rel_type --- and rc_required_rel_segments.group_id is null; create view comp_or_member_rel_types as select o.object_type as rel_type @@ -318,18 +280,19 @@ select groups.group_id, comp_or_member_rel_types.rel_type from groups, comp_or_member_rel_types; - -create view parties_in_required_segs as -select required_segs.group_id, - required_segs.rel_type, +create view parties_in_required_segs as +select required_segs.group_id, + required_segs.rel_type, seg_parties.party_id, + seg_parties.segment_id, count(*) as num_matching_segs from rc_required_rel_segments required_segs, rel_segment_party_map seg_parties where required_segs.required_rel_segment = seg_parties.segment_id - group by required_segs.group_id, - required_segs.rel_type, - seg_parties.party_id; + group by required_segs.group_id, + required_segs.rel_type, + seg_parties.party_id, + seg_parties.segment_id; create view total_num_required_segs as select group_id, rel_type, count(*) as total Index: openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql 31 Oct 2001 20:42:07 -0000 1.2 +++ openacs-4/packages/acs-messaging/sql/oracle/acs-messaging-packages.sql 12 May 2002 20:57:02 -0000 1.3 @@ -82,7 +82,7 @@ file_name in cr_items.name%TYPE, title in cr_revisions.title%TYPE default null, description in cr_revisions.description%TYPE default null, - mime_type in cr_revisions.mime_type%TYPE, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', content in cr_revisions.content%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, @@ -95,7 +95,7 @@ file_id in cr_items.item_id%TYPE, title in cr_revisions.title%TYPE default null, description in cr_revisions.description%TYPE default null, - mime_type in cr_revisions.mime_type%TYPE, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', content in cr_revisions.content%TYPE default null, creation_date in acs_objects.creation_date%TYPE default sysdate, creation_user in acs_objects.creation_user%TYPE default null, @@ -113,7 +113,7 @@ file_name in cr_items.name%TYPE, title in cr_revisions.title%TYPE default null, description in cr_revisions.description%TYPE default null, - mime_type in cr_revisions.mime_type%TYPE, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', content in cr_revisions.content%TYPE default null, width in images.width%TYPE default null, height in images.height%TYPE default null, @@ -128,7 +128,7 @@ image_id in cr_items.item_id%TYPE, title in cr_revisions.title%TYPE default null, description in cr_revisions.description%TYPE default null, - mime_type in cr_revisions.mime_type%TYPE, + mime_type in cr_revisions.mime_type%TYPE default 'text/plain', content in cr_revisions.content%TYPE default null, width in images.width%TYPE default null, height in images.height%TYPE default null, @@ -143,7 +143,7 @@ ); function new_extlink ( - name in cr_items.name%TYPE, + name in cr_items.name%TYPE default null, extlink_id in cr_extlinks.extlink_id%TYPE default null, url in cr_extlinks.url%TYPE, label in cr_extlinks.label%TYPE default null, @@ -179,7 +179,7 @@ function new ( message_id in acs_messages.message_id%TYPE default null, reply_to in acs_messages.reply_to%TYPE default null, - sent_date in acs_messages.sent_date%TYPE default null, + sent_date in acs_messages.sent_date%TYPE default sysdate, sender in acs_messages.sender%TYPE default null, rfc822_id in acs_messages.rfc822_id%TYPE default null, title in cr_revisions.title%TYPE default null, Index: openacs-4/packages/acs-subsite/sql/postgresql/acs-subsite-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/postgresql/acs-subsite-create.sql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/sql/postgresql/acs-subsite-create.sql 10 Oct 2001 18:06:15 -0000 1.3 +++ openacs-4/packages/acs-subsite/sql/postgresql/acs-subsite-create.sql 12 May 2002 20:57:02 -0000 1.4 @@ -10,10 +10,13 @@ \i attribute.sql \i portraits.sql \i application-groups-create.sql -\i user-profiles-create.sql \i subsite-callbacks-create.sql \i host-node-map-create.sql +-- DRB: user profiles are fundamentally broken, which is probably why they +-- weren't created in the original ACS 4.2 Oracle sources. +-- \i user-profiles-create.sql + -- This view lets us avoid using acs_object.name to get party_names. -- -- create or replace view party_names Index: openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql 3 Aug 2001 21:08:10 -0000 1.4 +++ openacs-4/packages/acs-subsite/sql/postgresql/application-groups-create.sql 12 May 2002 20:57:02 -0000 1.5 @@ -10,22 +10,6 @@ -- APPLICATION GROUPS -- ------------------------ --- begin --- acs_object_type.create_type ( --- supertype => 'group', --- object_type => 'application_group', --- pretty_name => 'Application Group', --- pretty_plural => 'Application Groups', --- table_name => 'application_groups', --- id_column => 'group_id', --- package_name => 'application_group', --- type_extension_table => 'group_types', --- name_method => 'acs_group.name' --- ); --- end; --- / --- show errors - select acs_object_type__create_type ( 'application_group', 'Application Group', @@ -52,80 +36,6 @@ unique (package_id) ); - --- create or replace package application_group --- is - --- function new ( --- group_id in application_groups.group_id%TYPE default null, --- object_type in acs_objects.object_type%TYPE --- default 'application_group', --- creation_date in acs_objects.creation_date%TYPE --- default sysdate, --- creation_user in acs_objects.creation_user%TYPE --- default null, --- creation_ip in acs_objects.creation_ip%TYPE default null, --- email in parties.email%TYPE default null, --- url in parties.url%TYPE default null, --- group_name in groups.group_name%TYPE, --- package_id in application_groups.package_id%TYPE, --- context_id in acs_objects.context_id%TYPE default null --- ) return application_groups.group_id%TYPE; - --- procedure delete ( --- group_id in application_groups.group_id%TYPE --- ); - --- function group_id_from_package_id ( --- package_id in application_groups.group_id%TYPE, --- no_complain_p in char default 'f' --- ) return char; - --- end application_group; --- / --- show errors - - --- create or replace package body application_group --- is - --- function new ( --- group_id in application_groups.group_id%TYPE default null, --- object_type in acs_objects.object_type%TYPE --- default 'application_group', --- creation_date in acs_objects.creation_date%TYPE --- default sysdate, --- creation_user in acs_objects.creation_user%TYPE --- default null, --- creation_ip in acs_objects.creation_ip%TYPE default null, --- email in parties.email%TYPE default null, --- url in parties.url%TYPE default null, --- group_name in groups.group_name%TYPE, --- package_id in application_groups.package_id%TYPE, --- context_id in acs_objects.context_id%TYPE default null --- ) --- return application_groups.group_id%TYPE --- is --- v_group_id application_groups.group_id%TYPE; --- begin --- v_group_id := acs_group.new ( --- group_id => group_id, --- object_type => object_type, --- creation_date => creation_date, --- creation_user => creation_user, --- creation_ip => creation_ip, --- email => email, --- url => url, --- group_name => group_name, --- context_id => context_id --- ); - --- insert into application_groups (group_id, package_id) --- values (v_group_id, package_id); - --- return v_group_id; --- end new; - select define_function_args('application_group__new','group_id,object_type;application_group,creation_date;now(),creation_user,creation_ip,email,url,group_name,package_id,context_id'); create function application_group__new(integer,varchar,timestamp,integer,varchar,varchar,varchar,varchar,integer,integer) @@ -163,16 +73,6 @@ end;' language 'plpgsql'; --- procedure delete ( --- group_id in application_groups.group_id%TYPE --- ) --- is --- begin - --- acs_group.delete(group_id); - --- end delete; - create function application_group__delete(integer) returns integer as ' declare @@ -183,32 +83,7 @@ return 0; end;' language 'plpgsql'; --- function group_id_from_package_id ( --- package_id in application_groups.group_id%TYPE, --- no_complain_p in char default 'f' --- ) return char --- is --- v_group_id application_groups.group_id%TYPE; --- begin --- select group_id --- into v_group_id --- from application_groups --- where package_id = group_id_from_package_id.package_id; - --- return v_group_id; - --- exception when no_data_found then - --- if no_complain_p != 't' then --- raise_application_error(-20000, 'No group_id found for package ' || --- package_id || ' (' || acs_object.name(package_id) || ').' ); --- end if; - --- return null; - --- end group_id_from_package_id; - create function application_group__group_id_from_package_id(integer,boolean) returns integer as ' declare @@ -238,10 +113,6 @@ end;' language 'plpgsql'; --- end application_group; --- / --- show errors - insert into group_type_rels (group_rel_type_id, group_type, rel_type) values @@ -256,49 +127,21 @@ -- Views -- ----------- --- create or replace view application_group_element_map as --- select g.package_id, g.group_id, --- m.element_id, m.container_id, m.rel_id, m.rel_type, m.ancestor_rel_type --- from application_groups g, --- group_element_map m --- where g.group_id = m.group_id; - create view application_group_element_map as select g.package_id, g.group_id, m.element_id, m.container_id, m.rel_id, m.rel_type, m.ancestor_rel_type from application_groups g, group_element_map m where g.group_id = m.group_id; --- create or replace view app_group_distinct_element_map as --- select distinct package_id, group_id, element_id --- from application_group_element_map; - create view app_group_distinct_element_map as select distinct package_id, group_id, element_id from application_group_element_map; --- create or replace view app_group_distinct_rel_map as --- select distinct package_id, group_id, rel_id, rel_type, ancestor_rel_type --- from application_group_element_map; - create view app_group_distinct_rel_map as select distinct package_id, group_id, rel_id, rel_type, ancestor_rel_type from application_group_element_map; --- create or replace view application_group_segments as --- select g.package_id, s.segment_id, s.group_id, s.rel_type, s.segment_name --- from application_groups g, --- group_element_map m, --- rel_segments s --- where g.group_id = m.group_id --- and m.element_id = s.group_id --- UNION ALL --- select g.package_id, s.segment_id, s.group_id, s.rel_type, s.segment_name --- from application_groups g, --- rel_segments s --- where g.group_id = s.group_id; - create view application_group_segments as select g.package_id, s.segment_id, s.group_id, s.rel_type, s.segment_name from application_groups g, Index: openacs-4/packages/acs-subsite/tcl/application-group-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/application-group-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/tcl/application-group-procs-oracle.xql 6 May 2001 21:40:21 -0000 1.1 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs-oracle.xql 12 May 2002 20:57:02 -0000 1.2 @@ -3,7 +3,7 @@ oracle8.1.6 - + select case when exists ( @@ -23,7 +23,7 @@ - + select case when exists ( @@ -43,7 +43,7 @@ - + select case when exists ( @@ -58,7 +58,7 @@ - + select case when exists ( @@ -73,7 +73,7 @@ - + begin @@ -87,25 +87,25 @@ - + select ag.group_id as parent_group_id from application_groups ag, apm_packages, (select object_id, rownum as tree_rownum from site_nodes - start with node_id = :node_id + start with node_id = :parent_node_id connect by node_id = prior parent_id) nodes where nodes.object_id = apm_packages.package_id and apm_packages.package_id = ag.package_id - and rownum=1 + and tree_rownum=1 - + begin @@ -126,7 +126,7 @@ - + begin Index: openacs-4/packages/acs-subsite/tcl/application-group-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/application-group-procs-postgresql.xql,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-subsite/tcl/application-group-procs-postgresql.xql 4 Dec 2001 00:20:47 -0000 1.3 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs-postgresql.xql 12 May 2002 20:57:02 -0000 1.4 @@ -88,16 +88,14 @@ - select ag.group_id as parent_group_id - from application_groups ag, - apm_packages, - (select s.object_id, 1 as tree_rownum - from site_nodes s, site_nodes s2 - where s2.node_id = :node_id - and s.tree_sortkey between s2.tree_sortkey and tree_right(s2.tree_sortkey)) nodes - where nodes.object_id = apm_packages.package_id - and apm_packages.package_id = ag.package_id - limit 1 + select ag.group_id as parent_group_id + from (select tree_ancestor_keys(site_node_get_tree_sortkey(:parent_node_id)) as tree_sortkey) parents, + application_groups ag, site_nodes s, apm_packages a + where s.tree_sortkey = parents.tree_sortkey + and s.object_id = a.package_id + and a.package_id = ag.package_id + order by s.tree_sortkey desc + limit 1; Index: openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.tcl 12 May 2002 20:57:02 -0000 1.2 @@ -215,20 +215,9 @@ # by default, this application group will be a subgroup # of the first parent application group based on the site map. - set node_id [ad_conn node_id] + set parent_node_id [db_string parent_node_id ""] - db_0or1row parent_group_id_query { - select ag.group_id as parent_group_id - from application_groups ag, - apm_packages, - (select object_id, rownum as tree_rownum - from site_nodes - start with node_id = :node_id - connect by node_id = prior parent_id) nodes - where nodes.object_id = apm_packages.package_id - and apm_packages.package_id = ag.package_id - and rownum=1 - } + db_0or1row parent_group_id_query "" } } Index: openacs-4/packages/acs-subsite/tcl/application-group-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/Attic/application-group-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/tcl/application-group-procs.xql 15 May 2001 16:59:00 -0000 1.2 +++ openacs-4/packages/acs-subsite/tcl/application-group-procs.xql 12 May 2002 20:57:02 -0000 1.3 @@ -1,7 +1,7 @@ - + select substr(instance_name, 1, 90) @@ -11,5 +11,16 @@ + + + + + select parent_id + from site_nodes + where object_id = :package_id + + + + Index: openacs-4/packages/acs-subsite/www/register/awaiting-approval.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/Attic/awaiting-approval.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/register/awaiting-approval.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/register/awaiting-approval.tcl 12 May 2002 20:57:02 -0000 1.2 @@ -10,7 +10,7 @@ if {![db_0or1row register_member_state_information "select member_state, email, email_verified_p, rel_id from cc_users where user_id = :user_id -and (member_state is null or member_state = 'rejected')"]} { +and (member_state is null or member_state = 'rejected' or member_state = 'needs approval')"]} { ad_return_error "Couldn't find your record" "User id $user_id is not in the awaiting approval state. This is probably our programming bug." return } Index: openacs-4/packages/acs-subsite/www/register/awaiting-approval.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/Attic/awaiting-approval.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/register/awaiting-approval.xql 1 May 2001 21:20:18 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/register/awaiting-approval.xql 12 May 2002 20:57:02 -0000 1.2 @@ -5,7 +5,7 @@ select member_state, email, email_verified_p, rel_id from cc_users where user_id = :user_id -and (member_state is null or member_state = 'rejected') +and (member_state is null or member_state = 'rejected' or member_state = 'needs approval') Index: openacs-4/packages/acs-subsite/www/register/email-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/email-confirm.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/register/email-confirm.tcl 2 Sep 2001 16:38:48 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/register/email-confirm.tcl 12 May 2002 20:57:02 -0000 1.3 @@ -44,7 +44,7 @@ set email_verified_p = 't' where user_id = :user_id" -} elseif { $member_state == "" && $email_verified_p == "f" } { +} elseif { $member_state == "needs approval" && $email_verified_p == "f" } { #state is need_email_verification_and_admin_approv db_dml register_email_confirm_update3 "update users set email_verified_p = 't' Index: openacs-4/packages/acs-subsite/www/register/user-login.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/Attic/user-login.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-subsite/www/register/user-login.tcl 13 Mar 2001 22:59:26 -0000 1.1 +++ openacs-4/packages/acs-subsite/www/register/user-login.tcl 12 May 2002 20:57:02 -0000 1.2 @@ -75,7 +75,7 @@ ad_returnredirect "awaiting-approval?user_id=$user_id" return } - "" { + "needs approval" { ad_returnredirect "awaiting-approval?user_id=$user_id" return } Index: openacs-4/packages/acs-subsite/www/register/user-new.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/register/user-new.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-subsite/www/register/user-new.adp 13 Mar 2002 22:50:53 -0000 1.2 +++ openacs-4/packages/acs-subsite/www/register/user-new.adp 12 May 2002 20:57:02 -0000 1.3 @@ -36,7 +36,15 @@ offer to email it to you. + +

Security

+ We will generate and send to you a random password when your registration + is confirmed. Once you login, you can change your password. + + +
+

About You

We know your email address already: "@email@". But we need your full Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/00-database-procs.tcl,v diff -u -r1.11 -r1.12 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 9 Mar 2002 02:00:02 -0000 1.11 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 12 May 2002 20:57:02 -0000 1.12 @@ -421,19 +421,70 @@ ad_proc -public db_multirow { -local:boolean -append:boolean + {-extend {}} var_name statement_name sql args } { - Performs the SQL query $sql, saving results in variables of the form + Performs the SQL query sql, saving results in variables + of the form var_name:1, var_name:2, etc, - and setting var_name:rowcount to the total number - of rows. Notice the nonstandard numbering (everything else in Tcl - starts at 0); the reason is that the graphics designer, a non + setting var_name:rowcount to the total number + of rows, and setting var_name:columns to a + list of column names. Each row also has a column, rownum, automatically + added and set to the row number, starting with 1. Note that this will + override any column in the SQL statement named 'rownum', also if you're + using the Oracle rownum pseudo-column. + +

+ + You may supply a code block, which will be executed for each row in + the loop. This is very useful if you need to make computations that + are better done in Tcl than in SQL, for example using ns_urlencode + or ad_quotehtml, etc. When the Tcl code is executed, all the columns + from the SQL query will be set as local variables in that code. Any + changes made to these local variables will be copied back into the + multirow. + +

+ + You may also add additional, computed columns to the multirow, using the + -extend { col_1 col_2 ... } switch. This is + useful for things like constructing a URL for the object retrieved by + the query. + +

+ + If you're constructing your multirow through multiple queries with the + same set of columns, but with different rows, you can use the + -append switch. This causes the rows returned by this query + to be appended to the rows already in the multirow, instead of starting + a clean multirow, as is the normal behavior. The columns must match the + columns in the original multirow, or an error will be thrown. + +

+ + Your code block may call continue in order to skip a row + and not include it in the multirow. Or you can call break + to skip this row and quit looping. + +

+ + Notice the nonstandard numbering (everything + else in Tcl starts at 0); the reason is that the graphics designer, a non programmer, may wish to work with row numbers. +

+ + Example: +

db_multirow -extend { user_url } users users_query {
+    select user_id first_names, last_name, email from cc_users
 } {
+    set user_url [acs_community_member_url -user_id $user_id]
+}
+ +} { # Query Dispatcher (OpenACS - ben) set full_statement_name [db_qd_get_fullname $statement_name] @@ -466,45 +517,58 @@ } upvar $level_up "$var_name:rowcount" counter + upvar $level_up "$var_name:columns" columns if { !$append_p } { set counter 0 } db_with_handle db { set selection [db_exec select $db $full_statement_name $sql] + set local_counter 0 while { [db_getrow $db $selection] } { + + if { $local_counter == 0 } { + for { set i 0 } { $i < [ns_set size $selection] } { incr i } { + lappend local_columns [ns_set key $selection $i] + } + set local_columns [concat $local_columns $extend] + if { !$append_p } { + # store the list of columns in the var_name:columns variable + set columns $local_columns + } else { + # Check that the columns match, if not throw an error + if { ![string equal [join [lsort -ascii $local_columns]] [join [lsort -ascii $columns]]] } { + error "Appending to a multirow with differing columns. +Original columns : [join [lsort -ascii $columns] ", "]. +Columns in this query: [join [lsort -ascii $local_columns] ", "]" "" "ACS_MULTIROW_APPEND_COLUMNS_MISMATCH" + } + } + } + if { [empty_string_p $code_block] } { # No code block - pull values directly into the var_name array. - upvar $level_up \ - "$var_name:[expr {$counter+1}]" array_val + upvar $level_up "$var_name:[expr {$counter+1}]" array_val for { set i 0 } { $i < [ns_set size $selection] } { incr i } { set array_val([ns_set key $selection $i]) \ [ns_set value $selection $i] } } else { - # Pull values into variables (and into the array - aks), - # evaluate the code block, and pull values back out to - # the array. - + # Pull values from the query into local variables for { set i 0 } { $i < [ns_set size $selection] } { incr i } { upvar 1 [ns_set key $selection $i] column_value set column_value [ns_set value $selection $i] } - # Pull the variables into the array. - upvar $level_up \ - "$var_name:[expr {$counter + 1}]" array_val - for { set i 0 } { $i < [ns_set size $selection] } { incr i } { - upvar 1 [ns_set key $selection $i] column_value - set array_val([ns_set key $selection $i]) $column_value - } - - regsub -all "$var_name" $code_block \ - "$var_name:[expr {$counter + 1}]" new_code_block - - set errno [catch { uplevel 1 $new_code_block } error] + # Initialize the "extend" columns to the empty string + foreach column_name $extend { + upvar 1 $column_name column_value + set column_value "" + } + + # Execute the code block + set errno [catch { uplevel 1 $code_block } error] # Handle or propagate the error. Can't use the usual # "return -code $errno..." trick due to the db_with_handle @@ -536,15 +600,15 @@ } } - # Pull the variables into the array. - upvar $level_up \ - "$var_name:[expr {$counter + 1}]" array_val - for { set i 0 } { $i < [ns_set size $selection] } { incr i } { - upvar 1 [ns_set key $selection $i] column_value - set array_val([ns_set key $selection $i]) $column_value + # Pull the local variables back out and into the array. + upvar $level_up "$var_name:[expr {$counter + 1}]" array_val + foreach column_name $columns { + upvar 1 $column_name column_value + set array_val($column_name) $column_value } } incr counter + incr local_counter set array_val(rownum) $counter } } Index: openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 7 May 2002 22:06:09 -0000 1.4 +++ openacs-4/packages/acs-tcl/tcl/apm-procs-oracle.xql 12 May 2002 20:57:02 -0000 1.5 @@ -140,9 +140,8 @@
- - + begin Index: openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 28 Nov 2001 04:59:51 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/apm-procs-postgresql.xql 12 May 2002 20:57:02 -0000 1.8 @@ -104,7 +104,7 @@ - + select apm_package__new( Index: openacs-4/packages/acs-tcl/tcl/apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-procs.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 7 May 2002 22:06:09 -0000 1.17 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 12 May 2002 20:57:02 -0000 1.18 @@ -844,11 +844,19 @@ } +<<<<<<< apm-procs.tcl ad_proc -public apm_package_instance_new { {-package_id 0} instance_name context_id package_key +======= +ad_proc -public apm_package_create_instance { + { + -package_id 0 + } + instance_name context_id package_key +>>>>>>> 1.16.2.1 } { Creates a new instance of a package. } { @@ -868,7 +876,20 @@ }] apm_parameter_sync $package_key $package_id + + return $package_id +} + +ad_proc -public apm_package_call_post_instantiation_proc { + package_id + package_key +} { + + Call the package-specific post instantiation proc, if any + +} { + # Check for a post-instantiation TCL procedure set procedure_name [apm_post_instantiation_tcl_proc_from_key $package_key] if { ![empty_string_p $procedure_name] } { @@ -879,6 +900,7 @@ } } +<<<<<<< apm-procs.tcl return $package_id } @@ -888,9 +910,31 @@ Deletes an instance of a package } { db_exec_plsql apm_package_instance_delete {} +======= } +ad_proc -public apm_package_instance_new { + { + -package_id 0 + } + instance_name context_id package_key +} { + Creates a new instance of a package and call the post instantiation proc, if any. + + DRB: I split out the subpieces into two procs because the subsite post instantiation proc + needs to be able to find the package's node in the site node map, which results in a + cart-before-the-horse scenario. The code can't update the site node map until after the + package is created yet the original code called the post instantiation proc before the + site node code could update the table. + +} { + set package_id [apm_package_create_instance -package_id $package_id $instance_name $context_id $package_key] + apm_package_call_post_instantiation_proc $package_id $package_key +>>>>>>> 1.16.2.1 +} + + ad_proc apm_parameter_sync {package_key package_id} { Syncs the parameters in the database with the memory cache. This must be called Index: openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 7 Dec 2001 21:59:51 -0000 1.3 +++ openacs-4/packages/acs-tcl/tcl/navigation-procs.tcl 12 May 2002 20:57:02 -0000 1.4 @@ -12,27 +12,6 @@ } - -# the arguments are lists ( [list URL anchor]) -# except for the last one, which we expect to be just text -#proc_doc ad_context_bar args { -# Returns a Yahoo-style hierarchical navbar, each arg should be a -# list of URL and description. The last arg should be a just plain -# description. -#} { -# set choices [list] -# set index 0 -# foreach arg $args { -# incr index -# if { $index == [llength $args] } { -# lappend choices $arg -# } else { -# lappend choices "[lindex $arg 1]" -# } -# } -# return [join $choices " : "] -#} - ad_proc ad_context_bar { args } { Returns a Yahoo-style hierarchical navbar. Includes "Your Workspace" or "Administration" @@ -42,13 +21,8 @@ set context [list] - set display_main_p 1 - if {[ad_conn user_id] != 0} { - if {[string match /pvt/home* [ad_conn url]]} { - set display_main_p 0 - } else { + if {[ad_conn user_id] != 0 && ![string match /pvt/home* [ad_conn url]]} { lappend context [list "[ad_pvt_home]" "[ad_pvt_home_name]"] - } } set node_id [ad_conn node_id] @@ -61,9 +35,7 @@ connect by prior parent_id = node_id order by level asc } { - if {$display_main_p || $url != "/"} { lappend context [list $url $object_name] - } } if { [string match admin/* [ad_conn extra_url]] } { @@ -98,13 +70,6 @@ } { set choices [list "[ad_pvt_home_link]"] -# if { [ad_conn scope on_which_table] != "." } { -# if { [llength $args] == 0 } { -# lappend choices [ad_conn scope name] -# } else { -# lappend choices "[ad_conn scope name]" -# } -# } set index 0 foreach arg $args { Index: openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 11 Feb 2002 13:51:11 -0000 1.8 +++ openacs-4/packages/acs-tcl/tcl/request-processor-procs.tcl 12 May 2002 20:57:02 -0000 1.9 @@ -385,7 +385,16 @@ # End of patch "hostname-based subsites" # ------------------------------------------------------------------------- + # DRB: a bug in ns_conn causes urlc to be set to one and urlv to be set to + # {} if you hit the site with the host name alone. This confuses code that + # expects urlc to be set to zero and the empty list. This bug is probably due + # to changes in list handling in Tcl 8x vs. Tcl 7x. + if { [ad_conn urlc] == 1 && [lindex [ad_conn urlv] 0] == "" } { + ad_conn -set urlc 0 + ad_conn -set urlv [list] + } + rp_debug -ns_log_level debug -debug t "rp_filter: setting up request: [ns_conn method] [ns_conn url] [ns_conn query]" global tcl_site_nodes Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 7 May 2002 22:06:09 -0000 1.5 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 12 May 2002 20:57:02 -0000 1.6 @@ -168,7 +168,7 @@ if {[string index $url end] != "/"} { append url "/" if {[catch {nsv_get site_nodes $url} result] == 0} { - array set node [site_node $result] + array set node $result if { [string eq $node(package_key) $package_key] } { return $node(package_id) } @@ -229,15 +229,22 @@ Creates a new instance of the specified package and flushes the in-memory site map (if sync_p is t). + DRB: I've modified this so it doesn't call the package's post instantiation proc until + after the site node map is updated. Delaying the call in this way allows the package to + find itself in the map. The code that mounts a subsite, in particular, needs to be able + to do this so it can find the nearest parent node that defines an application group (the + code in aD ACS 4.2 was flat-out broken). + @author Michael Bryzek (mbryzek@arsdigita.com) @creation-date 2001-02-05 @return The package_id of the newly mounted package - } { - # Instantiate the package - set package_id [apm_package_instance_new $instance_name $context_id $package_key] + # Create the package. + + set package_id [apm_package_create_instance $instance_name $context_id $package_key] + # Update the site map db_dml update_site_nodes { update site_nodes @@ -250,6 +257,8 @@ site_nodes_sync } + apm_package_call_post_instantiation_proc $package_id $package_key + return $package_id } @@ -276,7 +285,6 @@ apm_package_instance_delete $package_id - } } Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 Mar 2002 05:28:09 -0000 1.7 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 12 May 2002 20:57:02 -0000 1.8 @@ -2158,7 +2158,14 @@ set headers [ad_conn headers] set cookie [ns_set iget $headers Cookie] - if { [regexp "$name=(\[^;\]*)" $cookie match value] } { + if { [regexp " $name=(\[^;\]*)" " $cookie" match value] } { + + # If the cookie was set to a blank value we actually stored two quotes. We need + # to undo the kludge on the way out. + + if { $value == "\"\"" } { + set value "" + } return $value } @@ -2169,11 +2176,12 @@ { -replace f -secure f + -expire f -max_age "" -domain "" -path "/" } - name value + name {value ""} } { Sets a cookie. @@ -2182,6 +2190,10 @@ seconds (consistent with RFC 2109). max_age inf specifies cookies that never expire. The default behavior is to issue session cookies. + + @param expire specifies whether we should expire (clear) the cookie. + Setting Max-Age to zero ought to do this, but it doesn't in some browsers + (tested on IE 6). @param path specifies a subset of URLs to which this cookie applies. It must be a prefix of the URL being accessed. @@ -2191,7 +2203,7 @@ @param secure specifies to the user agent that the cookie should only be transmitted back to the server of secure transport. - + @param replace forces the current output headers to be checked for the same cookie. If the same cookie is set for a second time without the replace option being specified, the client will @@ -2223,13 +2235,19 @@ } if { $max_age == "inf" } { - # netscape seemed unhappy with huge max-age, so we use - # expires which seems to work on both netscape and IE - append cookie "; Expires=Fri, 01-Jan-2035 01:00:00 GMT" + if { ![string equal $expire "t"] } { + # netscape seemed unhappy with huge max-age, so we use + # expires which seems to work on both netscape and IE + append cookie "; Expires=Fri, 01-Jan-2035 01:00:00 GMT" + } } elseif { $max_age != "" } { append cookie "; Max-Age=$max_age" } + if { [string equal $expire "t"] } { + append cookie "; Expires=Fri, 01-Jan-1980 01:00:00 GMT" + } + if { $domain != "" } { append cookie "; Domain=$domain" } Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/coddo.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/confirm-button.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/confirm-button.tcl'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/plain.adp'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `openacs-4/packages/acs-templating/resources/forms/standard-lars.adp'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-templating/tcl/currency-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/currency-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/tcl/currency-procs.tcl 9 Feb 2002 02:33:35 -0000 1.2 +++ openacs-4/packages/acs-templating/tcl/currency-procs.tcl 12 May 2002 20:57:02 -0000 1.3 @@ -128,29 +128,87 @@ # is not completely erased set value [template::util::leadingTrim $value] + set format [lindex $currency_list 5] + switch $what { sql_number { - set value_parts [split $value "."] - set new_value [lreplace $currency_list 1 1 [lindex $value_parts 0]] - return [lreplace $new_value 3 3 [lindex $value_parts 1]] + + if { [empty_string_p $value]} { + return "" + } + + foreach {whole_part fractional_part} [split $value "."] { + # Make sure we have at least one leading digit, i.e. zero + set whole_part "[string range "0" [string length $whole_part] end]$whole_part" + + # Chop off trailing digits beyond those called for by the given format + set fractional_part "[string range $fractional_part 0 [expr {[lindex $format 3] - 1}]]" + } + set new_value [lreplace $currency_list 1 1 $whole_part] + return [lreplace $new_value 3 3 $fractional_part] } } } ad_proc -public template::util::currency::get_property { what currency_list } { - # There's no internal error checking, just like the date version ... + # There's no internal error checking, just like the date version ... and + # of course whole_part might be pounds and fractional_part pfennings ... + set leading_symbol [lindex $currency_list 0] + set whole_part [lindex $currency_list 1] + set separator [lindex $currency_list 2] + set fractional_part [lindex $currency_list 3] + set trailing_money [lindex $currency_list 4] + set format [lindex $currency_list 5] + switch $what { + leading_symbol { + return $leading_symbol + } + whole_part { + return $whole_part + } + separator { + return $separator + } + fractional_part { + return $fractional_part + } + trailing_money { + return $trailing_money + } + format { + return $format + } sql_number { - set sql_number "[lindex $currency_list 1].[lindex $currency_list 3]" - if { [string equal $sql_number "."] } { - # No value hack ... + + if { [empty_string_p $whole_part] && [empty_string_p $fractional_part] } { return "" - } else { - return $sql_number } + + # Make sure we have at least one leading digit, i.e. zero + set whole_part "[string range "0" [string length $whole_part] end]$whole_part" + + # Pad out the fractional part with enough leading zeros to satisfy the format + set fractional_part "[string range [string repeat "0" [lindex $format 3]] [string length $fractional_part] end]$fractional_part" + return ${whole_part}.${fractional_part} } + display_currency { + + if { [empty_string_p $whole_part] && [empty_string_p $fractional_part] } { + return "" + } + + # Make sure we have at least one leading digit, i.e. zero + set whole_part "[string range "0" [string length $whole_part] end]$whole_part" + + # Pad out the fractional part with enough leading zeros to satisfy the format + set fractional_part "[string range [string repeat "0" [lindex $format 3]] [string length $fractional_part] end]$fractional_part" + + # Glom everything into one pretty picture + return "$leading_symbol$whole_part$separator$fractional_part$trailing_money" + } } } Index: openacs-4/packages/acs-templating/tcl/date-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/date-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 13 Mar 2002 22:50:53 -0000 1.9 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 12 May 2002 20:57:02 -0000 1.10 @@ -224,14 +224,11 @@ set value "" set format "" set space "" + set pad "0000" foreach { index sql_form } { 0 YYYY 1 MM 2 DD 3 HH24 4 MI 5 SS } { set piece [lindex $date $index] if { ![string equal $piece {}] } { - append value $space - if { [string length $piece] == 1 } { - append value "0" - } - append value $piece + append value "$space[string range $pad [string length $piece] end]$piece" append format $space append format $sql_form set space " " @@ -244,17 +241,38 @@ # For use with karl's non-working form builder API set clipped_date [lrange $date 0 5] set ret [list] + set pad "0000" foreach fragment $clipped_date { - if { [string equal $fragment {}] } { - lappend ret "00" - } elseif {[string length $fragment] == 1} { - lappend ret "0$fragment" - } else { - lappend ret $fragment - } + lappend ret "[string range $pad [string length $fragment] end]$fragment" + set pad "00" } return $ret } + display_date { + + # Return a beautified date. It should use the widget format string but DRB + # doesn't have the time to dive into that today. The simple hack would be + # to use the database's to_char() function to do the conversion but that's + # not a terribly efficient thing to do. + + set clipped_date [lrange $date 0 2] + set date_list [list] + set pad "0000" + foreach fragment $clipped_date { + lappend date_list "[string range $pad [string length $fragment] end]$fragment" + set pad "00" + } + set value [util_AnsiDatetoPrettyDate [join $date_list "-"]] + unpack $date + if { ![string equal $hours {}] && \ + ![string equal $minutes {}] } { + append value " ${hours}:${minutes}" + if { ![string equal $seconds {}] } { + append value ":$seconds" + } + } + return $value + } clock { set value "" # Unreliable ! @@ -279,7 +297,14 @@ # Perform date comparison; same syntax as string compare ad_proc -public template::util::date::compare { date1 date2 } { - return [string compare [get_property clock $date1] [get_property clock $date2]] + for { set i 0 } { $i < 5 } { incr i } { + if { [lindex $date1 $i] < [lindex $date2 $i] } { + return -1 + } elseif { [lindex $date1 $i] > [lindex $date2 $i] } { + return 1 + } + } + return 0 } # mutate properties of the Date object Index: openacs-4/packages/acs-templating/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/element-procs.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 13 Mar 2002 22:50:53 -0000 1.3 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 12 May 2002 20:57:02 -0000 1.4 @@ -375,6 +375,26 @@ set formerror($element_id) $message } +# @public error_p + +# Return true if the named element has an error set. Helpful for client code +# that wants to avoid overwriting an initial error message. + +# @param form_id The identifier of the form containing the element. +# @param element_id The unique identifier of the element with which +# the error message should be associated in the form +# template. + +ad_proc -public template::element::error_p { form_id element_id } { + + set level [template::adp_level] + + upvar #$level $form_id:error formerror + + # set the message + return [info exists formerror($element_id)] +} + # Get all values for an element, performing any transformation defined # for the datatype. 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.6 -r1.7 --- openacs-4/packages/acs-templating/tcl/query-procs.tcl 19 Jan 2002 22:10:14 -0000 1.6 +++ openacs-4/packages/acs-templating/tcl/query-procs.tcl 12 May 2002 20:57:02 -0000 1.7 @@ -572,7 +572,7 @@ # Perform get/set operations on a multirow datasource ad_proc -public template::multirow { op name args } { - @param op Multirow datasource operation: create, extend, append, size, get, set + @param op Multirow datasource operation: create, extend, append, size, get, set, foreach @param name Name of the multirow datasource @param args optional args } { @@ -588,66 +588,128 @@ extend { upvar $name:columns columns foreach column_name $args { - lappend columns $column_name + lappend columns $column_name } } append { upvar \#[adp_level] $name:rowcount rowcount $name:columns columns incr rowcount upvar \#[adp_level] $name:$rowcount row - + for { set i 0 } { $i < [llength $columns] } { incr i } { - - set key [lindex $columns $i] - set value [lindex $args $i]; #(!) missing columns are silently empty - set row($key) $value + + set key [lindex $columns $i] + set value [lindex $args $i]; #(!) missing columns are silently empty + set row($key) $value } set row(rownum) $rowcount } size { upvar \#[adp_level] $name:rowcount rowcount if { [template::util::is_nil rowcount] } { - error "malformed multirow datasource - $name" + error "malformed multirow datasource - $name" } return $rowcount } - + get { - + set index [lindex $args 0] set column [lindex $args 1] # Set an array reference if no column is specified if { [string equal $column {}] } { uplevel "upvar \#[adp_level] $name:$index $name" } else { - # If a column is specified, just return the value for it + # If a column is specified, just return the value for it upvar \#[adp_level] $name:$index arr return $arr($column) } } - + set { - + set index [lindex $args 0] set column [lindex $args 1] set value [lindex $args 2] - + if { [string equal $column {}] } { error "No column specified to template::multirow set" } - + # Mutate the value upvar \#[adp_level] $name:$index arr set arr($column) $value return $arr($column) } + + foreach { + set code_block [lindex $args 0] + + upvar \#[adp_level] $name:rowcount rowcount + upvar \#[adp_level] $name:columns columns + + for { set i 1 } { $i <= $rowcount } { incr i } { + # Pull values into variables (and into the array - aks), + # evaluate the code block, and pull values back out to + # the array. + + upvar \#[adp_level] $name:$i row + + foreach column_name $columns { + upvar \#[adp_level] $column_name column_value + if { [info exists row($column_name)] } { + set column_value $row($column_name) + } + } + + # Also set the special var __rownum + upvar \#[adp_level] __rownum __rownum + set __rownum $row(rownum) + + set errno [catch { uplevel \#[adp_level] $code_block } error] + + switch $errno { + 0 { + # TCL_OK + } + 1 { + # TCL_ERROR + global errorInfo errorCode + error $error $errorInfo $errorCode + } + 2 { + # TCL_RETURN + error "Cannot return from inside template::multirow foreach loop" + } + 3 { + # TCL_BREAK + break + } + 4 { + # TCL_CONTINUE - just ignore and continue looping. + } + default { + error "template::multirow foreach: Unknown return code: $errno" + } + } + + # Pull the variables into the array. + foreach column_name $columns { + upvar \#[adp_level] $column_name column_value + if { [info exists column_value] } { + set row($column_name) $column_value + } + } + } + } + default { - error "Unknown op $op in template::multirow. - Must be create, append, get, set or size." + error "Unknown op $op in template::multirow. + Must be create, extend, append, get, set, size, or foreach." } } } Index: openacs-4/packages/download/www/admin/report-by-ip.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/download/www/admin/report-by-ip.adp 23 May 2001 16:35:03 -0000 1.2 +++ openacs-4/packages/download/www/admin/report-by-ip.adp 12 May 2002 20:57:02 -0000 1.3 @@ -3,8 +3,7 @@ @context_bar@

-Spam Downloaders +Spam Downloaders

- @dimensional_html@ @table@ \ No newline at end of file Index: openacs-4/packages/download/www/admin/report-by-ip.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-ip.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-by-ip.tcl 23 May 2001 16:35:03 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-by-ip.tcl 12 May 2002 20:57:02 -0000 1.4 @@ -9,13 +9,16 @@ } set repository_id [download_repository_id] - ##TODO: Add support for other + +# vinodk: put in the full query name so that when I +# pass this var to spam-users, it can find +# the right query set dimensional { {downloaded "Download Period" 1m { - {1d "last 24hrs" {where "[db_map date_clause_1]"}} - {1w "last week" {where "[db_map date_clause_7]"}} - {1m "last month" {where "[db_map date_clause_30]"}} + {1d "last 24hrs" {where "[db_map dbqd.download.www.admin.report-by-ip.date_clause_1]"}} + {1w "last week" {where "[db_map dbqd.download.www.admin.report-by-ip.date_clause_7]"}} + {1m "last month" {where "[db_map dbqd.download.www.admin.report-by-ip.date_clause_30]"}} {all "all" {}}}} } @@ -43,7 +46,7 @@ order by 2 desc " -set export_sql_query [export_vars -url -sign {sql_query}] +set export_sql_query [export_vars -url -sign {downloaded repository_id dimensional}] set dimensional_html [ad_dimensional $dimensional] set table [ad_table \ Index: openacs-4/packages/download/www/admin/report-by-user.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/download/www/admin/report-by-user.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/download/www/admin/report-by-user.tcl 23 May 2001 16:35:03 -0000 1.3 +++ openacs-4/packages/download/www/admin/report-by-user.tcl 12 May 2002 20:57:02 -0000 1.4 @@ -43,7 +43,6 @@ order by 2 desc " -#set export_sql_query [export_vars -url -sign {sql_query}] set export_sql_query [export_vars -url -sign {downloaded repository_id dimensional}] set dimensional_html [ad_dimensional $dimensional] Index: openacs-4/packages/file-storage/sql/oracle/file-storage-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/oracle/file-storage-create.sql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/file-storage/sql/oracle/file-storage-create.sql 4 Apr 2002 03:01:06 -0000 1.13 +++ openacs-4/packages/file-storage/sql/oracle/file-storage-create.sql 12 May 2002 20:57:02 -0000 1.14 @@ -57,7 +57,6 @@ id_column => 'folder_id', name_method => 'file_storage.get_title' ); - end; / show errors; Index: openacs-4/packages/file-storage/tcl/file-storage-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-init.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/file-storage/tcl/file-storage-init.tcl 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/file-storage/tcl/file-storage-init.tcl 12 May 2002 20:57:02 -0000 1.2 @@ -7,3 +7,25 @@ @cvs-id $Id$ } +# JS: proc to execute every time a new package instance is created. +# This avoids the ugly hack in the original version that checks for +# the existence of a root folder every time fs_get_root_folder is called +# (i.e., every visit to a file-storage tree!) Essentially, we let APM +# do part of what fs_get_root_folder does, once, i.e., when the package instance +# is created. We save a query (albeit an inexpensive one) since we can simplify +# fs_get_root_folder to not do the check for the root folder anymore. + +# Note that APM calls the proc with a name that uses the "package-key" +# (all "-" replaced by "_") concatenated with the string +# "post_instantiation". The parameter passed is always +# package_id. The name of the proc is thus: + +ad_proc file_storage_post_instantiation { + package_id +} { + Post package instantiation procedure to insert a package_id, + folder_id pair in fs_root_folders +} { + # We should probably just define this function here, and remove from the fs namespace + return [fs::new_root_folder -package_id $package_id] +}