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.88.2.15 -r1.88.2.16 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 27 Mar 2017 10:33:29 -0000 1.88.2.15 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 21 Apr 2017 14:22:45 -0000 1.88.2.16 @@ -83,7 +83,7 @@ # The "driverkey" indirection layer: # # Note that in the AOLserver config file, you may optionally add one -# entry for each database definining its "driver key". If you do NOT +# entry for each database defining its "driver key". If you do NOT # specify a driver key in the AOLserver config file, the appropriate # key will be determined for you by calling "ns_db driver" once on # startup for the first pool defined in each database. Therefore, Index: openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl,v diff -u -r1.8.2.1 -r1.8.2.2 --- openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl 10 Sep 2015 08:21:55 -0000 1.8.2.1 +++ openacs-4/packages/acs-tcl/tcl/ad-functional-procs.tcl 21 Apr 2017 14:22:45 -0000 1.8.2.2 @@ -670,7 +670,7 @@ # drop_while p xs returns the remaining portion of the list # span p xs = (takeWhile p xs, dropWhile p xs) # -# take_until p xs returns the list of elements upto and including the +# take_until p xs returns the list of elements up to and including the # first element of xs which satisfies p # # -------------------------------------------------------------------------------- @@ -702,7 +702,7 @@ list [take_while $p $xs] [drop_while $p $xs] } -ad_proc -public take_until {p xs} "returns the list of elements upto and including the +ad_proc -public take_until {p xs} "returns the list of elements up to and including the first element of xs which satisfies p" { set index 0 foreach x $xs { Index: openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl,v diff -u -r1.36.2.10 -r1.36.2.11 --- openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 28 Mar 2017 06:46:51 -0000 1.36.2.10 +++ openacs-4/packages/acs-tcl/tcl/apm-file-procs.tcl 21 Apr 2017 14:22:45 -0000 1.36.2.11 @@ -573,7 +573,7 @@ [exec [apm_gzip_cmd] -d -q -c -S .apm $file_path | [apm_tar_cmd] tf - 2> [apm_dev_null]]] "\n"] apm_callback_and_log $callback "
  • Done. Archive is [format %.1f [expr { [file size $file_path] / 1024.0 }]]KB, with [llength $files] files.
  • " } errmsg] } { - apm_callback_and_log $callback "The follow error occured during the uncompression process: + apm_callback_and_log $callback "The follow error occurred during the uncompression process:
    [ns_quotehtml $errmsg]

    " ns_log Error "Error loading APM file form url $url: $errmsg\n$::errorInfo" Index: openacs-4/packages/acs-tcl/tcl/apm-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-init.tcl,v diff -u -r1.2.2.1 -r1.2.2.2 --- openacs-4/packages/acs-tcl/tcl/apm-init.tcl 10 Sep 2015 08:21:55 -0000 1.2.2.1 +++ openacs-4/packages/acs-tcl/tcl/apm-init.tcl 21 Apr 2017 14:22:45 -0000 1.2.2.2 @@ -1,6 +1,6 @@ # FIXME: Peter M - This file cannot be watched with the APM as it -# re-initializes the reload level to 0 everytime it is sourced. Could +# re-initializes the reload level to 0 every time it is sourced. Could # we move these initialization to an -init.tcl file instead? # Initialize loader NSV arrays. See apm-procs.tcl for a description of Index: openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl,v diff -u -r1.109.2.20 -r1.109.2.21 --- openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 28 Mar 2017 06:46:51 -0000 1.109.2.20 +++ openacs-4/packages/acs-tcl/tcl/apm-install-procs.tcl 21 Apr 2017 14:22:45 -0000 1.109.2.21 @@ -2009,7 +2009,7 @@ or the local file system. @param repository_url The URL for the repository channel to get from, or the empty string to - seach the local file system instead. + search the local file system instead. @param array Name of an array where you want the repository stored. It will be keyed by package-key, and each entry will be an array list list what's returned by apm_read_package_info_file. 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.95.2.9 -r1.95.2.10 --- openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 28 Mar 2017 07:17:55 -0000 1.95.2.9 +++ openacs-4/packages/acs-tcl/tcl/apm-procs.tcl 21 Apr 2017 14:22:45 -0000 1.95.2.10 @@ -1331,7 +1331,7 @@ ad_proc -private apm_package_key_from_version_id_mem {version_id} { Returns the package_key for the given APM package version id. Goes to the database - everytime called. + every time called. @author Peter Marklund (peter@collaboraid.biz) } { Index: openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl,v diff -u -r1.13.2.1 -r1.13.2.2 --- openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl 10 Sep 2015 08:21:56 -0000 1.13.2.1 +++ openacs-4/packages/acs-tcl/tcl/application-data-link-procs.tcl 21 Apr 2017 14:22:45 -0000 1.13.2.2 @@ -34,7 +34,7 @@ -relation_tag $relation_tag }]} { - # check if error occured because of existing link + # check if error occurred because of existing link if { [application_data_link::exist_link -object_id $this_object_id -target_object_id $target_object_id -relation_tag $relation_tag] eq "1" } { ns_log Debug "application_data_link::new: link already exists" } else { @@ -319,7 +319,7 @@ @param object_id Object_id to update @param text Text to scan for references - @param linked_object_ids List of object ids to update the links to. Links not in this list will be deleted, and any in this list that are not in teh database will be added. + @param linked_object_ids List of object ids to update the links to. Links not in this list will be deleted, and any in this list that are not in the database will be added. @param relation_tag Relationship identifier @return List of updated linked object_ids Index: openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl,v diff -u -r1.62.2.8 -r1.62.2.9 --- openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 14 Feb 2017 15:51:07 -0000 1.62.2.8 +++ openacs-4/packages/acs-tcl/tcl/community-core-procs.tcl 21 Apr 2017 14:22:45 -0000 1.62.2.9 @@ -221,7 +221,7 @@ # DRB: Though I've moved the bio field to type specific rather than generic storage, I've # maintained the API semantics exactly as they were before mostly in order to make upgrade # possible. In the future, the number of database hits can be diminished by getting rid of -# the seperate queries for bio stuff. However, I have removed bio_mime_type because it's +# the separate queries for bio stuff. However, I have removed bio_mime_type because it's # unused and unsupported in the existing code. ad_proc -public person::get_bio { Index: openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/Attic/deprecated-utilities-procs.tcl,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl 10 Sep 2015 08:21:56 -0000 1.9.2.1 +++ openacs-4/packages/acs-tcl/tcl/deprecated-utilities-procs.tcl 21 Apr 2017 14:22:45 -0000 1.9.2.2 @@ -162,7 +162,7 @@ location. All variables in ns_getform (both posts and gets) will be maintained. Note that this will return out of its caller so that the caller need not explicitly call "return". Returns the user id - if login was succesful. + if login was successful. @see auth::require_login } { Index: openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl,v diff -u -r1.66.2.8 -r1.66.2.9 --- openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 30 May 2016 13:07:46 -0000 1.66.2.8 +++ openacs-4/packages/acs-tcl/tcl/form-processing-procs.tcl 21 Apr 2017 14:22:45 -0000 1.66.2.9 @@ -295,7 +295,7 @@
    A code block which sets the values for each element of the form meant to be modifiable by the user when the built-in key management feature is being used or to define options for select lists etc. Set the values as local variables in the code block, and they'll get - fetched and used as element values for you. This block is executed everytime the + fetched and used as element values for you. This block is executed every time the form is loaded except when the form is being submitted (in which case the -on_submit block is executed.)
    @@ -425,7 +425,7 @@

    Index: openacs-4/packages/acs-tcl/tcl/security-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/security-procs.tcl,v diff -u -r1.78.2.51 -r1.78.2.52 --- openacs-4/packages/acs-tcl/tcl/security-procs.tcl 15 Apr 2017 10:12:03 -0000 1.78.2.51 +++ openacs-4/packages/acs-tcl/tcl/security-procs.tcl 21 Apr 2017 14:22:45 -0000 1.78.2.52 @@ -2024,7 +2024,7 @@ # set driverInfo [util_driver_info] set driverHostName [dict get $driverInfo hostname] - if {$hostName eq $driverHostName || $hostName in [ns_addrbyhost -all $driverHostName]} { + if {$hostName eq $driverHostName || $hostName in [ns_ -all $driverHostName]} { # # port is currently ignored # @@ -2287,7 +2287,7 @@ font-src form-action frame-src - frome-ancestors + frame-ancestors img-src media-src object-src Index: openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl,v diff -u -r1.36.2.35 -r1.36.2.36 --- openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 14 Apr 2017 09:01:45 -0000 1.36.2.35 +++ openacs-4/packages/acs-tcl/tcl/tcl-documentation-procs.tcl 21 Apr 2017 14:22:46 -0000 1.36.2.36 @@ -769,7 +769,7 @@ if { ![info exists validate] } { set validate [list] - } + }d set validate_len [llength $validate] for { set i 0 } { $i < $validate_len } { incr i } { Index: openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl,v diff -u -r1.1.2.3 -r1.1.2.4 --- openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 11 Apr 2016 14:27:31 -0000 1.1.2.3 +++ openacs-4/packages/acs-tcl/tcl/tcltrace-init.tcl 21 Apr 2017 14:22:46 -0000 1.1.2.4 @@ -1,10 +1,10 @@ # -# Add Tcl traces for asserted tcl commands. +# Add Tcl traces for asserted Tcl commands. # # Add the traces only, when the functions are active (i.e. the -# controling package parameter has not the default value), because +# controlling package parameter has not the default value), because # adding the traces has performance impact on potentially frequently -# called tcl commands (such as e.g. ns_log) +# called Tcl commands (such as e.g. ns_log) # # Therefore, activating/deactivating requires a server restart. # Index: openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl,v diff -u -r1.67.2.25 -r1.67.2.26 --- openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 13 Feb 2017 13:44:50 -0000 1.67.2.25 +++ openacs-4/packages/acs-tcl/tcl/text-html-procs.tcl 21 Apr 2017 14:22:46 -0000 1.67.2.26 @@ -69,7 +69,7 @@ # email links have the form xxx@xxx.xxx # # JCD: don't treat things =xxx@xxx.xxx as email since most - # common occurance seems to be in urls (although VPATH bounce + # common occurrence seems to be in urls (although VPATH bounce # emails like bounce-user=domain.com@sourcehost.com will then # not work correctly). Another tricky case is # http://www.postgresql.org/message-id/20060329203545.M43728@narrowpathinc.com @@ -724,11 +724,15 @@ break } - # This regexp matches an attribute name and an equal sign, if present. - # Also eats whitespace before or after. - # The \A corresponds to ^, except it matches the position we're starting from, not the start of the string + # This regexp matches an attribute name and an equal sign, if + # present. Also eats whitespace before or after. The \A + # corresponds to ^, except it matches the position we're + # starting from, not the start of the string. if { ![regexp -indices -start $i {\A\s*([^\s=>]+)\s*(=?)\s*} $html match attr_name_idx equal_sign_idx] } { - # Apparantly, there's no attribute name here. Let's eat all whitespace and lonely equal signs. + # + # Apparently, there's no attribute name here. + # Let's eat all whitespace and lonely equal signs. + # regexp -indices -start $i {\A[\s=]*} $html match set i [expr { [lindex $match 1] + 1 }] } { @@ -828,7 +832,7 @@ incr i if { ![regexp -indices -start $i {\A/?([-_a-zA-Z0-9]+)\s*} $html match name_idx] } { - # The tag-opener isn't followed by USASCII letters (with or without optional inital slash) + # The tag-opener isn't followed by USASCII letters (with or without optional initial slash) # Not considered a tag. Shouldn't do any harm in browsers. # (Tested with digits, with A syntax, with whitespace) } else { @@ -1060,7 +1064,7 @@ @param fix When parsing fails on markup as it is, try to fix it by, for example, closing unclosed tags or normalizing attribute specification. This operation will remove most of - plain whitespace into text content of original HTML, toghether + plain whitespace into text content of original HTML, together with every comment and the eventually present DOCTYPE declaration. @@ -1372,8 +1376,9 @@ set last_tag_end [incr i] continue } elseif {[string match "!--*" [string range $html $i+1 end]]} { - # handle HTML comments, I can't beleive noone noticed this before. - # this code maybe not be elegant but it works + # Handle HTML comments, I can't believe no one noticed + # this before. This code maybe not be elegant but it + # works. # find the closing comment tag. set comment_idx [string first "-->" $html $i] @@ -2175,7 +2180,7 @@ Should always be called as string_truncate [-flags ...] -- string since otherwise strings which start with a - will treated as switches, and will cause an error. - @param len The lenght to truncate to. If zero, no truncation will occur. + @param len The length to truncate to. If zero, no truncation will occur. @param ellipsis This will get put at the end of the truncated string, if the string was truncated. However, this counts towards the total string length, so that the returned string 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.140.2.71 -r1.140.2.72 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 15 Apr 2017 09:52:46 -0000 1.140.2.71 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 21 Apr 2017 14:22:46 -0000 1.140.2.72 @@ -276,7 +276,7 @@ } { This proc is used for pages using double click protection. table_name is table_name for which we are checking whether the double click - occured. id_column_name is the name of the id table + occurred. id_column_name is the name of the id table column. generated_id is the generated id, which is supposed to have been generated on the previous page. return_url is url to which this procedure will return redirect in the case of successful insertion in @@ -1129,7 +1129,7 @@ You can append :multiple to the name of a variable. In this case, the value will be treated as a list, and each of the elements output separately.

    - export_vars is now the prefered interface. + export_vars is now the preferred interface.

    Example usage: [export_vars -form -sign {foo bar:multiple baz}] @@ -1174,7 +1174,7 @@ generally not be used. It's much better to explicitly name the variables you want to export. - export_vars is now the prefered interface. + export_vars is now the preferred interface. @see export_vars } { @@ -1200,7 +1200,7 @@ format = url, a url parameter string will be returned. If format = form, a block of hidden form fragments will be returned. - export_vars is now the prefered interface. + export_vars is now the preferred interface. @param format either url or form @param exclusion_list list of fields to exclude @@ -1241,7 +1241,7 @@ -sign:boolean args } { - export_vars is now the prefered interface. + export_vars is now the preferred interface. Returns a string of key=value pairs suitable for inclusion in a URL; you can pass it any number of variables as arguments. If any are @@ -1312,7 +1312,7 @@ ad_proc -public export_entire_form_as_url_vars { {vars_to_passthrough ""} } { - export_vars is now the prefered interface. + export_vars is now the preferred interface. Returns a URL parameter string of name-value pairs of all the form parameters passed to this page. If vars_to_passthrough is given, it @@ -4503,7 +4503,7 @@ ad_proc -public util::roll_server_log {} { Invoke the AOLserver ns_logroll command with some bookend log records. This rolls the error log, not the access log. } { - # This param controlls how many backups of the server log to keep, + # This param controls how many backups of the server log to keep, ns_config -int "ns/parameters" logmaxbackup 10 ns_log Notice "util::roll_server_log: Rolling the server log now..." ns_logroll @@ -4662,8 +4662,9 @@ @param command A list of arguments to pass to exec @param result_var Variable name in caller's scope to set the result in - @return 0 or 1. 0 if no error, 1 if an error occured. If an error occured - the error message will be put into result_var in the caller's scope. + @return 0 or 1. 0 if no error, 1 if an error occurred. If an error + occurred the error message will be put into result_var in the + caller's scope. @author Dave Bauer @creation-date 2008-01-28 @@ -4730,7 +4731,7 @@ # failed. The error code is in $errName, and a # human-readable message is in $msg. ns_log notice "util::catch_exec: posix $errName $msg $result" - set result "an error occured $errName \"$msg\"" + set result "an error occurred $errName \"$msg\"" return 1 } Index: openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl,v diff -u -r1.4.12.1 -r1.4.12.2 --- openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl 10 Sep 2015 08:22:01 -0000 1.4.12.1 +++ openacs-4/packages/acs-tcl/tcl/whos-online-procs.tcl 21 Apr 2017 14:22:46 -0000 1.4.12.2 @@ -26,7 +26,7 @@ } ad_proc -private whos_online::flush {} { - Removing all user_ids from the last_hit (nsv_set) wich have a time Stamp older than + Removing all user_ids from the last_hit (nsv_set) which have a time Stamp older than the number of seconds indicated by the proc whos_online::interval. @author Bjoern Kiesbye @@ -127,7 +127,7 @@ ad_proc -public whos_online::user_ids { {-all:boolean} } { - This function returns a list of user_ids from users wich have requested a page + This function returns a list of user_ids from users which have requested a page from this Server in the last 10 min.And aren't set to invisible. @param all Set this flag if you want to include invisible users. @@ -191,7 +191,7 @@ } ad_proc -public whos_online::all_invisible_user_ids {} { - This function returns a list with all user_ids wich are set to invisible + This function returns a list with all user_ids which are set to invisible @author Bjoern Kiesbye } { Index: openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 10 Sep 2015 08:22:01 -0000 1.4.2.1 +++ openacs-4/packages/acs-tcl/tcl/xml-0-sgml-procs.tcl 21 Apr 2017 14:22:46 -0000 1.4.2.2 @@ -928,7 +928,7 @@ # A syntax tree is constructed. # A transition table is built next. # -# This is going to need alot of work! +# This is going to need a lot of work! # # Arguments: # state state array variable Index: openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl,v diff -u -r1.3.2.1 -r1.3.2.2 --- openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 10 Sep 2015 08:22:02 -0000 1.3.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/acs-tcl-apm-procs.tcl 21 Apr 2017 14:22:46 -0000 1.3.2.2 @@ -64,8 +64,8 @@ aa_log "Package to be instantiated: $package_key" aa_log "Instance name to be added: $instance_name" - set error_ocurred [catch {set package_id [apm_package_instance_new -package_key $package_key -instance_name $instance_name ]} err_men] - aa_log "Error Message $error_ocurred: $err_men " + set error_occurred [catch {set package_id [apm_package_instance_new -package_key $package_key -instance_name $instance_name ]} err_men] + aa_log "Error Message $error_occurred: $err_men " aa_true "Setting the new instance succeeded" [expr {[info exists package_id] && $package_id ne ""}] Index: openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl,v diff -u -r1.5.2.1 -r1.5.2.2 --- openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 10 Sep 2015 08:22:02 -0000 1.5.2.1 +++ openacs-4/packages/acs-tcl/tcl/test/application-data-link-procs.tcl 21 Apr 2017 14:22:46 -0000 1.5.2.2 @@ -1,5 +1,5 @@ ad_library { - Tests for applicaiton data links + Tests for application data links. } aa_register_case -cats api data_links_scan_links { Index: openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl,v diff -u -r1.2.14.1 -r1.2.14.2 --- openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl 10 Sep 2015 08:22:03 -0000 1.2.14.1 +++ openacs-4/packages/acs-tcl/tcl/test/memoizing-procs.tcl 21 Apr 2017 14:22:46 -0000 1.2.14.2 @@ -36,7 +36,7 @@ aa_log "checking if the proc is cached" set success_p [util_memoize_cached_p {memoizing_procs_test::return_string -name "foobar"}] - aa_equals "proc was cached succesful" $success_p 1 + aa_equals "proc was cached successful" $success_p 1 } aa_register_case -cats {api smoke} ad_proc_flush { @@ -48,7 +48,7 @@ aa_log "flushing" util_memoize_flush_regexp {return_upper_case_text} set success_p [util_memoize_cached_p {memoizing_procs_test::return_upper_case_text -txt "foobar"}] - aa_equals "proc was flushed succesful" $success_p 0 + aa_equals "proc was flushed successful" $success_p 0 } Index: openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl,v diff -u -r1.2.12.1 -r1.2.12.2 --- openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 10 Sep 2015 08:22:04 -0000 1.2.12.1 +++ openacs-4/packages/acs-tcl/tcl/test/test-permissions-procs.tcl 21 Apr 2017 14:22:46 -0000 1.2.12.2 @@ -15,66 +15,67 @@ Test for Permission Procedures of grant and revoke. } { - #we get an user_id as party_id. + # We get an user_id as party_id. set user_id [db_nextval acs_object_id_seq] aa_run_with_teardown -rollback -test_code { - #Create the user + # Create the user array set user_info [twt::user::create -user_id $user_id] - #Create and mount new subsite to test the permissions on this instance + # Create and mount new subsite to test the permissions on this + # instance. set site_name [ad_generate_random_string] set new_package_id [site_node::instantiate_and_mount \ -node_name $site_name \ -package_key acs-subsite] - #Grant privileges of admin,read,write and create, after check - #this ones, after revoke this ones. + # Grant privileges of admin,read,write and create, after check + # this ones, after revoke this ones. - #Grant admin privilege + # Grant admin privilege permission::grant -party_id $user_id -object_id $new_package_id -privilege "admin" - #Verifying the admin privilege on the user + # Verifying the admin privilege on the user aa_true "testing admin privilige" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "admin"] == 1}] - #Revoking admin privilege + # Revoking admin privilege permission::revoke -party_id $user_id -object_id $new_package_id -privilege "admin" aa_true "testing if admin privilige was revoked" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "admin"] == 0}] - #Grant read privilege + # Grant read privilege permission::grant -party_id $user_id -object_id $new_package_id -privilege "read" - #Verifying the read privilege on the user + # Verifying the read privilege on the user aa_true "testing read permissions" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "read" ] == 1}] - #Revoking read privilege + # Revoking read privilege permission::revoke -party_id $user_id -object_id $new_package_id -privilege "read" - #We tested with a query because we have problems with inherit + # We tested with a query because we have problems with inherit aa_true "testing if read privilige was revoked" \ [expr {[db_string test_read "select 1 from acs_permissions where object_id = :new_package_id and grantee_id = :user_id" -default 0] == 0}] - #Grant write privilege + # Grant write privilege permission::grant -party_id $user_id -object_id $new_package_id -privilege "write" - #Verifying the write privilege on the user + # Verifying the write privilege on the user aa_true "testing write permissions" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "write" ] == 1}] - #Revoking write privilege + # Revoking write privilege permission::revoke -party_id $user_id -object_id $new_package_id -privilege "write" aa_true "testing if write permissions was revoked" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "write" ] == 0}] - #Grant create privilege + # Grant create privilege permission::grant -party_id $user_id -object_id $new_package_id -privilege "create" - #Verifying the create privelege on the user + # Verifying the create privilege on the user aa_true "testing create permissions" \ - [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 1}] - #Revoking create privilege - permission::revoke -party_id $user_id -object_id $new_package_id -privilege "create" - aa_true "testing if create privileges was revoked" \ - [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 0}] + [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 1}] + # Revoking create privilege + permission::revoke -party_id $user_id -object_id $new_package_id -privilege "create" + aa_true "testing if create privileges was revoked" \ + [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "create" ] == 0}] - #Grant delete privilege + # Grant delete privilege permission::grant -party_id $user_id -object_id $new_package_id -privilege "delete" - #Verifying the delete privilege on the user + # Verifying the delete privilege on the user aa_true "testing delete permissions" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "delete" ] == 1}] - #Revoking delete privilege + # Revoking delete privilege permission::revoke -party_id $user_id -object_id $new_package_id -privilege "delete" aa_true "testing if delete permissions was revoked" \ [expr {[permission::permission_p -party_id $user_id -object_id $new_package_id -privilege "delete" ] == 0}] @@ -86,13 +87,13 @@ Test for Permission Procedures of permission_p } { - #we get an user_id as party_id. + # We get an user_id as party_id. set user_id [db_nextval acs_object_id_seq] aa_run_with_teardown -rollback -test_code { - #Create the user + # Create the user array set user_info [twt::user::create -user_id $user_id] - #Create and mount new subsite to test the permissions on this - # instance + # Create and mount new subsite to test the permissions on this + # instance set site_name [ad_generate_random_string] set new_package_id [site_node::instantiate_and_mount \ -node_name $site_name \