andrewp in OpenACS

Added config for DB API multi-db support.

Trivial tweak to syntax of db_available_pools proc.

Added acs/database DB API config section.

Completed db_* api multi-database support. Can now use db api for

both Oracle and PostgreSQL at the same time.

    • -386
    • +2140
    /openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl
Added comment only re. number_p returns true for empty_string.

Added base multi-db support to the db_* API.

    • -72
    • +225
    /openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl
Made ns_logs slightly clearer.

Added title and CVS Id.

In some cases when file not in DB yet, static_page_id was referenced

but not yet set at all, fixed.

- Overhauled sp_maybe_create_new_mime_type to no longer have ANY side

effects (fixes bug 145).

- sp_sync_cr_with_filesystem_internal is now robust to errors caught

in do_sp_new (calling static_page.new), it continues on with other

files.

- Removed a few unnecessary ns_logs.

Fixed bad typo bug in sp_maybe_create_new_mime_type - if file-storage

package was installed, proc would fail due to left missing 'eval'.

Replaced ns_schedule_daily with ad_schedule_proc.

Replaced ns_share with nsv, and related improvements to mutex locking.

www/page-visit.tcl now works properly with files under package

directories and under the global www/ page root.

Failure to check for empty_string in sp_serve_html_page was breaking

/doc/static-pages/.

Now correctly sets mime type using sp_maybe_create_new_mime_type,

rather than always using text/html.

Added proc sp_sync_cr_with_filesystem_scheduled, so can optionally

schedule to run every night at e.g. 4 am.

Upgrade script now properly converts existing filenames from page to

server root relative, for both Oracle and Postgres.

- Now supports multiple static-pages package instances, each with its

own fs_root parameter.

- static_pages.filename column is now relative to server root, not

page root. May still need an upgrade sript to convert old values in

db, see TODO comment in oracle upgrade-4.2a-4.3.sql.

- Added update to singleton_p = 'f' to upgrade scripts, which I left

out before.

- (Did NOT yet change www/page-visit.tcl to support files beneath the

packages/*/www/ directories.)

- Added other misc. comments.

- Now supports multiple static-pages package instances, each with its

own fs_root parameter.

- static_pages.filename column is now relative to server root, not

page root. May still need an upgrade sript to convert old values in

db, see TODO comment in oracle upgrade-4.2a-4.3.sql.

- Added update to singleton_p = 'f' to upgrade scripts, which I left

out before.

- (Did NOT yet change www/page-visit.tcl to support files beneath the

packages/*/www/ directories.)

- Added other misc. comments.

file upgrade-4.2a-4.3.sql was initially added on branch oacs-4-6.

- Name of root folder is now unique in the CR even if have multiple

package instances, for both Oracle and Postgres.

- All Postgres functions now defined with "create or replace".

Moved Postgres functions and bodies out of static-pages-create.sql

into separate files (just like for Oracle) - necessary to more cleanly

support upgrade files. No other changes.

file static-page-pb.sql was initially added on branch oacs-4-6.

Moved Oracle package headers and bodies out of static-pages-create.sql

into separate files - necessary to more cleanly support upgrade files.

Also added a few comments. No other changes.

file static-page-pb.sql was initially added on branch oacs-4-6.

    • -0
    • +0
    /openacs-4/packages/static-pages/sql/oracle/static-page-pb.sql
file static-page-ph.sql was initially added on branch oacs-4-6.

    • -0
    • +0
    /openacs-4/packages/static-pages/sql/oracle/static-page-ph.sql
Show result message from sp_sync_cr_with_filesystem at bottom of page.

Added mutex locking prevent errors if more than one copy of

sp_sync_cr_with_filesystem runs at once for a single package instance,

plus related changes. Changed sp_sync_cr_with_filesystem proc to a

wrapper proc which now calls sp_sync_cr_with_filesystem_internal, in

order to properly free the mutex upon any unexpected error.

The fs-scan page now shows a message when an error readin a file is

encountered, just like the fs-scan-progress page.