• last updated 2 hours ago
Constraints: committers
Constraints: files
Constraints: dates
new function: ::content::revision::export_to_filesystem

This change moves functionality from file-storage to acs-content-repository.

all application packages should be free of internals, such as the storage

type. Storage_type should be handeled in the content-repository package.

We are not yet done, there is still more to do in this respect in

the file-storage package.

  1. … 7 more files in changeset.
added constraint cr_items_parent_id_ck to avoid certain simple loops on parent_ids

An item must not be equal to its own parent. Note that this constraint is not

guaranteed to avoid all loops; it is still possible to create indirect recursive

loops but excludes some real-world problems.

  1. … 4 more files in changeset.
  1. … 3 more files in changeset.
use SQL functions (instead of plpgsql) defined as stabe and strict for

* content_folder__is_folder

* content_folder__is_sub_folder, and

* content_folder__is_empty

... having as well more sane constructs returning boolean values

  1. … 2 more files in changeset.
improve performance of content_folder__is_sub_folder

  1. … 2 more files in changeset.
Fix attribute datatype discrepancy, introduced in 2006 but never fixed for already existing instances.

Original datatype change:



  1. … 3 more files in changeset.
Move CR search callbacks to new namespace in compliance with OpenACS naming convention, create deprecated wrappers, update service contract tables

  1. … 3 more files in changeset.
drop leftover functions from 2003, 2004 and 2005 in existing instances

  1. … 1 more file in changeset.
Add "FOR UPDATE" to select operation of *_f() function inserting tuples.

the required "content_type__refresh_trigger" calls will follow later.

  1. … 2 more files in changeset.
fix broken API function acs_object_type::get_table_name (broken since 13 years) and use API instead of direct SQL queries

  1. … 7 more files in changeset.
Portrait management reform and correction

Moved logics to create a portrait in a proc in order to reuse it in other places

such as picture retrieval services (e.g. Bach picture retrieval at WU). Turns out

we were not doing our homeworks here: when the portrait is created into CR, a

cr_child_rel is created. When the portrait was erased though, this was not cleaned

up propely, leaving dangling acs_objects with no reference in cr_child_rels table.

On busy sites, this can grow in the ten thousands order of magnitude. Changes include

also fix for this behavior and tuples cleanup.

  1. … 16 more files in changeset.
add text/markdown to known content types (like text/enhanced), bump version number to 5.10.0d4

  1. … 3 more files in changeset.
Bring legacy versions of image__new() in sync with the actual definitions

  1. … 2 more files in changeset.
Fix typo in variable name "new_nls_language" (must be "new__nls_language")

  1. … 2 more files in changeset.
Fix typo in variable name "new_nls_language" (must be "new__nls_language")

  1. … 2 more files in changeset.
merged changes from the oacs-5-9 branch and resolved conflicts

  1. … 7834 more files in changeset.
- do not depend on beta or development versions

- make sure that released versions are not beta or development

- align version numbers (e.g. use also 5.9.1 for xotcl-core)

- bump version numbers to 5.9.1

  1. … 83 more files in changeset.
bump version numbers to 5.9.1b9 respectively to 2.9.1b9 to prepare for release

  1. … 91 more files in changeset.
Fix typo in parameter name

Allow copy of files/folders into the same folder of the original content. This is done by appending a numerical suffix to the name.

It required modifying copy stored procedures so they could accept a different name and title for the copy.

I have also removed redundant package definition in oracle code that was immediately overridden afterwards.

  1. … 12 more files in changeset.
Fix spelling errors

  1. … 49 more files in changeset.
Performance improvement in content_item__get_path stored procedure (thanks to Thomas Renner)

  1. … 2 more files in changeset.
- bump version number of OpenACS to 5.9.1b3 and DotLRN to 2.9.1b3

  1. … 79 more files in changeset.
Bump version numbers for OpenACS 5.9.1b1

  1. … 81 more files in changeset.
- Align type of parameter "storage_type" with type definition of cr_items.storage_type

- bump version to 5.9.1d27

  1. … 3 more files in changeset.
- fix bug when updateing a user portrait, which was saved as "lob"

  1. … 2 more files in changeset.
- fix cr_revision_latest_tr once more to reduce the number of dead tuples generated for xo* classes

- bump version number to 5.9.1d25

  1. … 2 more files in changeset.
- avoid call of deprecated sql variant with 12 args via API (many thnaks to Guenter Ernst)

- handling of NULL values in cr_revision_latest_tr (many thanks to Guenter Ernst)

- bump version to 5.9.1d24

  1. … 3 more files in changeset.
Reduced generation of dead tuples in postgres.

Background: In the old version, the fields latest and live

revisions were updated always via two separate dmlDML statements.

Every update causes in PostgreSQL (tested to pg 9.6) one more dead

tuple, such that on busy systems, we see 30k + dead tuples per

hour. These dead tuples in turn cause more auto vacuum operations

and can lead to abandoned query plans.

This change can reduce the number of dead tuples on cr_items into

half, by allowing both fields to be set in one operation (namely

content_item__set_live_revision). This function has an optional 4th

argument that can cause this optimization. For legacy applications,

nothing changes.

Btw: since all commonly used applications use the live revision, the

fallback of the latest_revision is unused. One can consider to

remove the cr_revision_latest_tr, at least on on certain


bump revision to 5.1.9d23

  1. … 3 more files in changeset.
Created new proc cr_check_mime_type, centralizing the retrieval of the mime_type from uploaded file's information.

Applied the new proc to the different situations in the system when we require mime_type retrieval: content-repository, file-storage and xotcl CrItem

TODO: get the real mime_type from the file content, but this would require some modification in the data model.

  1. … 7 more files in changeset.