antoniop in OpenACS

Port from downstream a more failsafe cleanup in the importer

    • -2
    • +2
    /openacs-4/packages/xowiki/tcl/import-procs.tcl
Remove redundant cleanup which might fail in case object does not exist (we clean up anyway in the finally branch)

Refine approach by which index page is detected in bulk-delete method: previous way would treat all first level children of the root_folder as the index page, preventing bulk deletion focused on them (e.g. folders)

Allow to filter group members by membership state in the API

Greatly reduce complexity of code required to support -export flag for ad_form:

instead of juggle variables around to mimick export_vars, just set -export flag

value as a form property, then use the real export_vars on it later when form

is rendered. This will support all current features (e.g. :multiple, :sign, :array)

more reliably and reduce code duplication.

Put event handler inline so is attached at element creation, fix URLencoding of image deletion

Bring event handler inline to force it being attached after the upload button is added to the page

Add missing parameter in calc_wiki_image_links_to_image_tags

See bug tracker #3372

Replace single quotes wuith double quotes in javascript expressions involving acs_ListBulkActionClick

this is really needed only for the URL part, but was done on the name as well for consistency. The reason

is even a properly encoded URL could still contain single quotes, therefore breaking the expression,

while double quotes are expected to be encoded in valid, urlencoded URLs. This relies on trusting the developer

to properly encode URLs, which should be expected. An alternative could involve active escaping of

javascript special characters by e.g. ad_js_escape.

Introduce new ad_js_escape with the purpose of sanitizing tcl strings used inside javascript code from escape sequences and from quotes in particular and provide some test cases

TODO: consider its usage into templates when e.g. we are putting a URL into javascript functions such as acs_ListBulkActionClick. URLs might in fact contain single and double quotes.

Provide some basic way to create subgroups via the UI

Actually store the group name in the UI by intercepting the right form var

Fix test test by considering that group pretty name is automatically localized

Don't quote some function defaults that are meant to be evaluated literally

New automated test doing the roundrtrip of group-type related API

Note that this is currently failing due to a bug in package_instantiate_object, which triggered the creation of this test.

Move logics to delete a group type into the API

Fix quoting of group type

Remove unneeded variable

Add (trivial) ad_include_contract

Avoid unnecessary computations

Reduce divergency between oracle and postgres codebase and bring portable sql inline

Reuse return url over subsites, remove dummy sql

Use best practice list idiom

Avoid useless check

Localize file-size limits in the UI

Introduce a client-side check for the maximum file size, inform user of current limit and improve file-size related localization

Prettify code

Remove obsolete xql files

Simplify code and exploit parameter contract (we know flags are boolean)

Bugfixes et al:

- don't throw a server error if one clicks submit on the empty form without specifying a file

- allow to upload the same zipfile multiple times without throwing an error

- streamline idioms