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 -r1.11.2.1 -r1.11.2.2 --- openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 12 Sep 2015 11:06:17 -0000 1.11.2.1 +++ openacs-4/packages/file-storage/tcl/file-storage-callback-procs.tcl 2 Jan 2016 20:13:29 -0000 1.11.2.2 @@ -60,21 +60,7 @@ } { # 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 fs_datasource {} -column_array datasource return [list object_id $object_id \ title $datasource(title) \ @@ -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" }