Mercurial > p > roundup > code
changeset 2363:c69b67905043 maint-0.7
backport from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 23 May 2004 23:26:30 +0000 |
| parents | 53c68d382b6c |
| children | 7a2e55a59928 |
| files | CHANGES.txt roundup/backends/back_anydbm.py roundup/backends/back_metakit.py roundup/backends/back_mysql.py roundup/backends/rdbms_common.py roundup/cgi/actions.py |
| diffstat | 6 files changed, 16 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Tue May 18 22:07:00 2004 +0000 +++ b/CHANGES.txt Sun May 23 23:26:30 2004 +0000 @@ -5,6 +5,7 @@ Fixed: - add "checked" to truth values for Boolean input - fixed import in metakit backend +- fix SearchAction use of Class.filter(), and clarify API docs for same 2004-05-17 0.7.2
--- a/roundup/backends/back_anydbm.py Tue May 18 22:07:00 2004 +0000 +++ b/roundup/backends/back_anydbm.py Sun May 23 23:26:30 2004 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -#$Id: back_anydbm.py,v 1.146.2.2 2004-05-16 09:33:13 richard Exp $ +#$Id: back_anydbm.py,v 1.146.2.3 2004-05-23 23:26:29 richard Exp $ '''This module defines a backend that saves the hyperdatabase in a database chosen by anydbm. It is guaranteed to always be available in python versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several @@ -1579,7 +1579,7 @@ "sort" and "group" are (dir, prop) where dir is '+', '-' or None and prop is a prop name or None - "search_matches" is {nodeid: marker} + "search_matches" is {nodeid: marker} or None The filter must match all properties specificed - but if the property value to match is a list, any one of the values in the
--- a/roundup/backends/back_metakit.py Tue May 18 22:07:00 2004 +0000 +++ b/roundup/backends/back_metakit.py Sun May 23 23:26:30 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: back_metakit.py,v 1.70.2.1 2004-05-18 22:06:08 richard Exp $ +# $Id: back_metakit.py,v 1.70.2.2 2004-05-23 23:26:29 richard Exp $ '''Metakit backend for Roundup, originally by Gordon McMillan. Known Current Bugs: @@ -1174,7 +1174,7 @@ "sort" and "group" are (dir, prop) where dir is '+', '-' or None and prop is a prop name or None - "search_matches" is {nodeid: marker} + "search_matches" is {nodeid: marker} or None The filter must match all properties specificed - but if the property value to match is a list, any one of the values in the
--- a/roundup/backends/back_mysql.py Tue May 18 22:07:00 2004 +0000 +++ b/roundup/backends/back_mysql.py Sun May 23 23:26:30 2004 +0000 @@ -499,7 +499,7 @@ "sort" and "group" are (dir, prop) where dir is '+', '-' or None and prop is a prop name or None - "search_matches" is {nodeid: marker} + "search_matches" is {nodeid: marker} or None The filter must match all properties specificed - but if the property value to match is a list, any one of the values in the
--- a/roundup/backends/rdbms_common.py Tue May 18 22:07:00 2004 +0000 +++ b/roundup/backends/rdbms_common.py Sun May 23 23:26:30 2004 +0000 @@ -1,4 +1,4 @@ -# $Id: rdbms_common.py,v 1.98.2.3 2004-05-16 22:00:08 richard Exp $ +# $Id: rdbms_common.py,v 1.98.2.4 2004-05-23 23:26:29 richard Exp $ ''' Relational database (SQL) backend common code. Basics: @@ -1991,7 +1991,7 @@ "sort" and "group" are (dir, prop) where dir is '+', '-' or None and prop is a prop name or None - "search_matches" is {nodeid: marker} + "search_matches" is {nodeid: marker} or None The filter must match all properties specificed - but if the property value to match is a list, any one of the values in the
--- a/roundup/cgi/actions.py Tue May 18 22:07:00 2004 +0000 +++ b/roundup/cgi/actions.py Sun May 23 23:26:30 2004 +0000 @@ -1,4 +1,4 @@ -#$Id: actions.py,v 1.27.2.1 2004-05-13 00:21:32 richard Exp $ +#$Id: actions.py,v 1.27.2.2 2004-05-23 23:26:30 richard Exp $ import re, cgi, StringIO, urllib, Cookie, time, random @@ -148,18 +148,20 @@ # edit the new way, query name not a key any more # see if we match an existing private query uid = self.db.getuid() - qids = self.db.query.filter({}, {'name': queryname, + qids = self.db.query.filter(None, {'name': queryname, 'private_for': uid}) if not qids: # ok, so there's not a private query for the current user # - see if there's a public one created by them - qids = self.db.query.filter({}, {'name': queryname, + qids = self.db.query.filter(None, {'name': queryname, 'private_for': -1, 'creator': uid}) if qids: - # edit query - qid = qids[0] - self.db.query.set(qid, klass=self.classname, url=url) + # edit query - make sure we get an exact match on the name + for qid in qids: + if queryname != self.db.query.get(qid, 'name'): + continue + self.db.query.set(qid, klass=self.classname, url=url) else: # create a query qid = self.db.query.create(name=queryname,
