Index: openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 24 Apr 2001 23:59:24 -0000 1.2 +++ openacs-4/packages/acs-tcl/tcl/object-type-procs.tcl 12 May 2001 18:17:17 -0000 1.3 @@ -33,30 +33,10 @@ set result "" if { [exists_and_not_null object_type] } { - - set sql " - select object_type, - pretty_name, - '' as indent - from acs_object_types - start with object_type = :object_type - connect by prior supertype = object_type - order by level desc - " - + set sql [db_map object_type_not_null] set join_string " > " - } else { - - set sql " - select object_type, - pretty_name, - replace(lpad(' ', (level - 1) * $indent_width), ' ', '$indent_string') as indent - from acs_object_types - start with supertype is null - connect by supertype = prior object_type - " - + set sql [db_map object_type_is_null] } set i 0 @@ -75,53 +55,3 @@ } - -ad_proc -public acs_object_type_hierarchy_pg_sql { - - -object_type - -indent_string - -indent_width - -} { - - Returns pg version of sql for acs_object_type_hierarchy routine. This - routine is called by the query dispatcher. - - @author Dan Wickstrom (dcwickstrom@earthlink.net) - @creation-date April 24, 2001 - @param object_type the object type for which to show a hierarchy for. - @param indent_string string with which to lpad - @param indent_width number of times to insert indent_string into indentation - -} { - - if { [exists_and_not_null object_type] } { - - set sql " - select ot2.object_type, - ot2.pretty_name, - '' as indent, - tree_level(ot2.tree_sortkey) as level - from acs_object_types ot1, acs_object_types ot2 - where ot1.object_type = :object_type - and ot2.tree_sortkey <= ot1.tree_sortkey - and ot1.tree_sortkey like (ot2.tree_sortkey || '%') - order by level desc - " - - } else { - #FIXME: what is the equivalent of oracle's replace function? - set sql " - select object_type, - pretty_name, - replace(lpad(' ', (tree_level(tree_sortkey) - 1) * $indent_width), ' ', '$indent_string') as indent - from acs_object_types - where tree_sortkey like (select tree_sortkey || '%' - from acs_object_types - where supertype is null) - " - - } - - return $sql -}