Index: openacs-4/packages/dotlrn-fs/www/all-objects-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/all-objects-oracle.xql 30 Jul 2002 12:27:47 -0000 1.1 @@ -0,0 +1,34 @@ + + + + oracle8.1.6 + + + + select fs_objects.*, + fs_folders.name as folder_name + from fs_objects, + fs_folders + where fs_objects.object_id in (select acs_objects.object_id + from acs_objects + connect by acs_objects.context_id = prior acs_objects.object_id + start with acs_objects.context_id in (select site_node_object_mappings.object_id + from site_node_object_mappings, + site_nodes, + fs_root_folders + where site_node_object_mappings.node_id = site_nodes.node_id + and site_node_object_mappings.object_id = fs_root_folders.folder_id + and site_nodes.parent_id in (select sn.node_id + from site_nodes sn, + apm_packages ap + where sn.object_id = ap.package_id + and ap.package_key = :dotlrn_package_key))) + and fs_objects.parent_id = fs_folders.folder_id + and fs_objects.type <> 'folder' + and fs_objects.last_modified >= (sysdate - :n_past_days) + and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') + [ad_order_by_from_sort_spec $orderby $table_def] + + + + Index: openacs-4/packages/dotlrn-fs/www/all-objects-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/all-objects-postgresql.xql 30 Jul 2002 12:27:47 -0000 1.1 @@ -0,0 +1,34 @@ + + + + postgresql7.1 + + + + select fs_objects.*, + fs_folders.name as folder_name + from fs_objects, + fs_folders + where fs_objects.object_id in (select acs_objects.object_id + from acs_objects + where acs_objects.tree_sortkey between tree_left(acs_objects.tree_sortkey) and tree_right(acs_objects.tree_sortkey) + and acs_objects.context_id in (select site_node_object_mappings.object_id + from site_node_object_mappings, + site_nodes, + fs_root_folders + where site_node_object_mappings.node_id = site_nodes.node_id + and site_node_object_mappings.object_id = fs_root_folders.folder_id + and site_nodes.parent_id in (select sn.node_id + from site_nodes sn, + apm_packages ap + where sn.object_id = ap.package_id + and ap.package_key = :dotlrn_package_key))) + and fs_objects.parent_id = fs_folders.folder_id + and fs_objects.type <> 'folder' + and fs_objects.last_modified >= (sysdate - :n_past_days) + and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') + [ad_order_by_from_sort_spec $orderby $table_def] + + + + Index: openacs-4/packages/dotlrn-fs/www/all-objects.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/all-objects.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-fs/www/all-objects.tcl 22 Jun 2002 15:52:34 -0000 1.8 +++ openacs-4/packages/dotlrn-fs/www/all-objects.tcl 30 Jul 2002 12:27:47 -0000 1.9 @@ -68,38 +68,12 @@ set dotlrn_package_key [dotlrn::package_key] -set sql " - select fs_objects.*, - fs_folders.name as folder_name - from fs_objects, - fs_folders - where fs_objects.object_id in (select acs_objects.object_id - from acs_objects - connect by acs_objects.context_id = prior acs_objects.object_id - start with acs_objects.context_id in (select site_node_object_mappings.object_id - from site_node_object_mappings, - site_nodes, - fs_root_folders - where site_node_object_mappings.node_id = site_nodes.node_id - and site_node_object_mappings.object_id = fs_root_folders.folder_id - and site_nodes.parent_id in (select sn.node_id - from site_nodes sn, - apm_packages ap - where sn.object_id = ap.package_id - and ap.package_key = :dotlrn_package_key))) - and fs_objects.parent_id = fs_folders.folder_id - and fs_objects.type <> 'folder' - and fs_objects.last_modified >= (sysdate - :n_past_days) - and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') - [ad_order_by_from_sort_spec $orderby $table_def] -" - set table [ad_table \ -Tmissing_text {
No contents found.
} \ -Torderby $orderby \ -Ttable_extra_html {width="95%"} \ select_folder_contents \ - $sql \ + "" \ $table_def ] Index: openacs-4/packages/dotlrn-fs/www/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/index-oracle.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/index-oracle.xql 30 Jul 2002 12:27:47 -0000 1.1 @@ -0,0 +1,48 @@ + + + + oracle8.1.6 + + + + select folders.* + from (select fs_folders.folder_id, + fs_folders.parent_id, + fs_folders.name, + nvl ((select sum(fs_files.content_size) as content_size + from fs_files + where fs_files.parent_id in (select cr_items.item_id + from cr_items + connect by cr_items.parent_id = prior cr_items.item_id + start with cr_items.parent_id = fs_folders.folder_id) + or fs_files.parent_id = fs_folders.folder_id), 0) as content_size, + '' as url + from fs_folders + where fs_folders.folder_id in (select fsrf.folder_id + from fs_root_folders fsrf + where fsrf.folder_id <> (select snom1.object_id + from site_node_object_mappings snom1, + site_nodes sn1, + fs_root_folders fsrf1 + where snom1.node_id = sn1.node_id + and sn1.object_id = (select min(ap1.package_id) + from apm_packages ap1 + where package_key = :fs_package_key) + and fsrf1.folder_id = snom1.object_id)) + or fs_folders.parent_id = (select snom2.object_id + from site_node_object_mappings snom2, + site_nodes sn2, + fs_root_folders fsrf2 + where snom2.node_id = sn2.node_id + and sn2.object_id = (select min(ap2.package_id) + from apm_packages ap2 + where ap2.package_key = :fs_package_key) + and fsrf2.folder_id = snom2.object_id) + order by content_size desc, + fs_folders.name) folders + where rownum < 11 + and content_size > 0 + + + + Index: openacs-4/packages/dotlrn-fs/www/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/index-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-fs/www/index-postgresql.xql 30 Jul 2002 12:27:47 -0000 1.1 @@ -0,0 +1,48 @@ + + + + postgresql7.1 + + + + select folders.* + from (select fs_folders.folder_id, + fs_folders.parent_id, + fs_folders.name, + nvl ((select sum(fs_files.content_size) as content_size + from fs_files + where fs_files.parent_id in (select cr_items.item_id + from cr_items + where cr_items.tree_sortkey between tree_left(cr_items.tree_sortkey) and tree_right(cr_items.tree_sortkey) + and cr_items.parent_id = fs_folders.folder_id) + or fs_files.parent_id = fs_folders.folder_id), 0) as content_size, + '' as url + from fs_folders + where fs_folders.folder_id in (select fsrf.folder_id + from fs_root_folders fsrf + where fsrf.folder_id <> (select snom1.object_id + from site_node_object_mappings snom1, + site_nodes sn1, + fs_root_folders fsrf1 + where snom1.node_id = sn1.node_id + and sn1.object_id = (select min(ap1.package_id) + from apm_packages ap1 + where package_key = :fs_package_key) + and fsrf1.folder_id = snom1.object_id)) + or fs_folders.parent_id = (select snom2.object_id + from site_node_object_mappings snom2, + site_nodes sn2, + fs_root_folders fsrf2 + where snom2.node_id = sn2.node_id + and sn2.object_id = (select min(ap2.package_id) + from apm_packages ap2 + where ap2.package_key = :fs_package_key) + and fsrf2.folder_id = snom2.object_id) + order by content_size desc, + fs_folders.name) folders + where rownum < 11 + and content_size > 0 + + + + Index: openacs-4/packages/dotlrn-fs/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-fs/www/index.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-fs/www/index.tcl 22 Jun 2002 15:52:34 -0000 1.3 +++ openacs-4/packages/dotlrn-fs/www/index.tcl 30 Jul 2002 12:27:47 -0000 1.4 @@ -40,45 +40,7 @@ set fs_package_key [dotlrn_fs::package_key] -db_multirow folders select_top_offending_folders { - select folders.* - from (select fs_folders.folder_id, - fs_folders.parent_id, - fs_folders.name, - nvl ((select sum(fs_files.content_size) as content_size - from fs_files - where fs_files.parent_id in (select cr_items.item_id - from cr_items - connect by cr_items.parent_id = prior cr_items.item_id - start with cr_items.parent_id = fs_folders.folder_id) - or fs_files.parent_id = fs_folders.folder_id), 0) as content_size, - '' as url - from fs_folders - where fs_folders.folder_id in (select fsrf.folder_id - from fs_root_folders fsrf - where fsrf.folder_id <> (select snom1.object_id - from site_node_object_mappings snom1, - site_nodes sn1, - fs_root_folders fsrf1 - where snom1.node_id = sn1.node_id - and sn1.object_id = (select min(ap1.package_id) - from apm_packages ap1 - where package_key = :fs_package_key) - and fsrf1.folder_id = snom1.object_id)) - or fs_folders.parent_id = (select snom2.object_id - from site_node_object_mappings snom2, - site_nodes sn2, - fs_root_folders fsrf2 - where snom2.node_id = sn2.node_id - and sn2.object_id = (select min(ap2.package_id) - from apm_packages ap2 - where ap2.package_key = :fs_package_key) - and fsrf2.folder_id = snom2.object_id) - order by content_size desc, - fs_folders.name) folders - where rownum < 11 - and content_size > 0 -} { +db_multirow folders select_top_offending_folders {} { set url [site_node_object_map::get_url -object_id $folder_id] }