• Publicity: Public Only All

utilities-procs-naviserver.tcl

Provides a variety of non-ACS-specific utilities, including the procs to support the who's online feature.

Location:
packages/acs-tcl/tcl/utilities-procs-naviserver.tcl
Created:
13 April 2000
Author:
Various <acs@arsdigita.com>
CVS Identification:
$Id: utilities-procs-naviserver.tcl,v 1.4.2.8 2022/05/23 22:01:33 gustafn Exp $

Procedures in this file

Detailed information

ad_get_cookie (public)

 ad_get_cookie [ -include_set_cookies include_set_cookies ] name \
    [ default ]

Returns the value of a cookie, or $default if none exists.

Switches:
-include_set_cookies
(defaults to "t") (optional)
Parameters:
name
default (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_cookie_consent__setup cookie_consent__setup (test cookie-consent) ad_get_cookie ad_get_cookie test_cookie_consent__setup->ad_get_cookie test_test_set_cookie_procs test_set_cookie_procs (test acs-tcl) test_test_set_cookie_procs->ad_get_cookie ad_get_signed_cookie ad_get_signed_cookie (public) ad_get_signed_cookie->ad_get_cookie ad_get_signed_cookie_with_expr ad_get_signed_cookie_with_expr (public) ad_get_signed_cookie_with_expr->ad_get_cookie cookieconsent::initialize_widget cookieconsent::initialize_widget (public) cookieconsent::initialize_widget->ad_get_cookie lang::user::site_wide_locale_not_cached lang::user::site_wide_locale_not_cached (private) lang::user::site_wide_locale_not_cached->ad_get_cookie packages/acs-subsite/lib/user-new.tcl packages/acs-subsite/ lib/user-new.tcl packages/acs-subsite/lib/user-new.tcl->ad_get_cookie

Testcases:
test_set_cookie_procs, cookie_consent__setup

ad_mutex_eval (public)

 ad_mutex_eval mutex script

Compatibility proc for handling differences between NaviServer and AOLserver since AOLserver does not support "ns_mutex eval".

Parameters:
mutex
script
Author:
Gustaf Neumann

Partial Call Graph (max 5 caller/called nodes):
%3 ad_run_scheduled_proc ad_run_scheduled_proc (private) ad_mutex_eval ad_mutex_eval ad_run_scheduled_proc->ad_mutex_eval cr_add_to_file_creation_log cr_add_to_file_creation_log (private) cr_add_to_file_creation_log->ad_mutex_eval cr_create_content_file_from_string cr_create_content_file_from_string (public) cr_create_content_file_from_string->ad_mutex_eval cr_get_file_creation_log cr_get_file_creation_log (private) cr_get_file_creation_log->ad_mutex_eval

Testcases:
No testcase defined.

ad_set_cookie (public)

 ad_set_cookie [ -replace replace ] [ -secure secure ] \
    [ -expire expire ] [ -max_age max_age ] [ -domain domain ] \
    [ -path path ] [ -discard discard ] [ -scriptable scriptable ] \
    [ -samesite samesite ] name [ value ]

Sets a cookie. Cookies are name/value pairs stored in a client's browser and are typically sent back to the server of origin with each request.

Switches:
-replace
(defaults to "f") (optional)
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 receive both copies of the cookie.
-secure
(defaults to "f") (optional)
specifies to the user agent that the cookie should only be transmitted back to the server of secure transport.
-expire
(defaults to "f") (optional)
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).
-max_age
(optional)
specifies the maximum age of the cookies in seconds (consistent with RFC 2109). max_age "inf" specifies cookies that never expire. The default behavior is to issue session cookies.
-domain
(optional)
specifies the domain(s) to which this cookie applies. See RFC2109 for the semantics of this cookie attribute.
-path
(defaults to "/") (optional)
specifies a subset of URLs to which this cookie applies. It must be a prefix of the URL being accessed.
-discard
(defaults to "f") (optional)
instructs the user agent to discard the cookie when the user agent terminates.
-scriptable
(defaults to "t") (optional)
If the scriptable option is false or not given the cookie is unavailable to JavaScript on the client. This can prevent cross site scripting attacks (XSS) on clients which support the HttpOnly option. Set -scriptable to true if you need to access the cookie via javascript. For compatibility reasons with earlier versions, OpenACS 5.8 has the default set to "true". OpenACS 5.9 will have the flag per default set to "false".
-samesite
(defaults to "none") (optional)
Parameters:
name
value (optional) - is automatically URL encoded.
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_cookie_consent__setup cookie_consent__setup (test cookie-consent) ad_set_cookie ad_set_cookie test_cookie_consent__setup->ad_set_cookie test_test_set_cookie_procs test_set_cookie_procs (test acs-tcl) test_test_set_cookie_procs->ad_set_cookie acs::icanuse acs::icanuse (public) ad_set_cookie->acs::icanuse ad_set_signed_cookie ad_set_signed_cookie (public) ad_set_signed_cookie->ad_set_cookie lang::user::set_locale lang::user::set_locale (public) lang::user::set_locale->ad_set_cookie packages/acs-subsite/lib/user-new.tcl packages/acs-subsite/ lib/user-new.tcl packages/acs-subsite/lib/user-new.tcl->ad_set_cookie

Testcases:
test_set_cookie_procs, cookie_consent__setup

ad_unset_cookie (public)

 ad_unset_cookie [ -secure secure ] [ -domain domain ] [ -path path ] \
    [ -samesite samesite ] name

Un-sets a cookie.

Switches:
-secure
(defaults to "f") (optional)
-domain
(optional)
-path
(defaults to "/") (optional)
-samesite
(defaults to "lax") (optional)
Parameters:
name
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_fs_create_folder fs_create_folder (test file-storage) ad_unset_cookie ad_unset_cookie test_fs_create_folder->ad_unset_cookie acs::icanuse acs::icanuse (public) ad_unset_cookie->acs::icanuse ad_user_login ad_user_login (public) ad_user_login->ad_unset_cookie ad_user_logout ad_user_logout (public) ad_user_logout->ad_unset_cookie cookieconsent::reset_cookie cookieconsent::reset_cookie (public) cookieconsent::reset_cookie->ad_unset_cookie lang::user::site_wide_locale_not_cached lang::user::site_wide_locale_not_cached (private) lang::user::site_wide_locale_not_cached->ad_unset_cookie

Testcases:
fs_create_folder

ad_urldecode_path (public)

 ad_urldecode_path string

Decode provided string with url-encoding for paths segments (instead of query segments) as defined in RFC 3986

Parameters:
string

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.

ad_urldecode_query (public)

 ad_urldecode_query string

Decode provided string with url-encoding for query segments (instead of path segments) as defined in RFC 3986

Parameters:
string

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_api_browser_apidoc_format_see acs_api_browser_apidoc_format_see (test acs-api-browser) ad_urldecode_query ad_urldecode_query test_acs_api_browser_apidoc_format_see->ad_urldecode_query test_acs_api_browser_apidoc_tclcode_to_html acs_api_browser_apidoc_tclcode_to_html (test acs-api-browser) test_acs_api_browser_apidoc_tclcode_to_html->ad_urldecode_query

Testcases:
acs_api_browser_apidoc_format_see, acs_api_browser_apidoc_tclcode_to_html

ad_urlencode_folder_path (public)

 ad_urlencode_folder_path folder_path

Perform an urlencode operation on the segments of the provided folder path, i.e. for a full folder path rather than path segments as in ad_urlencode_path.

Parameters:
folder_path
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 Class ::xowiki::includelet::folders Class ::xowiki::includelet::folders (public) ad_urlencode_folder_path ad_urlencode_folder_path Class ::xowiki::includelet::folders->ad_urlencode_folder_path ad_returnredirect ad_returnredirect (public) ad_returnredirect->ad_urlencode_folder_path ad_urlencode_url ad_urlencode_url (public) ad_urlencode_url->ad_urlencode_folder_path packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl packages/file-storage/www/folder-chunk.tcl->ad_urlencode_folder_path xowiki::Package instproc www-delete xowiki::Package instproc www-delete (public) xowiki::Package instproc www-delete->ad_urlencode_folder_path

Testcases:
No testcase defined.

ad_urlencode_path (public)

 ad_urlencode_path string

Encode provided string with url-encoding for paths segments (instead of query segments) as defined in RFC 3986

Parameters:
string

Partial Call Graph (max 5 caller/called nodes):
%3 packages/file-storage/www/folder-chunk.tcl packages/file-storage/ www/folder-chunk.tcl ad_urlencode_path ad_urlencode_path packages/file-storage/www/folder-chunk.tcl->ad_urlencode_path xowiki::Package instproc folder_path xowiki::Package instproc folder_path (public) xowiki::Package instproc folder_path->ad_urlencode_path xowiki::Package instproc pretty_link xowiki::Package instproc pretty_link (public) xowiki::Package instproc pretty_link->ad_urlencode_path

Testcases:
No testcase defined.

ad_urlencode_query (public)

 ad_urlencode_query string

Encode provided string with url-encoding for query segments (instead of paths) as defined in RFC 3986

Parameters:
string

Partial Call Graph (max 5 caller/called nodes):
%3 test_create_folder_with_page create_folder_with_page (test xowf) ad_urlencode_query ad_urlencode_query test_create_folder_with_page->ad_urlencode_query test_create_form_with_form_instance create_form_with_form_instance (test xowiki) test_create_form_with_form_instance->ad_urlencode_query Class ::ms::Graph Class ::ms::Graph (public) Class ::ms::Graph->ad_urlencode_query Class ::xowiki::includelet::tags Class ::xowiki::includelet::tags (public) Class ::xowiki::includelet::tags->ad_urlencode_query export_entire_form_as_url_vars export_entire_form_as_url_vars (public, deprecated) export_entire_form_as_url_vars->ad_urlencode_query export_ns_set_vars export_ns_set_vars (public, deprecated) export_ns_set_vars->ad_urlencode_query export_vars export_vars (public) export_vars->ad_urlencode_query

Testcases:
create_folder_with_page, create_form_with_form_instance
[ show source ]