• last updated 9 hours ago
Constraints: committers
Constraints: files
Constraints: dates
Fake the node_id when test is run outside of a connection

Many thanks to Thomas Renner

Fix actual coverage

Complete coverega of public api for the package

Deprecate attachments::root_folder_map_p

Document public api

Add minimal test case for 'attachments::get_package_key'

Remove leftover comment

Add 'attachments_basic_api' test case. Covers basic api of the attachments package: 'attachments::attach', 'attachments::unattach', 'attachments::get_all_attachments', 'attachments::get_attachments' and 'attachments::toggle_approved'

file attachments-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
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...

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

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

Whitespace cleanup

Provide a minimal documentation to public procs

Smartify query

Let everything happen in the database for this proc

Remove divergency between oracle and postgres codebase, rewrite proc to avoid duplication and give it a proper and correct documentation

Quoting commit that replaced db_list_of_lists with db_list, de facto hiding every additional column from results:


Author: Peter Marklund <peter_marklund@fastmail.fm>

Date: Mon Nov 24 14:50:34 2003 +0000

changing the get_attachments procs to use db_list instead of db_list_of_lists and the PG query to only return the id


merged changes from the oacs-5-9 branch and resolved conflicts

  1. … 7834 more files in changeset.
- add editor hints to keep spaces/tabs in the future more consistent

  1. … 313 more files in changeset.
Merging back to HEAD branch oacs-5-8 (using tag vg-merge-oacs-5-8-from-20141027).

  1. … 2547 more files in changeset.
- breace expressions

- used compiled instructions

- bump version number

  1. … 8 more files in changeset.
1. Use the mapped folder from file-storage to get and store attachments

2. HTML cleanup

  1. … 2 more files in changeset.
use content::extlink instead of the deprecated content_extlink:: api, add content::extlink::edit function

  1. … 12 more files in changeset.
1. Merge 2.4.1 to HEAD other than assessment, imsld, lorsm, and views.

2. Bump version numbers to 2.5.0d1.

  1. … 379 more files in changeset.
Fixed problem with nabvar when name contain spaces.