Index: openacs-4/packages/categories/www/categories-browse.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/categories-browse.tcl,v
diff -u -r1.12.2.1 -r1.12.2.2
--- openacs-4/packages/categories/www/categories-browse.tcl	10 Sep 2015 08:30:19 -0000	1.12.2.1
+++ openacs-4/packages/categories/www/categories-browse.tcl	11 Nov 2016 14:38:45 -0000	1.12.2.2
@@ -160,7 +160,12 @@
     }
 
     # execute query to count objects and pages
-    paginator create get_categorized_object_count $p_name "" -pagesize 20 -groupsize 10 -contextual -timeout 0
+    # apisano: this particular statement contains $ variables, so it
+    # cannot be passed by name to the paginator, or such variables
+    # won't be resolved correctly insite the machinery.  Just compute
+    # the sql text here and pass it as is.    
+    set sql [db_map get_categorized_object_count]
+    paginator create -- $p_name $sql -pagesize 20 -groupsize 10 -contextual -timeout 0
 
     set first_row [paginator get_row $p_name $page]
     set last_row [paginator get_row_last $p_name $page]