• last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fixes for Oracle 19c: boolean types in query

This fixes the following bug for Oracle:

[13/Feb/2022:17:53:36][8701.7f9f62f0b700][-conn:oacs-5-10-0:default:0:0-] Error: nsoracle.c:1367:OracleSelect: error in `OCIStmtExecute ()': ORA-00920: invalid relational operator

:

: SQL:

:

: select p.package_id,

: p.instance_name,

: n.node_id,

: n.name,

: :subsite_url || n.name as url,

: (select count(*)

: from group_approved_member_map m

: where m.rel_type = 'membership_rel'

: and m.group_id = ag.group_id) as num_members,

: (select min(r2.member_state)

: from group_member_map m2,

: membership_rels r2

: where m2.group_id = ag.group_id

: and m2.member_id = :untrusted_user_id

: and r2.rel_id = m2.rel_id) as member_state,

: g.group_id,

: g.join_policy

: from site_nodes n,

: apm_packages p,

: application_groups ag,

: groups g

: where n.parent_id = :subsite_node_id

: and p.package_id = n.object_id

: and p.package_key in ('acs-subsite')

: and ag.package_id = p.package_id

: and g.group_id = ag.group_id

: and (g.join_policy !>>>!!= 'closed' or acs_permission.permission_p(p.package_id, :untrusted_user_id, 'read'))

: order by lower(instance_name)

:

Fixes for Oracle 19c: boolean types in query

This fixes the following bug for Oracle:

': ORA-00920: invalid relational operator

:

: SQL:

: select p.package_id,

: p.instance_name,

: n.node_id,

: n.name

: from site_nodes n,

: apm_packages p,

: apm_package_types t

: where n.parent_id = :subsite_node_id

: and p.package_id = n.object_id

: and t.package_key = p.package_key

: and t.package_type = 'apm_application'

: and acs_permission.permission_p(p.package_id, :user_id, 'read')

: !>>>!order by upper(instance_name)

:

fix cut&paste issue

    • -1
    • +1
    ./tcl/subsite-callback-procs-postgresql.xql
Fixes for Oracle 19c recursive query

Oracle has a slightly differnt syntax for CTEs require arguments, keyword "recursive" is not allowed.

This fixes the following error during initial installation:

nsoracle.c:1367:OracleSelect: error in `OCIStmtExecute ()': ORA-00905: missing keyword

SQL:

with recursive !>>>!object_hierarchy as (

select object_type, supertype

from acs_object_types

where object_type = coalesce(:object_type, (select object_type

from acs_objects

where object_id = :object_id))

union all

select t.object_type, t.supertype

from acs_object_types t,

object_hierarchy s

where t.object_type = s.supertype

)

select distinct callback, callback_type as type

from subsite_callbacks

where event_type = :event_type

and object_type in (select object_type from object_hierarchy)

    • -0
    • +30
    ./tcl/subsite-callback-procs-oracle.xql
    • -0
    • +30
    ./tcl/subsite-callback-procs-postgresql.xql
Deprecate template::util::tcl_to_sql_list, completely replaced by ns_dbquotelist, a native NaviServer command

  1. … 17 more files in changeset.
Whitespace cleanup

Streamline ns_set idiom

  1. … 2 more files in changeset.
Streamline idiom

Bump version number after message key spelling changes

improve german message keys (spelling, comma, spaces, orthogonality)

    • -11
    • +11
    ./catalog/acs-subsite.de_DE.ISO-8859-1.xml
  1. … 3 more files in changeset.
improve safety of SQL queries

  1. … 1 more file in changeset.
Reduce divergency between oracle and postgres codebase

    • -25
    • +0
    ./www/admin/rel-types/one-oracle.xql
    • -22
    • +0
    ./www/admin/rel-types/one-postgresql.xql
Cleanup unreferenced SQL

    • -15
    • +0
    ./www/admin/site-map/index-oracle.xql
Reduce divergency between oracle and postgres codebase

    • -27
    • +0
    ./www/admin/group-types/one-oracle.xql
    • -23
    • +0
    ./www/admin/group-types/one-postgresql.xql
fix release dates in .info files

  1. … 82 more files in changeset.
release work

  1. … 204 more files in changeset.
whitespace changes

    • -96
    • +96
    ./tcl/package-procs-postgresql.xql
regenerated documentation

    • -3
    • +3
    ./www/doc/group-admin-pages-acceptance-test.adp
    • -1
    • +1
    ./www/doc/group-admin-pages-design.adp
    • -1
    • +1
    ./www/doc/group-admin-pages-requirements.adp
  1. … 464 more files in changeset.
bump version numbers of 5.9|5.10 packages to 5.10.0b1

adjust dependencies

  1. … 87 more files in changeset.
improve validation of email address and user-id used as source for email address

  1. … 1 more file in changeset.
Reduce usage of ns_mktemp in OpenACS

ns_mktemp uses the deprecated old POSIX call mktemp(), which should

not be used anymore for security reasons (race between the name

creation and opening the file). This change removes several usages of

"ns_mktemp" from OpenACS and replaces it with calls to the

safe Tcl call "file tempfile ..." (introduced by Tcl 8.6).

  1. … 7 more files in changeset.
Make package_id explicit

Add 'acs_subsite_rel_segment_new' test case, covering 'rel_segment::new', 'rel_segment::delete' and 'group::get_rel_segment'

Add 'acs_subsite_application_group_new' test case, covering 'application_group::new' and 'application_group::delete'

Add 'acs_subsite_rel_type_roles' test case, covering 'rel_types::create_role' and 'rel_types::create_role'

Add 'acs_subsite_relation_procs' test case, covering 'relation_add', 'relation_remove', 'relation::get_object_one', 'relation::get_object_two', 'relation::get_objects' and 'relation::get_id'

Whitespace changes

Use the new 'email' input type widget

  1. … 1 more file in changeset.
Use the new 'email' input type widget

Whitespace changes