• last updated 6 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Return a fallback attachments url when not in a connection context, for example, during mail sending on the bulk-mail package

Add new private proc 'attachments::get_attachments_url', and use it to complement the logic of 'attachments::get_url'

As 'attachments::get_url' returns the value of the attachments package

'RelativeUrl' parameter, which can change at any time, it could happen

that previously mounted attachments have a different url and are not

found anymore.

We try our best here to find a mounted attachments package under

'base_url' to mitigate this, probably flawed, package logic.

In the future, probably a better method should be used for URL resolving

that is not so broken.

The whole thing is even more weird, as the attachments package is

currently a singleton that auto-mounts on /attachments, so i am tempted

to replace this whole thing with just that, but anyway...

improve spelling

  1. … 3 more files in changeset.
Only offer the possibility to delete an attachment from the file storage if it is really there, offer to detach it in any case.

Add 'attachments::get_title' to centralize the logic of title guessing for an attachment

Whitespace changes

Generalize attachment download logic, so it can deal with different object types, such as 'content_item', 'content_revision', and their subtypes

Add 'exception_count' to 'ad_return_complaint'

Make 'attachments::get_all_attachments' more general, so we try our best to get the 'label' of the attachment by trying different options depending on the object type: 'content_item', 'content_revision', a subtype of those, or just the 'title' row in the 'acs_objects' table. In the very worst case, just set the given 'item_id' as the label.

Prefer live to latest revision when getting title for attachments in 'attachments::get_all_attachments'

When the attachment is not in the file storage, consider both the possibilities of it being a 'content_item' or a 'content_revision', while trying to resolve its title in 'attachments::get_all_attachments' by looking directly in the content respository

Use 'item_id' instead of 'revision_id' for attachments

Do not assume all attachments are in the file storage while retrieving their title/name

Move 'util::content_size_pretty' into 'acs-lang' and rename it to 'lc_content_size_pretty', localicing 'bytes' and adapting automated tests. Bump 'acs-lang' version.

  1. … 41 more files in changeset.
Whitespace changes

Prettify data size using 'util::content_size_pretty'

    • -1
    • +0
    ./catalog/attachments.ast_ES.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.ca_ES.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.da_DK.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.de_DE.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.en_AU.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.en_US.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.es_CO.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.es_ES.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.es_GT.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.eu_ES.ISO-8859-1.xml
    • -1
    • +0
    ./catalog/attachments.fr_FR.ISO-8859-1.xml
  1. … 19 more files in changeset.
improve spelling

    • -1
    • +1
    ./catalog/attachments.en_US.ISO-8859-1.xml
  1. … 4 more files in changeset.
improve spelling

  1. … 21 more files in changeset.
improve spelling

  1. … 8 more files in changeset.
Bring files on oacs-5-10 in sync with HEAD

  1. … 158 more files in changeset.
Repeat this block of code here as well, as vars in the checks are not kept in the script body

File storage max upload limit reform:

the max upload limit will now default to empty. Rationale: this value is

one that ages quickly with respect to new storage requirements, and is

currently set to something incompatible with the vanilla Naviserver configuration

(500MB fs vs 20MB ns).

The upgrade script will make so that instances setting this parameter

higher than the server upload limit configuration will be

set empty as well (this would never have an effect, as server

will prevent the upload altogheter anyway).

Max upload limit in bytes is now retrieved from a proc implementing

this fallback to server configuration logics. Other than centralizing,

its purpose is to be used in client-side code checks in the future

so we could prevent a doomed upload in advance.

  1. … 6 more files in changeset.
Refer to the parameter in the file-storage instance instead than on a local one to decide the maximum upload size and deprecate the one here

Rationale: makes little sense that we set and maintain separate limits referring to the same file-storage instance

Remove trivial default, already set by the api

Whitespace removal

Remove obsolete queries and bring remaining one inline

don't pass deprecated argumentent "-user_id" to fs::get_folder_contents_count

  1. … 1 more file in changeset.
Whitespace cleanup

Provide a minimal documentation to public procs

Update es_ES translation

    • -0
    • +1
    ./catalog/attachments.es_ES.ISO-8859-1.xml
  1. … 3 more files in changeset.