• last updated 20 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
- new utility to try 'fixing' invalid HTML

- fixed recognition of protocol agnostic urls

- use location from connection context and configurations to determine whether full urls are local

- optionally use new utility when plain parsing fails to try accepting a broader kind of invalid markup

- some update in test cases

- rename of the utilities with the 'dom' prefix, to make clear that this is the dom approach for sanitizing markup.

As it is sometimes prone to format and content loss, its use should be carefully considered.

  1. … 1 more file in changeset.
- move test cases from utility procs into regression test

  1. … 1 more file in changeset.
Improved behavior on links by using RFC compliant URL recognition.

Created (working) test cases

  1. … 1 more file in changeset.
file text-html-procs.tcl was initially added on branch oacs-5-9.

- replace deprecated "cc_email_from_party ..." by "party::email -party_id ..."

- replace deprecated "cc_lookup_email_user ..." by "party::get_by_email -email ..."

  1. … 2 more files in changeset.
- fix test condition

- increase robsutness of apm_package_installed_p_not_cached

- make ad_unquote capable to unquote ns_qutehtml

- fix test cases

  1. … 4 more files in changeset.
- prefer ns_quotehtml over ad_quotehtml

  1. … 35 more files in changeset.
- add editor hints to keep spaces/tabs in the furture more consistent

  1. … 740 more files in changeset.
- remove globals for errorInfo/errorCode and use namespace qualifiers instead

  1. … 12 more files in changeset.

ad_proc reform:

- use nsf::proc for defining ad_procs, when nsf::proc is available

- nsf::proc is part of the environment of XOTcl2 and provides

an efficient, C-implemented argument parser that can replace

the scripted *__arg_parser of OpenACS.

- The benefits are performance and reduced memory consumption.

* Simple functions (where the calling overhead was a large

part of the execution times can become several times faster

(e.g. db_name is 3x faster, cookie handling is 2x faster),

for functions with much db-activities the percentage will

be less.

* The memory consumption (RSS) of a site like OpenACS.org

is reduced by about 15%.

NEW (with nsf::proc)

::ad_get_cookie x: 10.93 microseconds per iteration

::ad_get_cookie ad_session_id: 21.95 microseconds per iteration

::dt_systime: 24.89 microseconds per iteration

::db_name: 8.70 microseconds per iteration

::db_string dbqd.null.g "select version() from dual": 316.66 microseconds per iteration

::ad_convert_to_html "hello world": 102.29 microseconds per iteration

OLD (without nsf::proc)

::ad_get_cookie x: 19.42 microseconds per iteration

::ad_get_cookie ad_session_id: 30.10 microseconds per iteration

::dt_systime: 27.55 microseconds per iteration

::db_name: 32.28 microseconds per iteration

::db_string dbqd.null.g "select version() from dual": 366.69 microseconds per iteration

::ad_convert_to_html "hello world": 160.51 microseconds per iteration

======================================================================

proc mtime cmd {set c 5000

set t [time [list time $cmd $c]];

regexp {^(-?[0-9]+) +} $t _ mS1;

set ms [expr {$mS1*1.0/$c}];

return "[format %6.2f $ms] microseconds per iteration"

}

set tests {

{::ad_get_cookie x} {::ad_get_cookie ad_session_id} {::dt_systime}

{::db_name} {::db_string dbqd.null.g "select version() from dual"}

{::ad_convert_to_html "hello world"}

}

foreach t $tests {append ::_ $t ": " [mtime $t] \n}

set ::_

======================================================================

  1. … 9 more files in changeset.
Merging back to HEAD branch oacs-5-8 (using tag vg-merge-oacs-5-8-from-20141027).

  1. … 2539 more files in changeset.
- simplify code

  1. … 2 more files in changeset.
- use $::acs::rootdir rather than [acs_root_dir] or [get_server_root]

  1. … 13 more files in changeset.
- flatten nested "lindex" structures

- merge multiple "lappend" operations

- use "lassign" instead of multiple "lindex" operations

- improve performance util_convert_line_breaks_to_html by reducing

number of regsub operations and more precise regular expressions

- use numeric comparison operator for truth value comparisons

- use "lassign" instead of multiple "lindex" operations

- reduce number of remaining "string equal" operations

  1. … 12 more files in changeset.
- don't use backslash in multiline expressions

- make long expressions more uniform and more readable

- use "in" or not in (ni) operator instead of lsearch

- brace expressions to allow for tcl compilation

- bump version number

  1. … 20 more files in changeset.
- don't abbreviate subcommands

- modernize tcl

  1. … 8 more files in changeset.
- fix regression test for cookies (was executed only, when tclwebtest is available, for no reason)

- extend regression test for cookies

- added regression test for client properties

- remove obsolete files

  1. … 4 more files in changeset.
- fixing a wierd interaction between a db_foreach and db_transaction, which leads to wierd values in parameters. Moving from db_foreach to db_list_of_lists repairs the test case.

*** empty log message ***

  1. … 5 more files in changeset.
Merged oacs-5-7 to HEAD

  1. … 167 more files in changeset.
Fixed ailing oracle test ...

case fold before checking if column exists

accept pkey, fkey, and key as constraint suffixes since the pg automatic names use them and are good

Merged oacs-5-6 to HEAD. HEAD now installs and passes all core tests. There

may still be some lingering problems due to my screwing up the oacs-5-6

branch earlier, I'll be looking into this later.

  1. … 214 more files in changeset.
- fix test files__tcl_file_common_errors

- report errors as such in aa-test (wrote warnings into error log, this was ignored since ages)

- fixed naming in acs-tcl, acs-mail-lite and acs-subsite

  1. … 5 more files in changeset.
Added a test for global parameter set/get value.

Fixed up the apm parameter stuff to the point where I can at least

register and unregister, and cache values of, global parameters. There's

some really funky code here, I also took the time to have the unregister

code use the unregister API in PL/[pg]SQL rather than roll its own.

  1. … 7 more files in changeset.
TIP #138 - Add relation_tag to acs_data_links

    • -0
    • +149
    ./application-data-link-procs.tcl
  1. … 7 more files in changeset.