Index: openacs-4/packages/user-tracking/www/contributions-chunk2-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/contributions-chunk2-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/user-tracking/www/contributions-chunk2-postgresql.xql 14 Apr 2005 15:44:27 -0000 1.1 +++ openacs-4/packages/user-tracking/www/contributions-chunk2-postgresql.xql 25 May 2006 13:31:53 -0000 1.2 @@ -52,14 +52,14 @@ - + - select count(*) from acs_objects a, acs_objects b - where b.object_id = :oneCom - and a.tree_sortkey between b.tree_sortkey - and tree_right(b.tree_sortkey) - and a.creation_user = :oneUser - and a.object_type = :object_type; + SELECT count(1) as result + FROM fs_files f,dotlrn_communities_full com,acs_objects o, acs_objects o2 + WHERE f.file_id = o.object_id + and com.community_id=:comm_id + and o.package_id= o2.object_id + and o2.context_id=com.package_id @@ -224,15 +224,15 @@ - + - select count(*) from acs_objects a, acs_objects b - where b.object_id = :oneCom - and a.tree_sortkey between b.tree_sortkey - and tree_right(b.tree_sortkey) - and a.object_type = :object_type; + select count(*) from acs_objects o, fs_files f, acs_objects o2, dotlrn_communities_full com + where f.file_id=o.object_id + and com.community_id= :oneCom + and o.package_id= o2.object_id + and o2.context_id=com.package_id - + \ No newline at end of file Index: openacs-4/packages/user-tracking/www/contributions-cards/files-card-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/user-tracking/www/contributions-cards/files-card-postgresql.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/user-tracking/www/contributions-cards/files-card-postgresql.xql 14 Apr 2005 15:44:29 -0000 1.1 +++ openacs-4/packages/user-tracking/www/contributions-cards/files-card-postgresql.xql 25 May 2006 13:33:27 -0000 1.2 @@ -16,7 +16,7 @@ o.modifying_user= :oneUser and o.creation_user <> :oneUser and com.community_id= :oneCom - and o2.object_id= file_storage__get_package_id(f.parent_id) + and o.package_id= o2.object_id and o2.context_id=com.package_id @@ -81,7 +81,7 @@ from acs_objects o, fs_files f, acs_objects o2, dotlrn_communities_full com where f.file_id=o.object_id and com.community_id= :oneCom - and o2.object_id= file_storage__get_package_id(f.parent_id) + and o.package_id= o2.object_id and o2.context_id=com.package_id @@ -93,7 +93,7 @@ - + select f.name, f.file_id, f.type, f.content_size, to_char(f.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, @@ -106,7 +106,7 @@ where f.file_id=o.object_id and o.creation_user= :oneUser and com.community_id= :oneCom - and o2.object_id= file_storage__get_package_id(f.parent_id) + and o.package_id= o2.object_id and o2.context_id=com.package_id @@ -127,7 +127,7 @@ - + select f.name, f.file_id, f.type, f.content_size, to_char(f.last_modified, 'YYYY-MM-DD HH24:MI:SS') as last_modified, @@ -139,7 +139,7 @@ from acs_objects o, fs_files f, acs_objects o2, dotlrn_communities_full com where f.file_id=o.object_id and com.community_id= :oneCom - and o2.object_id= file_storage__get_package_id(f.parent_id) + and o.package_id= o2.object_id and o2.context_id=com.package_id