Index: openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 20 Apr 2001 20:51:24 -0000 1.1 +++ openacs-4/packages/wp-slim/www/serve-presentation-revision.tcl 4 Oct 2001 04:29:01 -0000 1.2 @@ -14,6 +14,8 @@ page_signature owner_name owner_id + audience + background } set url [ad_conn url] @@ -23,9 +25,6 @@ ad_return_error "Wimpy Point" "Could not get a pres_item_id and a pres_revision_id out of url=$url" } -ad_require_permission $pres_item_id wp_edit_presentation - - set subsite_name [ad_conn package_url] regexp {^(.+)/$} $subsite_name match subsite_name @@ -34,14 +33,26 @@ p.page_signature, p.copyright_notice, p.public_p, - p.show_modified_p, - wp_presentation.get_audience_revision(:pres_revision_id) as audience, - wp_presentation.get_background_revision(:pres_revision_id) as background + p.show_modified_p from cr_wp_presentations p, cr_items i where i.item_id = :pres_item_id and p.presentation_id = :pres_revision_id } +db_1row get_aud_data { + select content as audience + from cr_revisions r, cr_wp_presentations_aud pa + where pa.presentation_id = :pres_revision_id + and r.revision_id = pa.id +} + +db_1row get_back_data { + select content as background + from cr_revisions r, cr_wp_presentations_back pb + where pb.presentation_id = :pres_revision_id + and r.revision_id = pb.id +} + set nav_bar [ad_context_bar [list "$subsite_name/presentation-top?[export_url_vars pres_item_id]" "$pres_title"] "One Revision"] -ad_return_template \ No newline at end of file +ad_return_template