• last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
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'.

Merge of all changes from oacs-4-6 to HEAD. All changes up to tag jcd-merge-2

on oacs-4-6 are included.

    • -589
    • +21
    ./sql/oracle/static-pages-create.sql
    • -0
    • +45
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
    • -0
    • +602
    ./sql/postgresql/static-page-pb.sql
    • -585
    • +2
    ./sql/postgresql/static-pages-create.sql
    • -19
    • +47
    ./tcl/static-pages-procs-oracle.xql
    • -20
    • +46
    ./tcl/static-pages-procs-postgresql.xql
    • -14
    • +22
    ./www/admin/fs-scan-progress.tcl
  1. … 20 more files in changeset.
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.

    • -0
    • +9
    ./tcl/static-pages-procs-postgresql.xql
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.

    • -1
    • +20
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
    • -11
    • +8
    ./tcl/static-pages-procs-oracle.xql
    • -12
    • +8
    ./tcl/static-pages-procs-postgresql.xql
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.

    • -4
    • +6
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
- 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.

    • -1
    • +10
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
    • -0
    • +23
    ./tcl/static-pages-procs-oracle.xql
    • -0
    • +21
    ./tcl/static-pages-procs-postgresql.xql
file upgrade-4.2a-4.3.sql was initially added on branch oacs-4-6.

    • -0
    • +0
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
    • -0
    • +0
    ./sql/postgresql/upgrade/upgrade-4.2a-4.3.sql
- 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".

    • -0
    • +15
    ./sql/oracle/upgrade/upgrade-4.2a-4.3.sql
    • -15
    • +24
    ./sql/postgresql/static-page-pb.sql
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.

    • -0
    • +589
    ./sql/postgresql/static-page-pb.sql
    • -585
    • +2
    ./sql/postgresql/static-pages-create.sql
file static-page-pb.sql was initially added on branch oacs-4-6.

    • -0
    • +0
    ./sql/postgresql/static-page-pb.sql
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.

    • -589
    • +19
    ./sql/oracle/static-pages-create.sql
file static-page-pb.sql was initially added on branch oacs-4-6.

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

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

    • -8
    • +8
    ./tcl/static-pages-procs-postgresql.xql
The fs-scan page now shows a message when an error readin a file is

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

Fixed sp_sync_cr_with_filesystem and the fs-scan-progress.tcl page so

that the scan will properly continue after hitting an error on a

single file, rather than terminating abruptly. Also tweaked sp_*_item

output procs slightly.

sync info files with package data and correct provides identifiers

  1. … 36 more files in changeset.
Added TODO comments about deleting stale items and all their attached

comments, only.

merge from oacs-4-6

    • -27
    • +0
    ./tcl/static-pages-sc-procs-postgresql.xql
    • -0
    • +14
    ./www/admin/display-policy-toggle-oracle.xql
    • -14
    • +0
    ./www/admin/display-policy-toggle-orcale.xql
  1. … 24 more files in changeset.
1. Minor wording change to the static pages admin index template

2. Made ad_form_new_p require a key name since guessing's arcane and

unreliable

  1. … 1 more file in changeset.
moved file static-pages-sc-procs-postgresql.xql to static-pages-sc-procs.xql since it was generic

    • -27
    • +0
    ./tcl/static-pages-sc-procs-postgresql.xql
file static-pages-sc-procs.xql was initially added on branch oacs-4-6.

    • -0
    • +0
    ./tcl/static-pages-sc-procs.xql