diff roundup/cgi/templating.py @ 3051:ef9f9c8b949c maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Tue, 04 Jan 2005 01:47:20 +0000
parents 4f4ad11ab69c
children 4163b69f8569
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Tue Jan 04 01:38:12 2005 +0000
+++ b/roundup/cgi/templating.py	Tue Jan 04 01:47:20 2005 +0000
@@ -1975,9 +1975,13 @@
         if filter and self.filter:
             l.append(s%(sc+'filter', ','.join(self.filter)))
         if filterspec:
+            props = self.client.db.getclass(self.classname).getprops()
             for k,v in self.filterspec.items():
                 if type(v) == type([]):
-                    l.append(s%(k, ','.join(v)))
+                    if isinstance(props[k], hyperdb.String):
+                        l.append(s%(k, ' '.join(v)))
+                    else:
+                        l.append(s%(k, ','.join(v)))
                 else:
                     l.append(s%(k, v))
         if self.search_text:
@@ -2023,10 +2027,14 @@
             l.append(sc+'startwith=%s'%self.startwith)
 
         # finally, the remainder of the filter args in the request
+        props = self.client.db.getclass(self.classname).getprops()
         for k,v in self.filterspec.items():
             if not args.has_key(k):
                 if type(v) == type([]):
-                    l.append('%s=%s'%(k, ','.join(v)))
+                    if isinstance(props[k], hyperdb.String):
+                        l.append(s%(k, ' '.join(v)))
+                    else:
+                        l.append(s%(k, ','.join(v)))
                 else:
                     l.append('%s=%s'%(k, v))
         return '%s?%s'%(url, '&'.join(l))

Roundup Issue Tracker: http://roundup-tracker.org/