Index: openacs-4/packages/categories/tcl/categories-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/categories/tcl/categories-procs.tcl,v diff -u -r1.29.2.1 -r1.29.2.2 --- openacs-4/packages/categories/tcl/categories-procs.tcl 10 Sep 2015 08:30:18 -0000 1.29.2.1 +++ openacs-4/packages/categories/tcl/categories-procs.tcl 3 Jul 2016 17:02:03 -0000 1.29.2.2 @@ -371,7 +371,11 @@ } { counts all direct sub categories } { - return [db_string select {}] + return [db_string count_children { + select count(*) + from categories + where parent_id=:category_id + }] } ad_proc -public category::get_parent {