Index: openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql,v
diff -u -N -r1.5 -r1.6
--- openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql 22 Sep 2003 11:55:37 -0000 1.5
+++ openacs-4/packages/cms/www/modules/sitemap/index-postgresql.xql 16 Nov 2004 22:32:50 -0000 1.6
@@ -37,7 +37,6 @@
-
@@ -80,10 +79,45 @@
+
+
+
+ select
+ case when i.content_type = 'content_folder' then 't' else'f' end as is_folder,
+ case when i.content_type = 'content_template' then 't' else 'f' end as is_template,
+ r.item_id, r.item_id as id, v.revision_id, r.resolved_id, r.is_symlink, r.name, i.parent_id,
+ coalesce(trim(
+ case when o.object_type = 'content_symlink' then r.label
+ when o.object_type = 'content_folder' then f.label
+ else coalesce(v.title, i.name) end),'-') as title,
+ case when i.publish_status = 'live' then to_char(u.publish_date, 'MM/DD/YYYY') else '-' end as publish_date,
+ o.object_type, t.pretty_name as content_type,
+ to_char(o.last_modified, 'MM/DD/YYYY HH24:MI') as last_modified_date,
+ coalesce(round(v.content_length::numeric / 1000.0, 2)::float8::text, '-') as file_size
+ from
+ cr_items i
+ LEFT OUTER JOIN
+ cr_revisions v ON i.latest_revision = v.revision_id
+ LEFT OUTER JOIN
+ cr_revisions u ON i.live_revision = u.revision_id
+ LEFT OUTER JOIN
+ cr_folders f ON i.item_id = f.folder_id,
+ cr_resolved_items r, acs_objects o, acs_object_types t
+ where
+ r.parent_id = $parent_var
+ and
+ r.resolved_id = i.item_id
+ and
+ i.item_id = o.object_id
+ and
+ i.content_type = t.object_type
+
+
+
- select content_symlink__resolve( :id )
+ select content_symlink__resolve( :item_id )
@@ -124,7 +158,7 @@
where
i.item_id = f.folder_id
and
- f.folder_id = :id
+ f.folder_id = :item_id