|
15 | 15 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
16 | 16 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
17 | 17 | # |
18 | | -#$Id: back_anydbm.py,v 1.126 2003-09-06 20:01:10 jlgijsbers Exp $ |
| 18 | +#$Id: back_anydbm.py,v 1.127 2003-09-08 20:39:18 jlgijsbers Exp $ |
19 | 19 | ''' |
20 | 20 | This module defines a backend that saves the hyperdatabase in a database |
21 | 21 | chosen by anydbm. It is guaranteed to always be available in python |
@@ -87,7 +87,6 @@ def post_init(self): |
87 | 87 | # reindex the db if necessary |
88 | 88 | if self.indexer.should_reindex(): |
89 | 89 | self.reindex() |
90 | | - self.figure_curuserid() |
91 | 90 |
|
92 | 91 | def reindex(self): |
93 | 92 | for klass in self.classes.values(): |
@@ -243,7 +242,7 @@ def addnode(self, classname, nodeid, node): |
243 | 242 | # add in the "calculated" properties (dupe so we don't affect |
244 | 243 | # calling code's node assumptions) |
245 | 244 | node = node.copy() |
246 | | - node['creator'] = self.curuserid |
| 245 | + node['creator'] = self.getuid() |
247 | 246 | node['creation'] = node['activity'] = date.Date() |
248 | 247 |
|
249 | 248 | self.newnodes.setdefault(classname, {})[nodeid] = 1 |
@@ -489,7 +488,7 @@ def getjournal(self, classname, nodeid): |
489 | 488 | cache_creator, cache_creation) = args |
490 | 489 | if cache_classname == classname and cache_nodeid == nodeid: |
491 | 490 | if not cache_creator: |
492 | | - cache_creator = self.curuserid |
| 491 | + cache_creator = self.getuid() |
493 | 492 | if not cache_creation: |
494 | 493 | cache_creation = date.Date() |
495 | 494 | res.append((cache_nodeid, cache_creation, cache_creator, |
@@ -636,7 +635,7 @@ def doSaveJournal(self, classname, nodeid, action, params, creator, |
636 | 635 | if creator: |
637 | 636 | journaltag = creator |
638 | 637 | else: |
639 | | - journaltag = self.curuserid |
| 638 | + journaltag = self.getuid() |
640 | 639 | if creation: |
641 | 640 | journaldate = creation.serialise() |
642 | 641 | else: |
@@ -1056,7 +1055,7 @@ def get(self, nodeid, propname, default=_marker, cache=1): |
1056 | 1055 | # user's been retired, return admin |
1057 | 1056 | return '1' |
1058 | 1057 | else: |
1059 | | - return self.db.curuserid |
| 1058 | + return self.db.getuid() |
1060 | 1059 |
|
1061 | 1060 | # get the property (raises KeyErorr if invalid) |
1062 | 1061 | prop = self.properties[propname] |
|
0 commit comments