Index: openacs-4/packages/lars-blogger/www/blog.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/blog.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/lars-blogger/www/blog.tcl 14 Sep 2002 22:17:41 -0000 1.6 +++ openacs-4/packages/lars-blogger/www/blog.tcl 14 Sep 2002 22:27:25 -0000 1.7 @@ -37,27 +37,8 @@ set count 0 -db_multirow -extend { - row_number edit_url delete_url publish_url - revoke_url comments_view_url comment_add_url google_url -} blog blog { *SQL* } { - set row_number [incr count] +db_multirow blog blog { *SQL* } - set return_url "${package_url}one-entry?[export_vars { entry_id }]" - set edit_url "${package_url}admin/entry-edit?[export_vars { entry_id return_url }]" - set delete_url "${package_url}admin/entry-delete?[export_vars { entry_id return_url }]" - set publish_url "${package_url}admin/entry-publish?[export_vars { entry_id return_url }]" - set revoke_url "${package_url}admin/entry-revoke?[export_vars { entry_id return_url }]" - set entry_archive_url "${package_url}one-entry?[export_vars { entry_id }]" - - set comment_add_url "[general_comments_package_url]comment-add?[export_vars { { object_id $entry_id } { object_name {[ad_html_to_text -- $title]} } { return_url "${package_url}flush-cache?[export_vars { return_url }]"} }]" - set comments_view_url "${package_url}one-entry?[export_vars { entry_id }]" - - set google_url "http://www.google.com/search?[export_vars { {q $title } }]" - - set content [ns_adp_parse -string $content] -} - set archive_url "${package_url}archive/" set arrow_url "${package_url}graphics/arrow-box.gif" Index: openacs-4/packages/lars-blogger/www/entry-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lars-blogger/www/entry-chunk.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/lars-blogger/www/entry-chunk.tcl 14 Sep 2002 22:17:41 -0000 1.2 +++ openacs-4/packages/lars-blogger/www/entry-chunk.tcl 14 Sep 2002 22:27:25 -0000 1.3 @@ -2,12 +2,16 @@ # blog:onerow # show_comments_p:onevalue,optional # retrun_url:onevalue,optional +# package_id:optional if { ![exists_and_not_null show_comments_p] } { set show_comments_p "f" } -set package_id [ad_conn package_id] +# Maybe package_id is supplied, but maybe not +if { ![info exists package_id] } { + set package_id [ad_conn package_id] +} set admin_p [ad_permission_p $package_id admin] @@ -33,6 +37,7 @@ set blog(entry_archive_url) "${package_url}one-entry?[export_vars { entry_id }]" set blog(google_url) "http://www.google.com/search?[export_vars { {q $blog(title) } }]" set blog(comment_add_url) "[general_comments_package_url]comment-add?[export_vars { { object_id $entry_id } { object_name $blog(title) } { return_url "${package_url}flush-cache?[export_vars { return_url }]"} }]" +set blog(comments_view_url) "${package_url}one-entry?[export_vars { entry_id }]" if { [string equal $show_comments_p "t"] } { set comments_html [general_comments_get_comments -print_content_p 1 $entry_id]