• last updated 9 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
file acs-db-00-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./test/acs-db-00-procs.tcl
reduce dependency on xo namespace in acs-core

redice verbosity

Fix quote_unquote_html test

Make ad_html_security_check configurable

ad_html_security_check has now three optional attributes

to make it configurable for different situations

-allowed_tags

-allowed_attributes

-allowed_protocols

If these attributes are not specified, the behavior is exactly like

before. This change makes it also easier to regression test this

function, since the behavior does not necessarily depend on a site's

parameter settings.

The function was also modernized, new regression tests were added.

    • -20
    • +39
    ./test/html-conversion-procs.tcl
Improve spelling

Fine-tuning the new db function interface

#

# Check, wether we have to regenerate the database function interface.

#

# - During initial setup, there are no db-functions, so nothing has to

# be done.

#

# - During regular startup of the server, the generation of the stub

# interface happens in the *init procs (hopefully this is always

# sufficient, but seems so)

#

# - During reloads of acs-db-*-procs, the base classes are interface

# objects are recreated and cleaned up from all prior definitons,

# which means that in this situations, we have to regeneate the

# interface.

#

# - One might call manually the regeneration, when database functions

# have been altered and no restart is desired.

#

Reform of site-nodes-procs

- made XOTcl2 based implementation of site-nodes usable during

initial bootstrap

- made new site-node cache implementation working for Oracle

- now, the same code works during bootstrap, for PostgreSQL and Oracle

and independent of xotcl-core being installed or not.

- removed old and broken nsv-based site-node cache

- reduced need of .xql files (removed query for delete.delete_site_node)

- moved deprecated calls to deprecated-procs.tcl

This change make the code much clearer and eases maintenance and debugging.

Update of SQL function calling interface to make it usable during initial bootstrap

- add sanity checks and produce error messages,

when function args are incorrect.

- do not throw errors in case it is called before the

table acs_function_args was created (during boot)

- added preliminary "list" call to acs::dc

- added first *-init.tcl to be called after loading

the *-proc.tcl files.

- removed all references to the ::xo::* namespace

file 00-acs-tcl-init.tcl was initially added on branch oacs-5-10.

Make parameter::get_from_package_key usable during inital boot

This change makes parameter::get_from_package_key usable during

initial boot, i.e. before the table apm_parameters is created.

In these cases, the function returns just the default value.

Support memory units as default of the cache sizes

update questionable test slightly

improve spelling and formulations

Added new interface for calling database functions

This is tested for PostgreSQL and Oracle and the drivers nsdb and nsdbi.

For details, see https://openacs.org/xowiki/calling-database-functions

  1. … 1 more file in changeset.
file acs-db-00-procs.tcl was initially added on branch oacs-5-10.

file acs-db-12-procs.tcl was initially added on branch oacs-5-10.

minor cleanup to make code more consistent

util::file_content_check: new utility for checking content of a file

Check whether the provided file is of the requested type.

This function is more robust and protable than relying on

external programs and their output, but it does not work on

all possible file types. It checks a few common cases that

could lead to problems otherwise, like when uploading archives.

Bump version to 5.10.1d9

  1. … 1 more file in changeset.
minor changes: don't complain about postgres internal constraint names, provide hints for oversizing

more cases, use same testing idiom for permissions everywhere, break overlong lines

    • -10
    • +16
    ./test/test-permissions-procs.tcl
fix test cases

    • -14
    • +14
    ./test/test-permissions-procs.tcl
revert last change of Antonio, since this kills Oracle again

It is not clear, which code needs integer as results for Boolean results.

If there is such code, it should handle this requirement locally.

Reintroduce cast to integer using a portable idiom

Fixes for Oracle 19c: invalid cast to integer

This fixes the following bug for Oracle:

: invalid positional variable `:', valid values start with 1

: while executing

: "ns_ora 0or1row nsdb0 {

: select acs_permission.permission_p(:object_id, :party_id, :privilege)::integer from dual

: }"

fix editing bug

V: ----------------------------------------------------------------------

Fixes for Oracle 19c boolean types in query

This fixes the following bug for Oracle:

: select u.user_id,

: u.authority_id,

: u.username,

: u.screen_name,

: u.priv_name,

: u.priv_email,

: u.email_verified_p,

: u.email_bouncing_p,

: u.no_alerts_until,

: u.last_visit,

: to_char(last_visit, 'YYYY-MM-DD HH24:MI:SS') as last_visit_ansi,

: u.second_to_last_visit,

: to_char(second_to_last_visit, 'YYYY-MM-DD HH24:MI:SS') as second_to_last_visit_ansi,

: u.n_sessions,

: u.password,

: u.salt,

: u.password_question,

: u.password_answer,

: u.password_changed_date,

: extract(day from current_timestamp - password_changed_date) as password_age_days,

: u.auth_token,

: mm.rel_id,

: mr.member_state !>>>!= 'approved' as registered_user_p,

: mr.member_state

: from users u

: left join group_member_map mm on mm.member_id = u.user_id

: and mm.group_id = mm.container_id

: and mm.group_id = :registered_users_group_id

: and mm.rel_type = 'membership_rel'

: left join membership_rels mr on mr.rel_id = mm.rel_id

: where u.user_id = :user_id

fixes for Oracle 19c

  1. … 3 more files in changeset.
improve spelling

extend tests and pinpoint essesntials