• last updated 14 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
improve spelling

  1. … 8 more files in changeset.
Added support for passing parameter_name:value_constraint to xowiki::Package->get_parameter

- The get_parameter method can get values from query-parameters, therefore

we have to validate these.

- Use the new feature at several places (especially for boolean values)

- Still, more places should be checked

- bumped xowiki to 5.10.1d37

- bumped xotcl-core to 5.10.1d14

  1. … 10 more files in changeset.
reduce verbosity

Fixed bug with value-constraints query parameters

Previous versions had a problem with calls like

:query_parameter name:SOMECONSTRAINT

since the implementation clobbered the name variable. Versions of NSF

later than 2022-01-21 support "nsf::parseargs" with the "-asdict"

option, which can use all the nsf::parseargs options and avoids

clobbering.

Added tests of "xo::cc query_parameters" to the regression test suite.

  1. … 1 more file in changeset.
Require form_parameter array consistently in the commands that need it

whitespace changes

reduce verbosity

fix messed up commit

It seems that param has the minus, while declared_parameters do not

Fixes downstream pipeline

Export by default only the declared query variables

Varibles are declared via package specification or in the includelet

definition. Previously, all query variables where exported.

Make creation of ::xo::cc more robust

In case the argument processing of

ConnectionContext create ::xo::cc -p1 ... -p2 ....

::xo::cc destroy_on_cleanup

runs into an exception leading to an ad_script_abort, the half-in

initialized object without cleanup definition will survive. At later

times, this object might be reused, containing potentially

cached results from earlier runs, which can cause troubles in error

cases.

This change takes care that errors during argument processing will

not leave half-initialized objects behind.

improve documentation and streamline code

  1. … 2 more files in changeset.
Modernize parameter parsing (query and includelet paramters)

- handle invalid UTF-8 exception that might be triggered by

"ns_parsequery" in newer versions of NaviServer

- the new code is about 4 times faster than the old one

- replaced array by dict

- don't create helper procs on the fly but use "nsf::parseargs" if possible

- added icanuse rules for

* "nsf::parseargs -asdict"

* "ns_parsequery -charset"

  1. … 1 more file in changeset.
fix dirty buffer of last commit

Added support for multiplicity in value constraints of "query_parameter"

Calls like e.g.

set id [:query_parameter some_id:int32]

are actually equivalent to

set id [:query_parameter some_id:int32 ""]

and accept therefore as result also an empty value. By being able to

specify an explicit multiplicity, we can force non-empty values:

set id [:query_parameter some_id:int32,1..1]

This means effectively that the default multiplicity is "0..1".

avoid subst in export_vars by using xo::update_query

  1. … 1 more file in changeset.
Use built-in "ns_parsequery" instead of manual parsing of query parameters.

Note, that this change might alter query processing, since previously

query parameter without explicit values were treated as boolean values

(like in HTML), now these are treated like "x=" before. The new version is

about 10x faster.

Furthermore, new tests of the regression tests were added for query parameter

processing.

  1. … 1 more file in changeset.
improve spelling

  1. … 1 more file in changeset.
improve comments

  1. … 1 more file in changeset.
replace array by dict, provide error message, when someone tries to setup a connection context without a proper url

Provide a fallback empty URL when one tries to require the connection context without one and outside of a connection

improve spelling

  1. … 5 more files in changeset.
don't rely on uppercase header field names

  1. … 10 more files in changeset.
whitespace changes

  1. … 1 more file in changeset.
add new API command for the connection context (e.g. xo:cc): eval_as_user {-user_id:integer cmd}

  1. … 1 more file in changeset.
add method for saveing/restoring perconnection_parameters

VS: ----------------------------------------------------------------------

make sure that parseargs treats argument as a single one

provide interface for setting query parameter

provide API to unset query and connection parameters

use ad_return_complaint for invalid query parameter parsing (at least in connection threads)