Forum OpenACS Development: file-storage vs webdav renaming features (RFC?)

just to make a point clear:

a client of ours set up webdav to copy a set of folders previously hosted on some file server to an oacs server (5.2 for the sake of version).

then, some people at this client started renaming folders through the file-storage interface

later on someone wanted to make a diff or just copy over some more from the file server to the webdav, or maybe to copy those modifications "offline" for some reason.

at that stage no change made to file and folder names through file-storage would come up through webdav (which instead keeps showing the item titles).

it seems this feature is by design, in order to keep files' URLs consistent across renaming.

I think this should be an user-selectable option, or at least webdav should by default act over item labels/titles and not names.

Or even again an option should be provided to "make all renaming peristent" by copying all titles and labels over to names (I think some good SQL needed here).

Below some diff (patch -p0 <) to make file-storage change name to folder and items rather than just changing item/titles.

Comments are welcome.

Collapse
Posted by Michele Slocovich on
--- file-edit-2.xql.orig    2004-06-29 12:18:25.000000000 +0200
+++ file-edit-2.xql    2005-12-06 15:42:09.000000000 +0100
@@ -4,9 +4,13 @@

<fullquery name="edit_title">
    <querytext>
-        update cr_revisions set title=:title
-    where revision_id=(select live_revision from cr_items
+    select content_item__edit_name (
+          :file_id,
+          :title
+      );
+      update cr_revisions set title=:title
+        where revision_id=(select live_revision from cr_items
                            where item_id=:file_id)
    </querytext>
</fullquery>
-</queryset>
\ No newline at end of file
+</queryset>

--- folder-edit-2-postgresql.xql.orig    2004-06-02 00:54:19.000000000 +0200
+++ folder-edit-2-postgresql.xql    2005-12-06 13:28:22.000000000 +0100
@@ -7,7 +7,7 @@
      <querytext>
      select content_folder__edit_name (
                  :folder_id,
-                  null,    -- name
+                  :folder_name, -- name
                  :folder_name, -- label
                  null -- description
          );