Index: openacs-4/packages/acs-content-repository/tcl/filter-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs-oracle.xql,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/acs-content-repository/tcl/filter-procs-oracle.xql 21 Jan 2005 14:25:07 -0000 1.9
+++ openacs-4/packages/acs-content-repository/tcl/filter-procs-oracle.xql 21 Jan 2005 20:41:56 -0000 1.10
@@ -56,33 +56,6 @@
-
-
-
-
- select
- item_id, content_type
- from
- cr_items
- where
- item_id = content_item.get_id(:url, :content_root)
-
-
-
-
-
-
-
- select
- item_id, content_type
- from
- cr_items
- where
- item_id = content_item.get_id(:url, :template_root)
-
-
-
-
Index: openacs-4/packages/acs-content-repository/tcl/filter-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/filter-procs-postgresql.xql,v
diff -u -r1.11 -r1.12
--- openacs-4/packages/acs-content-repository/tcl/filter-procs-postgresql.xql 21 Jan 2005 14:25:07 -0000 1.11
+++ openacs-4/packages/acs-content-repository/tcl/filter-procs-postgresql.xql 21 Jan 2005 20:41:56 -0000 1.12
@@ -40,33 +40,6 @@
-
-
-
-
- select
- item_id, content_type
- from
- cr_items
- where
- item_id = content_item__get_id(:url, :content_root, 'f')
-
-
-
-
-
-
-
- select
- item_id, content_type
- from
- cr_items
- where
- item_id = content_item__get_id(:url, :template_root, 'f')
-
-
-
-
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 -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