Index: pykota/trunk/pykota/storages/sql.py
===================================================================
--- pykota/trunk/pykota/storages/sql.py (revision 2057)
+++ pykota/trunk/pykota/storages/sql.py (revision 2066)
@@ -22,4 +22,9 @@
 #
 # $Log$
+# Revision 1.67  2005/02/16 00:29:33  jalet
+# Fixed the maxdenybanners directive.
+# Introduced the denyduplicates directive.
+# Fixed some database related glitches.
+#
 # Revision 1.66  2005/02/13 22:48:38  jalet
 # Added the md5sum to the history
@@ -319,5 +324,5 @@
         userpquota = StorageUserPQuota(self, user, printer)
         if printer.Exists and user.Exists :
-            result = self.doSearch("SELECT id, lifepagecounter, pagecounter, softlimit, hardlimit, datelimit FROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident)))
+            result = self.doSearch("SELECT * FROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident)))
             if result :
                 fields = result[0]
@@ -336,5 +341,5 @@
         grouppquota = StorageGroupPQuota(self, group, printer)
         if group.Exists :
-            result = self.doSearch("SELECT id, softlimit, hardlimit, datelimit FROM grouppquota WHERE groupid=%s AND printerid=%s" % (self.doQuote(group.ident), self.doQuote(printer.ident)))
+            result = self.doSearch("SELECT * FROM grouppquota WHERE groupid=%s AND printerid=%s" % (self.doQuote(group.ident), self.doQuote(printer.ident)))
             if result :
                 fields = result[0]
@@ -354,5 +359,5 @@
         """Extracts a printer's last job information."""
         lastjob = StorageLastJob(self, printer)
-        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))
+        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))
         if result :
             fields = result[0]
Index: pykota/trunk/pykota/storage.py
===================================================================
--- pykota/trunk/pykota/storage.py (revision 2057)
+++ pykota/trunk/pykota/storage.py (revision 2066)
@@ -22,4 +22,9 @@
 #
 # $Log$
+# Revision 1.70  2005/02/16 00:29:33  jalet
+# Fixed the maxdenybanners directive.
+# Introduced the denyduplicates directive.
+# Fixed some database related glitches.
+#
 # Revision 1.69  2005/02/13 22:48:37  jalet
 # Added the md5sum to the history
@@ -487,8 +492,13 @@
         self.WarnCount = 0
 
-    def warn(self) :
-        """Increases the warn counter for this user quota."""
+    def incDenyBannerCounter(self) :
+        """Increment the deny banner counter for this user quota."""
         self.parent.increaseUserPQuotaWarnCount(self)
         self.WarnCount = (self.WarnCount or 0) + 1
+        
+    def resetDenyBannerCounter(self) :
+        """Resets the deny banner counter for this user quota."""
+        self.parent.writeUserPQuotaWarnCount(self, 0)
+        self.WarnCount = 0
         
     def reset(self) :    
Index: pykota/trunk/pykota/config.py
===================================================================
--- pykota/trunk/pykota/config.py (revision 2062)
+++ pykota/trunk/pykota/config.py (revision 2066)
@@ -22,4 +22,9 @@
 #
 # $Log$
+# Revision 1.61  2005/02/16 00:29:33  jalet
+# Fixed the maxdenybanners directive.
+# Introduced the denyduplicates directive.
+# Fixed some database related glitches.
+#
 # Revision 1.60  2005/02/14 23:39:50  jalet
 # Introduces the new 'trustjobsize' directive to workaround some printers
@@ -604,4 +609,11 @@
         return self.isTrue(self.getGlobalOption("reject_unknown", ignore=1))
         
+    def getDenyDuplicates(self, printername) :          
+        """Returns 1 if we want to deny duplicate jobs, else 0."""
+        try : 
+            return self.isTrue(self.getPrinterOption(printername, "denyduplicates"))
+        except PyKotaConfigError :    
+            return 0
+        
     def getWinbindSeparator(self) :          
         """Returns the winbind separator's value if it is set, else None."""
Index: pykota/trunk/pykota/version.py
===================================================================
--- pykota/trunk/pykota/version.py (revision 2062)
+++ pykota/trunk/pykota/version.py (revision 2066)
@@ -22,5 +22,5 @@
 #
 
-__version__ = "1.21alpha25_unofficial"
+__version__ = "1.21alpha26_unofficial"
 
 __doc__ = """PyKota : a complete Printing Quota Solution for CUPS and LPRng."""
