Index: openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 13 Mar 2002 21:17:12 -0000 1.9 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 2 Apr 2002 06:21:24 -0000 1.10 @@ -46,6 +46,7 @@ fs_folders_and_files.live_revision, fs_folders_and_files.type, to_char(fs_folders_and_files.last_modified, 'YYYY-MM-DD HH24:MI') as last_modified, + case when fs_folders_and_files.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p, fs_folders_and_files.content_size, decode(acs_permission.permission_p(fs_folders_and_files.file_id, :user_id, 'write'), 'f', 0, 1) as write_p, decode(acs_permission.permission_p(fs_folders_and_files.file_id, :user_id, 'delete'), 'f', 0, 1) as delete_p, Index: openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql,v diff -u -r1.16 -r1.17 --- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 13 Mar 2002 21:17:12 -0000 1.16 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 2 Apr 2002 06:21:24 -0000 1.17 @@ -38,6 +38,7 @@ fs_folders_and_files.live_revision, fs_folders_and_files.type, to_char(fs_folders_and_files.last_modified, 'YYYY-MM-DD HH24:MI') as last_modified, + case when fs_folders_and_files.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p, fs_folders_and_files.content_size, case when acs_permission__permission_p(fs_folders_and_files, :user_id, 'write') = 'f' then 0 else 1 end as write_p, case when acs_permission__permission_p(fs_folders_and_files, :user_id, 'delete') = 'f' then 0 else 1 end as delete_p, Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 22 Feb 2002 21:37:12 -0000 1.9 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 2 Apr 2002 06:21:24 -0000 1.10 @@ -301,6 +301,7 @@ ad_proc -public get_folder_contents { {-folder_id:required} {-user_id ""} + {-n_past_days "-1"} } { Retrieve the contents of the specified folder in the form of a list of ns_sets, one for each row returned. The keys for each row are as @@ -312,6 +313,7 @@ @param folder_id The folder for which to retrieve contents @param user_id The viewer of the contents (to make sure they have permission) + @param n_past_days Mark files that are newer than the past N days as new } { if {[empty_string_p $user_id]} { set user_id [acs_magic_object "the_public"]