Mercurial > p > roundup > code
comparison roundup/cgi/actions.py @ 3188:7faae85e1e33
merge from branch
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 15 Feb 2005 23:45:30 +0000 |
| parents | 88dbe6b3d891 |
| children | 6fc18923f837 |
comparison
equal
deleted
inserted
replaced
| 3186:30f08255e4c0 | 3188:7faae85e1e33 |
|---|---|
| 1 #$Id: actions.py,v 1.45 2005-02-15 00:23:30 richard Exp $ | 1 #$Id: actions.py,v 1.46 2005-02-15 23:45:29 richard Exp $ |
| 2 | 2 |
| 3 import re, cgi, StringIO, urllib, Cookie, time, random | 3 import re, cgi, StringIO, urllib, Cookie, time, random, csv |
| 4 | 4 |
| 5 from roundup import hyperdb, token, date, password, csv | 5 from roundup import hyperdb, token, date, password |
| 6 from roundup.i18n import _ | 6 from roundup.i18n import _ |
| 7 import roundup.exceptions | 7 import roundup.exceptions |
| 8 from roundup.cgi import exceptions, templating | 8 from roundup.cgi import exceptions, templating |
| 9 from roundup.mailgw import uidFromAddress | 9 from roundup.mailgw import uidFromAddress |
| 10 | 10 |
| 505 return activity | 505 return activity |
| 506 | 506 |
| 507 def detectCollision(self, user_activity, node_activity): | 507 def detectCollision(self, user_activity, node_activity): |
| 508 '''Check for a collision and return the list of props we edited | 508 '''Check for a collision and return the list of props we edited |
| 509 that conflict.''' | 509 that conflict.''' |
| 510 if user_activity < node_activity: | 510 if user_activity and user_activity < node_activity: |
| 511 props, links = self.client.parsePropsFromForm() | 511 props, links = self.client.parsePropsFromForm() |
| 512 key = (self.classname, self.nodeid) | 512 key = (self.classname, self.nodeid) |
| 513 # we really only collide for direct prop edit conflicts | 513 # we really only collide for direct prop edit conflicts |
| 514 return props[key].keys() | 514 return props[key].keys() |
| 515 else: | 515 else: |
