Changeset 784
- Timestamp:
- 02/10/03 09:41:36 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r768 r784 15 15 # 16 16 # $Log$ 17 # Revision 1.17 2003/02/10 08:41:36 jalet 18 # edpykota's --reset command line option resets the limit date too. 19 # 17 20 # Revision 1.16 2003/02/08 22:39:46 jalet 18 21 # --reset command line option added … … 172 175 (userid, printerid) = self.getUPIds(username, printername) 173 176 if (userid is not None) and (printerid is not None) : 174 self.doQuery("UPDATE userpquota SET pagecounter=0 WHERE userid=%s AND printerid=%s;" % (self.doQuote(userid), self.doQuote(printerid)))177 self.doQuery("UPDATE userpquota SET pagecounter=0, datelimit=NULL WHERE userid=%s AND printerid=%s;" % (self.doQuote(userid), self.doQuote(printerid))) 175 178 176 179 def setDateLimit(self, username, printername, datelimit) : … … 186 189 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))) 187 190 188 def buyUserPQuota(self, username, printername, pagebought) :189 """Buys pages for a given (username, printername)."""190 self.updateUserPQuota(username, printername, -pagebought)191