Index: openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl,v diff -u -r1.8.2.2 -r1.8.2.3 --- openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl 6 Oct 2022 15:35:36 -0000 1.8.2.2 +++ openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl 6 Oct 2022 15:39:00 -0000 1.8.2.3 @@ -13,21 +13,32 @@ download_url img_id image_p -} sub_files get_children " -select package_id,name,cr.title,cr.item_id,revision_id,mime_type, to_char(publish_date, 'yyyy-mm-dd, HH:MM') as date - from cr_items ci inner join cr_revisions cr on (ci.item_id = cr.item_id) -join acs_objects o on o.object_id=cr.item_id - where parent_id = :parent_id and revision_id = ci.live_revision - AND cr.mime_type LIKE 'image/%' - ORDER BY publish_date DESC" { - ::xowiki::Package initialize -package_id $package_id - set item [::xowiki::File get_instance_from_db -item_id $item_id] - set url [$item pretty_link] - set download_url [export_vars -base $url {{m download}}] - set delete_url [export_vars -base $url {{m delete} return_url}] - set img_id "preview-img-${revision_id}" - set image_p [expr {$mime_type in {"image/jpeg" "image/png" "image/gif"}}] - } +} sub_files get_children { + select package_id, + name, + cr.title, + cr.item_id, + revision_id, + mime_type, + to_char(publish_date, 'yyyy-mm-dd, HH:MM') as date + from cr_items ci + inner join cr_revisions cr + on ci.item_id = cr.item_id + join acs_objects o + on o.object_id = cr.item_id + where parent_id = :parent_id + and revision_id = ci.live_revision + and cr.mime_type like 'image/%' + order by publish_date desc +} { + ::xowiki::Package initialize -package_id $package_id + set item [::xowiki::File get_instance_from_db -item_id $item_id] + set url [$item pretty_link] + set download_url [export_vars -base $url {{m download}}] + set delete_url [export_vars -base $url {{m delete} return_url}] + set img_id "preview-img-${revision_id}" + set image_p [expr {$mime_type in {"image/jpeg" "image/png" "image/gif"}}] +} set server_url ""