Index: openacs-4/packages/lorsm/templates/lorsm-default.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/lorsm/templates/lorsm-default.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/lorsm/templates/lorsm-default.tcl 18 May 2005 07:45:24 -0000 1.8 +++ openacs-4/packages/lorsm/templates/lorsm-default.tcl 22 Dec 2006 18:16:10 -0000 1.9 @@ -1,51 +1,17 @@ -# Put the current revision's attributes in a onerow datasource named "content". -# The detected content type is "content_revision". +# this is only called for items with no content of their own. This +# means we want to see whats inside this item. -lorsm::get_content content_revision - -if { [info exists content(item_id)] } { - if { ![string equal -length 4 "text" $content(mime_type)] } { - # It's a file. - cr_write_content -revision_id $content(revision_id) - ad_script_abort - } elseif { [string equal "text/css" $content(mime_type)]} { - # we treat CSS files as if they would be binaries and deliver - # them straight to the browser (maybe we should do the same - # thing for XML files (?) - cr_write_content -revision_id $content(revision_id) - } - - - # Ordinary text/* mime type. - template::util::array_to_vars content - - - - set text [cr_write_content -string -revision_id $revision_id] - - if { ![string equal "text/html" $content(mime_type)] && ![string equal "text/xml" $content(mime_type)] } { - set text [ad_html_text_convert -from $mime_type -to text/html $text] - } -} - set imsitem_id [lorsm::get_ims_item_id] -set html_document_p 0 -if { [string eq $content(mime_type) "text/html"] && [regexp -nocase {} $text match] } { - set html_document_p 1 - # parent window - regsub -all -nocase {target=.?(_top)} $text {target="content"} text -} - # We set all this blank variables in the case that the ims_item does # not have a resource id set title "" multirow create children child_item_id child_title set parent_item "" -set community_url [dotlrn_community::get_community_url [dotlrn_community::get_community_id]] +#set community_url [dotlrn_community::get_community_url [dotlrn_community::get_community_id]] +set community_url "" - # There are pages that are not necesarily part of one ims_item_id # but are part of a particular resource. if { [info exists content(item_id)] } { @@ -55,8 +21,6 @@ set write_p 0 } - - if {![empty_string_p $imsitem_id]} { set imsitem_id [content::item::get_live_revision -item_id $imsitem_id] # See if they have write and the object is browser editable to offer an edit link.