Skip to content

Commit 0efd2ae

Browse files
author
Richard Jones
committed
backporting fixes from HEAD
1 parent 47d9c61 commit 0efd2ae

File tree

12 files changed

+123
-59
lines changed

12 files changed

+123
-59
lines changed

CHANGES.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4+
2003-??-?? 0.5.6
5+
- fixed templating filter function arguments (sf bug 678911)
6+
- fixed multiselect in searching (sf bug 676874)
7+
- fixed parsing of content-disposition filenames (sf bug 675116)
8+
- added 'h' to roundup-server optarg list (sf bug 674070)
9+
- fixed doc for db.history in anydbm and rdbms_common (sf bug 679221)
10+
- fixed roundup-reminder (sf bug 681042)
11+
- fixed int assumptions about Number values (sf bug 677762)
12+
- clarified licensing
13+
14+
415
2003-01-24 0.5.5
516
- fixed rdbms searching by ID (sf bug 666615)
617
- fixed metakit searching by ID

COPYING.txt

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Roundup Licensing
2+
-----------------
3+
14
Copyright (c) 2002 eKit.com Inc (http://www.ekit.com/)
25

36
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -18,11 +21,12 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1821
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1922
SOFTWARE.
2023

24+
2125
Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
2226

2327
This module is free software, and you may redistribute it and/or modify
24-
under the same terms as Python, so long as this copyright message and
25-
disclaimer are retained in their original form.
28+
under the same terms as Python 2.1 (the PSF LICENSE AGREEMENT), so long
29+
as this copyright message and disclaimer are retained in their original form.
2630

2731
IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
2832
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
@@ -35,6 +39,22 @@ FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
3539
BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
3640
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3741

38-
The stylesheet included with this package has been copied from the Zope
39-
management interface and presumably belongs to Digital Creations.
42+
43+
PageTemplates Licensing
44+
-----------------------
45+
46+
Portions of this code (roundup.cgi.PageTemplates, roundup.cgi.TAL and
47+
roundup.cgi.ZTUtils) have been copied from Zope. They have been modified in
48+
the following manner:
49+
50+
- removal of unit tests, Zope-specific code and support files from
51+
PageTemplates: PageTemplateFile.py, ZPythonExpr.py, ZRPythonExpr.py,
52+
ZopePageTemplate.py, examples, help, tests, CHANGES.txt, HISTORY.txt,
53+
version.txt and www. From TAL: DummyEngine.py, HISTORY.txt, CHANGES.txt,
54+
benchmark, driver.py, markbench.py, ndiff.py, runtest.py, setpath.py,
55+
tests and timer.py. From ZTUtils: SimpleTree.py, Zope.py, CHANGES.txt and
56+
HISTORY.txt.
57+
- editing to remove dependencies on Zope modules (see files for change notes)
58+
59+
The license for this code is in doc/ZPL.txt.
4060

README.txt

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,4 @@ See the index.txt file in the "doc" directory.
1616
License
1717
=======
1818

19-
Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
20-
This module is free software, and you may redistribute it and/or modify
21-
under the same terms as Python, so long as this copyright message and
22-
disclaimer are retained in their original form.
23-
24-
IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR
25-
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING
26-
OUT OF THE USE OF THIS CODE, EVEN IF BIZAR SOFTWARE PTY LTD HAS BEEN ADVISED
27-
OF THE POSSIBILITY OF SUCH DAMAGE.
28-
29-
BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
30-
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31-
FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
32-
BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
33-
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
34-
35-
36-
PageTemplates Licensing
37-
-----------------------
38-
39-
Portions of this code (roundup.cgi.PageTemplates, roundup.cgi.TAL and
40-
roundup.cgi.ZTUtils) have been copied from Zope. They have been modified in
41-
the following manner:
42-
43-
- removal of unit tests, Zope-specific code and support files from
44-
PageTemplates: PageTemplateFile.py, ZPythonExpr.py, ZRPythonExpr.py,
45-
ZopePageTemplate.py, examples, help, tests, CHANGES.txt, HISTORY.txt,
46-
version.txt and www. From TAL: DummyEngine.py, HISTORY.txt, CHANGES.txt,
47-
benchmark, driver.py, markbench.py, ndiff.py, runtest.py, setpath.py,
48-
tests and timer.py. From ZTUtils: SimpleTree.py, Zope.py, CHANGES.txt and
49-
HISTORY.txt.
50-
- editing to remove dependencies on Zope modules (see files for change notes)
51-
52-
The license for this code is in doc/ZPL.txt.
53-
19+
See COPYING.txt

roundup/admin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: admin.py,v 1.35 2002-10-03 06:56:28 richard Exp $
19+
# $Id: admin.py,v 1.35.2.1 2003-02-06 05:44:49 richard Exp $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -497,7 +497,7 @@ def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')):
497497
elif isinstance(proptype, hyperdb.Boolean):
498498
props[key] = value.lower() in ('yes', 'true', 'on', '1')
499499
elif isinstance(proptype, hyperdb.Number):
500-
props[key] = int(value)
500+
props[key] = float(value)
501501

502502
# try the set
503503
try:
@@ -682,7 +682,7 @@ def do_create(self, args, pwre = re.compile(r'{(\w+)}(.+)')):
682682
elif isinstance(proptype, hyperdb.Boolean):
683683
props[propname] = value.lower() in ('yes', 'true', 'on', '1')
684684
elif isinstance(proptype, hyperdb.Number):
685-
props[propname] = int(value)
685+
props[propname] = float(value)
686686

687687
# check for the key property
688688
propname = cl.getkey()

roundup/backends/back_anydbm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.96 2003-01-08 05:39:40 richard Exp $
18+
#$Id: back_anydbm.py,v 1.96.2.1 2003-02-06 05:44:49 richard Exp $
1919
'''
2020
This module defines a backend that saves the hyperdatabase in a database
2121
chosen by anydbm. It is guaranteed to always be available in python
@@ -1349,7 +1349,7 @@ def history(self, nodeid):
13491349
13501350
The returned list contains tuples of the form
13511351
1352-
(date, tag, action, params)
1352+
(nodeid, date, tag, action, params)
13531353
13541354
'date' is a Timestamp object specifying the time of the change and
13551355
'tag' is the journaltag specified when the database was opened.

roundup/backends/rdbms_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: rdbms_common.py,v 1.27.2.1 2003-01-12 23:57:16 richard Exp $
1+
# $Id: rdbms_common.py,v 1.27.2.2 2003-02-06 05:44:49 richard Exp $
22
''' Relational database (SQL) backend common code.
33
44
Basics:
@@ -1540,7 +1540,7 @@ def history(self, nodeid):
15401540
15411541
The returned list contains tuples of the form
15421542
1543-
(date, tag, action, params)
1543+
(nodeid, date, tag, action, params)
15441544
15451545
'date' is a Timestamp object specifying the time of the change and
15461546
'tag' is the journaltag specified when the database was opened.

roundup/cgi/client.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.65.2.2 2003-01-24 06:25:16 richard Exp $
1+
# $Id: client.py,v 1.65.2.3 2003-02-06 05:44:49 richard Exp $
22

33
__doc__ = """
44
WWW request handler (also used in the stand-alone server).
@@ -934,7 +934,15 @@ def searchAction(self):
934934
props = self.db.classes[self.classname].getprops()
935935
for key in self.form.keys():
936936
if not props.has_key(key): continue
937-
if not self.form[key].value: continue
937+
if isinstance(self.form[key], type([])):
938+
# search for at least one entry which is not empty
939+
for minifield in self.form[key]:
940+
if minifield.value:
941+
break
942+
else:
943+
continue
944+
else:
945+
if not self.form[key].value: continue
938946
self.form.value.append(cgi.MiniFieldStorage(':filter', key))
939947

940948
# handle saving the query params
@@ -1326,7 +1334,7 @@ def parsePropsFromForm(db, cl, form, nodeid=0, num_re=re.compile('^\d+$')):
13261334
elif isinstance(proptype, hyperdb.Boolean):
13271335
value = value.lower() in ('yes', 'true', 'on', '1')
13281336
elif isinstance(proptype, hyperdb.Number):
1329-
value = int(value)
1337+
value = float(value)
13301338

13311339
# register this as received if required?
13321340
if propname in required and value is not None:

roundup/cgi/templating.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,10 @@ def filter(self, request=None):
391391
filterspec = request.filterspec
392392
sort = request.sort
393393
group = request.group
394+
else:
395+
filterspec = {}
396+
sort = (None,None)
397+
group = (None,None)
394398
if self.classname == 'user':
395399
klass = HTMLUser
396400
else:

roundup/mailgw.py

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ class node. Any parts of other types are each stored in separate files
7373
an exception, the original message is bounced back to the sender with the
7474
explanatory message given in the exception.
7575
76-
$Id: mailgw.py,v 1.104 2003-01-06 21:28:38 richard Exp $
76+
$Id: mailgw.py,v 1.104.2.1 2003-02-06 05:44:49 richard Exp $
7777
'''
7878

7979
import string, re, os, mimetools, cStringIO, smtplib, socket, binascii, quopri
8080
import time, random, sys
81-
import traceback, MimeWriter
81+
import traceback, MimeWriter, rfc822
8282
import hyperdb, date, password
8383

8484
SENDMAILDEBUG = os.environ.get('SENDMAILDEBUG', '')
@@ -111,6 +111,26 @@ def initialiseSecurity(security):
111111
description="User may use the email interface")
112112
security.addPermissionToRole('Admin', p)
113113

114+
def getparam(str, param):
115+
''' From the rfc822 "header" string, extract "param" if it appears.
116+
'''
117+
if ';' not in str:
118+
return None
119+
str = str[str.index(';'):]
120+
while str[:1] == ';':
121+
str = str[1:]
122+
if ';' in str:
123+
# XXX Should parse quotes!
124+
end = str.index(';')
125+
else:
126+
end = len(str)
127+
f = str[:end]
128+
if '=' in f:
129+
i = f.index('=')
130+
if f[:i].strip().lower() == param:
131+
return rfc822.unquote(f[i+1:].strip())
132+
return None
133+
114134
class Message(mimetools.Message):
115135
''' subclass mimetools.Message so we can retrieve the parts of the
116136
message...
@@ -662,7 +682,7 @@ def handle_message(self, message):
662682
props[propname] = value.lower() in ('yes', 'true', 'on', '1')
663683
elif isinstance(proptype, hyperdb.Number):
664684
value = value.strip()
665-
props[propname] = int(value)
685+
props[propname] = float(value)
666686

667687
# handle any errors parsing the argument list
668688
if errors:
@@ -757,7 +777,7 @@ def handle_message(self, message):
757777
if not name:
758778
disp = part.getheader('content-disposition', None)
759779
if disp:
760-
name = disp.getparam('filename')
780+
name = getparam(disp, 'filename')
761781
if name:
762782
name = name.strip()
763783
# this is just an attachment

roundup/scripts/roundup_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
""" HTTP Server that serves roundup.
1818
19-
$Id: roundup_server.py,v 1.16.2.1 2003-01-13 02:45:09 richard Exp $
19+
$Id: roundup_server.py,v 1.16.2.2 2003-02-06 05:44:49 richard Exp $
2020
"""
2121

2222
# python version check
@@ -247,7 +247,7 @@ def run():
247247
try:
248248
# handle the command-line args
249249
try:
250-
optlist, args = getopt.getopt(sys.argv[1:], 'n:p:u:d:l:')
250+
optlist, args = getopt.getopt(sys.argv[1:], 'n:p:u:d:l:h')
251251
except getopt.GetoptError, e:
252252
usage(str(e))
253253

0 commit comments

Comments
 (0)