Mercurial > p > roundup > code
changeset 2611:39a27b4e3296 maint-0.7
ZRoundup's search interface works now [SF#994957]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 21 Jul 2004 04:48:41 +0000 |
| parents | d1626710cff1 |
| children | 291c08916e5e |
| files | CHANGES.txt frontends/ZRoundup/ZRoundup.py |
| diffstat | 2 files changed, 28 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Wed Jul 21 01:25:55 2004 +0000 +++ b/CHANGES.txt Wed Jul 21 04:48:41 2004 +0000 @@ -1,6 +1,10 @@ This file contains the changes to the Roundup system over time. The entries are given with the most recent entry first. +2004-??-?? 0.7.7 +Fixed: +- ZRoundup's search interface works now (sf bug 994957) + 2004-07-21 0.7.6 Fixed: - rdbms backend full text search failure after import (sf bug 980314)
--- a/frontends/ZRoundup/ZRoundup.py Wed Jul 21 01:25:55 2004 +0000 +++ b/frontends/ZRoundup/ZRoundup.py Wed Jul 21 04:48:41 2004 +0000 @@ -14,7 +14,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: ZRoundup.py,v 1.17 2003-11-12 01:00:58 richard Exp $ +# $Id: ZRoundup.py,v 1.17.2.1 2004-07-21 04:48:41 richard Exp $ # ''' ZRoundup module - exposes the roundup web interface to Zope @@ -82,12 +82,33 @@ ''' def __init__(self, form): self.form = form + self.value = [] def __getitem__(self, item): - return FormItem(self.form[item]) + for entry in self.value: + if entry.name == item: + return entry + entry = self.form[item] + if isinstance(entry, type([])): + entry = map(FormItem, entry) + else: + entry = FormItem(entry) + return entry + def getvalue(self, key, default=None): + if self.form.has_key(key): + return self.form[key] + else: + return default def has_key(self, item): + for entry in self.value: + if entry.name == item: + return 1 return self.form.has_key(item) def keys(self): - return self.form.keys() + l = [e.name for e in self.value] + for name in self.form.keys(): + if name not in l: + l.append(name) + return l class ZRoundup(Item, PropertyManager, Implicit, Persistent): '''An instance of this class provides an interface between Zope and
