|
1 | | -#$Id: actions.py,v 1.17 2004-03-26 04:50:50 richard Exp $ |
| 1 | +#$Id: actions.py,v 1.18 2004-03-26 06:31:50 richard Exp $ |
2 | 2 |
|
3 | 3 | import re, cgi, StringIO, urllib, Cookie, time, random |
4 | 4 |
|
@@ -457,19 +457,19 @@ def _createnode(self, cn, props): |
457 | 457 | return cl.create(**props) |
458 | 458 |
|
459 | 459 | class EditItemAction(_EditAction): |
460 | | - def lastUserActvity(self): |
| 460 | + def lastUserActivity(self): |
461 | 461 | if self.form.has_key(':lastactivity'): |
462 | | - user_actvity = date.Date(self.form[':lastactivity'].value) |
| 462 | + return date.Date(self.form[':lastactivity'].value) |
463 | 463 | elif self.form.has_key('@lastactivity'): |
464 | | - user_actvity = date.Date(self.form['@lastactivity'].value) |
| 464 | + return date.Date(self.form['@lastactivity'].value) |
465 | 465 | else: |
466 | 466 | return None |
467 | 467 |
|
468 | 468 | def lastNodeActivity(self): |
469 | 469 | cl = getattr(self.client.db, self.classname) |
470 | | - node_activity = cl.get(self.nodeid, 'activity') |
| 470 | + return cl.get(self.nodeid, 'activity') |
471 | 471 |
|
472 | | - def detectCollision(self, user_actvity, node_activity): |
| 472 | + def detectCollision(self, user_activity, node_activity): |
473 | 473 | if user_activity: |
474 | 474 | return user_activity < node_activity |
475 | 475 |
|
|
0 commit comments