Changeset 765 for pykota/trunk
- Timestamp:
- 02/08/03 23:12:09 (22 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/initscripts/pykota-postgresql.sql
r695 r765 14 14 -- 15 15 -- $Log$ 16 -- Revision 1.2 2003/02/08 22:12:09 jalet 17 -- Life time counter for users and groups added. 18 -- 16 19 -- Revision 1.1 2003/02/05 21:28:17 jalet 17 20 -- Initial import into CVS … … 69 72 userid INT4 REFERENCES users(id), 70 73 printerid INT4 REFERENCES printers(id), 74 lifepagecounter INT4 DEFAULT 0, 71 75 pagecounter INT4 DEFAULT 0, 72 76 softlimit INT4, … … 80 84 groupid INT4 REFERENCES groups(id), 81 85 printerid INT4 REFERENCES printers(id), 86 lifepagecounter INT4 DEFAULT 0, 82 87 pagecounter INT4 DEFAULT 0, 83 88 softlimit INT4, -
pykota/trunk/pykota/storages/sql.py
r748 r765 15 15 # 16 16 # $Log$ 17 # Revision 1.15 2003/02/08 22:12:09 jalet 18 # Life time counter for users and groups added. 19 # 17 20 # Revision 1.14 2003/02/07 22:13:13 jalet 18 21 # Perhaps edpykota is now able to add printers !!! Oh, stupid me ! … … 171 174 (userid, printerid) = self.getUPIds(username, printername) 172 175 if (userid is not None) and (printerid is not None) : 173 self.doQuery("UPDATE userpquota SET pagecounter=pagecounter+(%s) WHERE userid=%s AND printerid=%s;" % (self.doQuote(pagecount), self.doQuote(userid), self.doQuote(printerid)))176 self.doQuery("UPDATE userpquota SET lifepagecounter=lifepagecounter+(%s), pagecounter=pagecounter+(%s) WHERE userid=%s AND printerid=%s;" % (self.doQuote(pagecount), self.doQuote(pagecount), self.doQuote(userid), self.doQuote(printerid))) 174 177 175 178 def buyUserPQuota(self, username, printername, pagebought) :