File tree Expand file tree Collapse file tree 3 files changed +14
-21
lines changed
Expand file tree Collapse file tree 3 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 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.125 2003-09-06 07:27:30 jlgijsbers Exp $
18+ #$Id: back_anydbm.py,v 1.126 2003-09-06 20:01:10 jlgijsbers Exp $
1919'''
2020This module defines a backend that saves the hyperdatabase in a database
2121chosen by anydbm. It is guaranteed to always be available in python
@@ -89,16 +89,6 @@ def post_init(self):
8989 self .reindex ()
9090 self .figure_curuserid ()
9191
92- def figure_curuserid (self ):
93- """Figure out the 'curuserid'."""
94- if self .journaltag is None :
95- self .curuserid = None
96- elif self .journaltag == 'admin' :
97- # admin user may not exist, but always has ID 1
98- self .curuserid = '1'
99- else :
100- self .curuserid = self .user .lookup (self .journaltag )
101-
10292 def reindex (self ):
10393 for klass in self .classes .values ():
10494 for nodeid in klass .list ():
Original file line number Diff line number Diff line change 1- # $Id: rdbms_common.py,v 1.60 2003-09-04 00:47:01 richard Exp $
1+ # $Id: rdbms_common.py,v 1.61 2003-09-06 20:01:10 jlgijsbers Exp $
22''' Relational database (SQL) backend common code.
33
44Basics:
@@ -145,14 +145,7 @@ def post_init(self):
145145 # commit
146146 self .conn .commit ()
147147
148- # figure the "curuserid"
149- if self .journaltag is None :
150- self .curuserid = None
151- elif self .journaltag == 'admin' :
152- # admin user may not exist, but always has ID 1
153- self .curuserid = '1'
154- else :
155- self .curuserid = self .user .lookup (self .journaltag )
148+ self .figure_curuserid ()
156149
157150 def reindex (self ):
158151 for klass in self .classes .values ():
Original file line number Diff line number Diff line change 1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: roundupdb.py,v 1.87 2003-09-06 07:27:30 jlgijsbers Exp $
18+ # $Id: roundupdb.py,v 1.88 2003-09-06 20:02:23 jlgijsbers Exp $
1919
2020__doc__ = """
2121Extending hyperdb with types specific to issue-tracking.
@@ -72,6 +72,16 @@ def getUserTimezone(self):
7272 timezone = 0
7373 return timezone
7474
75+ def figure_curuserid (self ):
76+ """Figure out the 'curuserid'."""
77+ if self .journaltag is None :
78+ self .curuserid = None
79+ elif self .journaltag == 'admin' :
80+ # admin user may not exist, but always has ID 1
81+ self .curuserid = '1'
82+ else :
83+ self .curuserid = self .user .lookup (self .journaltag )
84+
7585 def confirm_registration (self , otk ):
7686 props = self .otks .getall (otk )
7787 for propname , proptype in self .user .getprops ().items ():
You can’t perform that action at this time.
0 commit comments