Index: openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 27 Aug 2004 09:40:28 -0000 1.23 +++ openacs-4/packages/acs-content-repository/tcl/filter-procs.tcl 21 Jan 2005 20:41:56 -0000 1.24 @@ -182,19 +182,25 @@ return 0 } - # cache this query persistently for 1 hour - db_0or1row get_item_info "" -column_array item_info + set item_info(item_id) [::content::item::get_id -item_path $url \ + -root_folder_id $content_root \ + -resolve_index "f"] + set item_info(content_type) [::content::item::get_content_type \ + -item_id $item_id] + + # No item found, so do not handle this request + if { [string equal "" $item_info(item_id)] } { + set item_info(item_id) [::content::item::get_id -item_path $url \ + -root_folder_id $content_root \ + -resolve_index "f"] + set item_info(content_type) [::content::item::get_content_type \ + -item_id $item_id] + if { [string equal "" $item_info(item_id)] } { + ns_log notice "content::init: no content found for url $url" + return 0 + } + } - # No item found, so do not handle this request - if { ![info exists item_info] } { - db_0or1row get_template_info "" -column_array item_info - - if { ![info exists item_info] } { - ns_log notice "content::init: no content found for url $url" - return 0 - } - } - variable item_url set item_url $url