Index: query.py
===================================================================
--- query.py	(revision 7326)
+++ query.py	(working copy)
@@ -686,6 +686,28 @@
                 'last_group_is_partial': last_group_is_partial,
                 'paginator': results}
     
+    def get_parameters(self):
+        #this is a workaround for a bug that arises because the request argument is called "row" 
+        #but the query language syntax expects "rows"
+        if self.constraints.has_key('row'):
+            self.rows = self.constraints['row']
+            del self.constraints['row']
+       
+        param = {'constraints':self.constraints,
+                 'col': self.cols,
+                 'order':self.order,
+                 'group': self.group,
+                 'row': self.rows,
+                 'page':self.page,
+                 'max':self.max}
+        if self.desc:
+            param['desc'] = True
+        if self.groupdesc:
+            param['groupdesc'] = True
+       
+       return param
+
+
 class QueryModule(Component):
 
     implements(IRequestHandler, INavigationContributor, IWikiSyntaxProvider,
@@ -756,7 +778,13 @@
             if user: 
                 qstring = qstring.replace('$USER', user) 
             self.log.debug('QueryModule: Using default query: %s', str(qstring)) 
-            constraints = Query.from_string(self.env, qstring).constraints 
+            default_query = Query.from_string(self.env, qstring)
+            constraints = default_query.constraints
+            # rather than screw around with additional tests all down the line, we'll
+            # just put fake "arguments" into the request object
+            for field, value in default_query.get_parameters().items():
+                if not req.args.has_key(field):
+                    req.args[field] = value
             # Ensure no field constraints that depend on $USER are used 
             # if we have no username. 
             for field, vals in constraints.items(): 

