src/server/plugins/postgresql/webdav.c

branch
webdav
changeset 380
0f85d9bde309
parent 378
0344108db255
child 382
9e2289c77b04
--- a/src/server/plugins/postgresql/webdav.c	Thu Aug 18 16:54:57 2022 +0200
+++ b/src/server/plugins/postgresql/webdav.c	Thu Aug 18 18:18:06 2022 +0200
@@ -428,6 +428,12 @@
         return 1;
     }
     
+    // store resource_id in rq->vars, maybe some other modules
+    // like to use it
+    char resource_id_str[32];
+    snprintf(resource_id_str, 32, "%" PRId64, resource_id);
+    pblock_nvinsert("resource_id",resource_id_str, rq->rq->vars);
+    
     // create a list of requsted extended properties
     PgPropfindExtCol *ext;
     size_t numext;
@@ -486,9 +492,6 @@
     query = sql->space;
     
     // get all resources and properties
-    char resource_id_str[32];
-    snprintf(resource_id_str, 32, "%" PRId64, resource_id);
-    
     size_t href_len = strlen(href);
     char *href_param = pool_malloc(rq->sn->pool, href_len + 1);
     memcpy(href_param, href, href_len);

mercurial