Changeset 2066 for pykota/trunk/pykota
- Timestamp:
- 02/16/05 01:29:33 (19 years ago)
- Location:
- pykota/trunk/pykota
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/config.py
r2062 r2066 22 22 # 23 23 # $Log$ 24 # Revision 1.61 2005/02/16 00:29:33 jalet 25 # Fixed the maxdenybanners directive. 26 # Introduced the denyduplicates directive. 27 # Fixed some database related glitches. 28 # 24 29 # Revision 1.60 2005/02/14 23:39:50 jalet 25 30 # Introduces the new 'trustjobsize' directive to workaround some printers … … 604 609 return self.isTrue(self.getGlobalOption("reject_unknown", ignore=1)) 605 610 611 def getDenyDuplicates(self, printername) : 612 """Returns 1 if we want to deny duplicate jobs, else 0.""" 613 try : 614 return self.isTrue(self.getPrinterOption(printername, "denyduplicates")) 615 except PyKotaConfigError : 616 return 0 617 606 618 def getWinbindSeparator(self) : 607 619 """Returns the winbind separator's value if it is set, else None.""" -
pykota/trunk/pykota/storage.py
r2057 r2066 22 22 # 23 23 # $Log$ 24 # Revision 1.70 2005/02/16 00:29:33 jalet 25 # Fixed the maxdenybanners directive. 26 # Introduced the denyduplicates directive. 27 # Fixed some database related glitches. 28 # 24 29 # Revision 1.69 2005/02/13 22:48:37 jalet 25 30 # Added the md5sum to the history … … 487 492 self.WarnCount = 0 488 493 489 def warn(self) :490 """Incre ases the warncounter for this user quota."""494 def incDenyBannerCounter(self) : 495 """Increment the deny banner counter for this user quota.""" 491 496 self.parent.increaseUserPQuotaWarnCount(self) 492 497 self.WarnCount = (self.WarnCount or 0) + 1 498 499 def resetDenyBannerCounter(self) : 500 """Resets the deny banner counter for this user quota.""" 501 self.parent.writeUserPQuotaWarnCount(self, 0) 502 self.WarnCount = 0 493 503 494 504 def reset(self) : -
pykota/trunk/pykota/storages/sql.py
r2057 r2066 22 22 # 23 23 # $Log$ 24 # Revision 1.67 2005/02/16 00:29:33 jalet 25 # Fixed the maxdenybanners directive. 26 # Introduced the denyduplicates directive. 27 # Fixed some database related glitches. 28 # 24 29 # Revision 1.66 2005/02/13 22:48:38 jalet 25 30 # Added the md5sum to the history … … 319 324 userpquota = StorageUserPQuota(self, user, printer) 320 325 if printer.Exists and user.Exists : 321 result = self.doSearch("SELECT id, lifepagecounter, pagecounter, softlimit, hardlimit, datelimitFROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident)))326 result = self.doSearch("SELECT * FROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident))) 322 327 if result : 323 328 fields = result[0] … … 336 341 grouppquota = StorageGroupPQuota(self, group, printer) 337 342 if group.Exists : 338 result = self.doSearch("SELECT id, softlimit, hardlimit, datelimitFROM grouppquota WHERE groupid=%s AND printerid=%s" % (self.doQuote(group.ident), self.doQuote(printer.ident)))343 result = self.doSearch("SELECT * FROM grouppquota WHERE groupid=%s AND printerid=%s" % (self.doQuote(group.ident), self.doQuote(printer.ident))) 339 344 if result : 340 345 fields = result[0] … … 354 359 """Extracts a printer's last job information.""" 355 360 lastjob = StorageLastJob(self, printer) 356 result = self.doSearch("SELECT jobhistory.id, jobid, userid, username, pagecounter, jobsize, jobprice, filename, title, copies, options, hostname, jobdate FROM jobhistory, users WHERE printerid=%s AND userid=users.id ORDER BY jobdate DESC LIMIT 1" % self.doQuote(printer.ident))361 result = self.doSearch("SELECT jobhistory.id, jobid, userid, username, pagecounter, jobsize, jobprice, filename, title, copies, options, hostname, jobdate, md5sum, pages, billingcode FROM jobhistory, users WHERE printerid=%s AND userid=users.id ORDER BY jobdate DESC LIMIT 1" % self.doQuote(printer.ident)) 357 362 if result : 358 363 fields = result[0] -
pykota/trunk/pykota/version.py
r2062 r2066 22 22 # 23 23 24 __version__ = "1.21alpha2 5_unofficial"24 __version__ = "1.21alpha26_unofficial" 25 25 26 26 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""