Index: openacs-4/packages/cms/www/modules/templates/template-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cms/www/modules/templates/template-delete.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/cms/www/modules/templates/template-delete.tcl 8 Jun 2001 01:44:53 -0000 1.3 +++ openacs-4/packages/cms/www/modules/templates/template-delete.tcl 19 Aug 2002 04:19:45 -0000 1.4 @@ -8,23 +8,10 @@ # Determine if the item has subitems is empty -template::query get_status empty_p onevalue " - select 't' from dual - where not exists ( - select - 1 - from - cr_templates t, acs_objects o - where - o.object_id = t.template_id - and - o.context_id = :template_id - and not exists (select 1 from cr_revisions - where revision_id = t.template_id)) -" +set empty_p [db_string get_status "" -default ""] # If nonempty, show error -if { [template::util::is_nil empty_p] } { +if { [string equal $empty_p ""] } { set message "This item contains subitems and cannot be deleted" set return_url "modules/templates/index" set passthrough [list [list id $template_id] [list parent_id $parent_id]]