Index: openacs-4/packages/cms/www/modules/templates/template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cms/www/modules/templates/template.tcl 20 Apr 2001 20:51:10 -0000 1.1 +++ openacs-4/packages/cms/www/modules/templates/template.tcl 24 May 2001 23:57:17 -0000 1.2 @@ -16,30 +16,29 @@ # The root ID is to determine the appropriate path to the item set root_id [cm::modules::templates::getRootFolderID] -set db [template::get_db_handle] # resolve any symlinks -template::query resolved_template_id onevalue " +template::query get_id resolved_template_id onevalue " select content_symlink.resolve(:template_id) from dual " set template_id $resolved_template_id # get the path -template::query path onevalue " +template::query get_path path onevalue " select content_item.get_path(:template_id, :root_id) from dual " # check for valid template_id if { [template::util::is_nil path] } { - template::release_db_handle ns_log Notice "/templates/template.tcl - BAD TEMPLATE_ID - $template_id" template::forward "../sitemap/index?mount_point=templates&id=" } # get the context bar info -set query "select + +template::query context multirow "select t.tree_level, t.context_id, content_item.get_title(t.context_id) as title from ( select @@ -58,11 +57,9 @@ order by tree_level desc" -template::query context multirow $query - # find out which items this template is registered to -template::query items multirow " +template::query get_items items multirow " select content_item.get_title(item_id) title, item_id, use_context from @@ -74,7 +71,7 @@ # find out which types this template is registered to -template::query types multirow " +template::query get_types types multirow " select pretty_name, content_type, use_context from @@ -85,5 +82,3 @@ types.object_type = map.content_type order by types.pretty_name" - -template::release_db_handle \ No newline at end of file