Index: openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 27 Oct 2014 16:41:31 -0000 1.11 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 7 Aug 2017 23:48:11 -0000 1.12 @@ -60,22 +60,8 @@ } { # We probably don't need the whole big query here. TODO: Review. - db_0or1row fs_datasource { - select r.revision_id as object_id, - i.name as title, - case i.storage_type - when 'lob' then r.lob::text - when 'file' then '[cr_fs_path]' || r.content - else r.content - end as content, - r.mime_type as mime, - '' as keywords, - i.storage_type as storage_type - from cr_items i, cr_revisions r - where r.item_id = i.item_id - and r.revision_id = :object_id - } -column_array datasource - + db_0or1row dbqd.file-storage.tcl.file-storage-callback-procs.fs_datasource {} -column_array datasource + return [list object_id $object_id \ title $datasource(title) \ content $datasource(content) \ @@ -90,7 +76,9 @@ Return the URL to the file_storage_object } { set item_id [content::revision::item_id -revision_id $object_id] - set name [db_string item "select name from cr_items where item_id = :item_id" -default ""] + set name [db_string item { + select name from cr_items where item_id = :item_id + } -default ""] return "[ad_url]/file/$item_id/$name" } @@ -222,3 +210,9 @@ } + +# Local variables: +# mode: tcl +# tcl-indent-level: 4 +# indent-tabs-mode: nil +# End: