Index: pykota/trunk/initscripts/ldap/pykota-sample.ldif
===================================================================
--- pykota/trunk/initscripts/ldap/pykota-sample.ldif (revision 3280)
+++ pykota/trunk/initscripts/ldap/pykota-sample.ldif (revision 3413)
@@ -3,8 +3,8 @@
 #
 # YOU CAN USE IT TO CREATE AN INITIAL LDAP TREE WITH PYKOTA SUPPORT.
-# 
+#
 # ITS STRUCTURE IS AN EXAMPLE : YOU CAN USE WHATEVER STRUCTURE YOU WANT,
 # PROVIDED YOU PUT CORRECT CONFIGURATION PARAMETERS IN /etc/pykota/pykota.conf
-# 
+#
 #
 # (c) 2003, 2004, 2005, 2006, 2007, 2008 Jerome Alet <alet@librelogiciel.com>
@@ -13,10 +13,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -24,5 +24,5 @@
 # $Id$
 #
- 
+
 # The encrypted password below in clear text is : BlfUPg7t
 dn: cn=pykotaadmin,dc=example,dc=com
Index: pykota/trunk/initscripts/ldap/pykota.schema
===================================================================
--- pykota/trunk/initscripts/ldap/pykota.schema (revision 3280)
+++ pykota/trunk/initscripts/ldap/pykota.schema (revision 3413)
@@ -10,10 +10,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -31,8 +31,8 @@
 # 16868.1.2.x   => classes
 #
-# Contributors : Leif Johansson - Stockholm University 
-#
-
-#        
+# Contributors : Leif Johansson - Stockholm University
+#
+
+#
 # PyKota Attributes Types
 #
@@ -73,6 +73,6 @@
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaHardLimit        
+
+# pykotaHardLimit
 attributetype ( 1.3.6.1.4.1.16868.1.1.7 NAME 'pykotaHardLimit'
         DESC 'Hard limit in maximal number of pages'
@@ -121,6 +121,6 @@
         EQUALITY caseExactIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaPrinterName        
+
+# pykotaPrinterName
 attributetype ( 1.3.6.1.4.1.16868.1.1.15 NAME 'pykotaPrinterName'
         DESC 'PyKota printer name as received from the printing subsystem'
@@ -128,6 +128,6 @@
         SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaUserName        
+
+# pykotaUserName
 attributetype ( 1.3.6.1.4.1.16868.1.1.16 NAME 'pykotaUserName'
         DESC 'PyKota user name'
@@ -135,6 +135,6 @@
         SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaGroupName        
+
+# pykotaGroupName
 attributetype ( 1.3.6.1.4.1.16868.1.1.17 NAME 'pykotaGroupName'
         DESC 'PyKota group name'
@@ -142,12 +142,12 @@
         SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaLastJobIdent        
+
+# pykotaLastJobIdent
 attributetype ( 1.3.6.1.4.1.16868.1.1.18 NAME 'pykotaLastJobIdent'
         DESC 'Identifies the last job in the history'
         EQUALITY caseExactIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaFileName        
+
+# pykotaFileName
 attributetype ( 1.3.6.1.4.1.16868.1.1.19 NAME 'pykotaFileName'
         DESC 'Print job filename'
@@ -155,6 +155,6 @@
         SUBSTR caseExactSubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-        
-# pykotaTitle        
+
+# pykotaTitle
 attributetype ( 1.3.6.1.4.1.16868.1.1.20 NAME 'pykotaTitle'
         DESC 'Print job title'
@@ -162,5 +162,5 @@
         SUBSTR caseIgnoreSubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-        
+
 # pykotaCopies
 attributetype ( 1.3.6.1.4.1.16868.1.1.21 NAME 'pykotaCopies'
@@ -168,6 +168,6 @@
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
-        
-# pykotaOptions        
+
+# pykotaOptions
 attributetype ( 1.3.6.1.4.1.16868.1.1.22 NAME 'pykotaOptions'
         DESC 'Print job options'
@@ -175,5 +175,5 @@
         SUBSTR caseIgnoreSubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-        
+
 # pykotaJobPrice
 attributetype ( 1.3.6.1.4.1.16868.1.1.23 NAME 'pykotaJobPrice'
@@ -188,5 +188,5 @@
         SUBSTR caseIgnoreSubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )
-        
+
 # pykotaJobSizeBytes
 attributetype ( 1.3.6.1.4.1.16868.1.1.25 NAME 'pykotaJobSizeBytes'
@@ -200,5 +200,5 @@
         EQUALITY caseExactIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
-        
+
 # pykotaOverCharge
 attributetype ( 1.3.6.1.4.1.16868.1.1.27 NAME 'pykotaOverCharge'
@@ -206,5 +206,5 @@
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
+
 # pykotaWarnCount
 attributetype ( 1.3.6.1.4.1.16868.1.1.28 NAME 'pykotaWarnCount'
@@ -212,6 +212,6 @@
         EQUALITY integerMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
-        
-# pykotaMD5Sum        
+
+# pykotaMD5Sum
 attributetype ( 1.3.6.1.4.1.16868.1.1.29 NAME 'pykotaMD5Sum'
         DESC 'MD5 Sum of the job datas'
@@ -219,6 +219,6 @@
         SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
-# pykotaPages        
+
+# pykotaPages
 attributetype ( 1.3.6.1.4.1.16868.1.1.30 NAME 'pykotaPages'
         DESC 'Descriptor for each page settings in the history'
@@ -226,5 +226,5 @@
         SUBSTR caseExactIA5SubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26)
-        
+
 # pykotaPrinterCoefficient
 attributetype ( 1.3.6.1.4.1.16868.1.1.31 NAME 'pykotaPrinterCoefficient'
@@ -239,5 +239,5 @@
         SUBSTR caseIgnoreSubstringsMatch
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
-        
+
 # pykotaPrecomputedJobSize
 attributetype ( 1.3.6.1.4.1.16868.1.1.33 NAME 'pykotaPrecomputedJobSize'
@@ -251,5 +251,5 @@
         EQUALITY caseIgnoreIA5Match
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
-        
+
 # pykotaMaxJobSize
 attributetype ( 1.3.6.1.4.1.16868.1.1.35 NAME 'pykotaMaxJobSize'
@@ -264,5 +264,5 @@
         SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
 
-#        
+#
 # PyKota Object Classes
 #
@@ -273,46 +273,46 @@
         MUST ( uid )
         MAY  ( pykotaUserName $ pykotaLimitBy $ mail $ description ) )
-        
-# pykotaGroup        
+
+# pykotaGroup
 objectclass ( 1.3.6.1.4.1.16868.1.2.2 NAME 'pykotaGroup' SUP top AUXILIARY
         DESC 'PyKota Auxiliary Group'
         MUST ( cn )
         MAY  ( pykotaGroupName $ pykotaLimitBy $ memberUid $ uniqueMember $ member $ description ) )
-        
-# pykotaPrinter        
+
+# pykotaPrinter
 objectclass ( 1.3.6.1.4.1.16868.1.2.3 NAME 'pykotaPrinter' SUP top AUXILIARY
         DESC 'PyKota Printer'
         MUST ( cn )
         MAY  ( pykotaMaxJobSize $ pykotaPassThrough $ description $ pykotaPrinterName $ pykotaPricePerPage $ pykotaPricePerJob $ pykotaPrinterCoefficient $ uniqueMember ) )
-        
-# pykotaUserPQuota        
+
+# pykotaUserPQuota
 objectclass ( 1.3.6.1.4.1.16868.1.2.4 NAME 'pykotaUserPQuota' SUP top AUXILIARY
         DESC 'PyKota User Quota on a Printer'
         MUST ( cn $ pykotaUserName $ pykotaPrinterName )
         MAY  ( pykotaMaxJobSize $ pykotaPageCounter $ pykotaLifePageCounter $ pykotaSoftLimit $ pykotaHardLimit $ pykotaDateLimit $ pykotaWarnCount ) )
-        
-# pykotaGroupPQuota        
+
+# pykotaGroupPQuota
 objectclass ( 1.3.6.1.4.1.16868.1.2.5 NAME 'pykotaGroupPQuota' SUP top AUXILIARY
         DESC 'PyKota Group Quota on a Printer'
         MUST ( cn $ pykotaGroupName $ pykotaPrinterName )
         MAY  ( pykotaMaxJobSize $ pykotaSoftLimit $ pykotaHardLimit $ pykotaDateLimit ) )
-        
-# pykotaJob        
+
+# pykotaJob
 objectclass ( 1.3.6.1.4.1.16868.1.2.6 NAME 'pykotaJob' SUP top AUXILIARY
         DESC 'An entry in the job history for a printer'
         MUST ( cn $ pykotaUserName $ pykotaPrinterName $ pykotaJobId )
         MAY  ( pykotaPrecomputedJobPrice $ pykotaPrecomputedJobSize $ pykotaBillingCode $ pykotaPrinterPageCounter $ pykotaJobSize $ pykotaAction $ pykotaJobPrice $ pykotaFileName $ pykotaTitle $ pykotaCopies $ pykotaOptions $ pykotaHostName $ pykotaJobSizeBytes $ pykotaMD5Sum $ pykotaPages ) )
-        
+
 # pykotaAccountBalance
 objectclass ( 1.3.6.1.4.1.16868.1.2.7 NAME 'pykotaAccountBalance' SUP top AUXILIARY
         DESC 'PyKota User account balance'
         MAY  ( pykotaUserName $ pykotaBalance $ pykotaLifeTimePaid $ pykotaOverCharge $ pykotaPayments ) )
-        
-# pykotaLastJob        
+
+# pykotaLastJob
 objectclass ( 1.3.6.1.4.1.16868.1.2.8 NAME 'pykotaLastJob' SUP top AUXILIARY
         DESC 'Last job information for a printer'
         MUST ( pykotaLastJobIdent )
-        MAY ( pykotaPrinterName ) ) 
-        
+        MAY ( pykotaPrinterName ) )
+
 # pykotaBilling
 objectclass ( 1.3.6.1.4.1.16868.1.2.10 NAME 'pykotaBilling' SUP top AUXILIARY
@@ -320,9 +320,9 @@
         MUST ( cn $ pykotaBillingCode )
         MAY ( pykotaPageCounter $ pykotaBalance $ description ) )
-        
-# pykotaObject - Use it if you have to 
+
+# pykotaObject - Use it if you have to
 objectclass ( 1.3.6.1.4.1.16868.1.2.9 NAME 'pykotaObject' SUP top STRUCTURAL
         DESC 'PyKota Object'
         MUST ( cn ) )
-        
-        
+
+
Index: pykota/trunk/initscripts/ldap/README.sunds
===================================================================
--- pykota/trunk/initscripts/ldap/README.sunds (revision 3351)
+++ pykota/trunk/initscripts/ldap/README.sunds (revision 3413)
@@ -7,10 +7,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -54,5 +54,5 @@
 
         % ldapmodify -a -h ldap.domain.com -D "cn=Directory Manager" -f pykota-sunds-indexes.ldif
-        
+
         By default configuration settings are NOT replicated in a
         replication environment so the following indexes must be
@@ -95,5 +95,5 @@
         will encrypt the userPassword entry so you may wish to leave it as
         plain text when creating the pykotaadmin and pykotauser entries.
-        
+
         If a Password Policy is being enforced it would be advisable exclude
         both the pykotauser and pykotaadmin from that policy. This is especially
@@ -106,5 +106,5 @@
 Access Control Instructions (ACI) :
 -----------------------------------
- 
+
         The provided ACI's must not be blindly added using ldapmodify or
         ldapadd, if you do so you will clobber any existing ACI's for a
Index: pykota/trunk/initscripts/ldap/pykota-sunds-indexes.ldif
===================================================================
--- pykota/trunk/initscripts/ldap/pykota-sunds-indexes.ldif (revision 3351)
+++ pykota/trunk/initscripts/ldap/pykota-sunds-indexes.ldif (revision 3413)
@@ -7,10 +7,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
Index: pykota/trunk/initscripts/ldap/README.ldap
===================================================================
--- pykota/trunk/initscripts/ldap/README.ldap (revision 3343)
+++ pykota/trunk/initscripts/ldap/README.ldap (revision 3413)
@@ -22,26 +22,26 @@
 ===============
 
-OpenLDAP : 
+OpenLDAP :
 ----------
 
-    The pykota.schema file can be used to modify an existing OpenLDAP 
-    directory to add the necessary object classes and attributes for 
+    The pykota.schema file can be used to modify an existing OpenLDAP
+    directory to add the necessary object classes and attributes for
     use with PyKota.
-    
+
     Include it in your LDAP server's configuration.
     For example, with OpenLDAP under Debian :
-    
+
         $ cp pykota.schema /etc/ldap/schema
         (no need to do this if you install from PyKota's Debian package)
 
-    NB: With OpenLDAP under Red Hat-based distros, where /etc/ldap is 
-        referenced, substitute /etc/openldap. e.g. 
+    NB: With OpenLDAP under Red Hat-based distros, where /etc/ldap is
+        referenced, substitute /etc/openldap. e.g.
 
         $ cp pykota.schema /etc/openldap/schema
-        
-    Then edit /etc/ldap/slapd.conf and add a line to    
+
+    Then edit /etc/ldap/slapd.conf and add a line to
     include the PyKota schema. You should have something
     like :
-    
+
         # Schema and objectClass definitions
         include         /etc/ldap/schema/core.schema
@@ -50,16 +50,16 @@
         include         /etc/ldap/schema/inetorgperson.schema
         include         /etc/ldap/schema/pykota.schema
-        
-    While this is not mandatory, you may want to create    
+
+    While this is not mandatory, you may want to create
     some indexes to speed things up a bit :
-    
+
       You should already have these :
-      
+
         index objectClass eq
         index cn pres,eq,sub
         index uid pres,eq,sub
-        
-      But we recommend that you add these :  
-      
+
+      But we recommend that you add these :
+
         index pykotaUserName pres,eq,sub
         index pykotaGroupName pres,eq,sub
@@ -67,16 +67,16 @@
         index pykotaBillingCode pres,eq,sub
         index pykotaLastJobIdent eq
-        
+
     Now you must ensure that the DNs PyKota will use to bind to
     your OpenLDAP server don't have search queries size limits,
     which gives for example (OpenLDAP 2.1.x or above) :
-    
+
         limits dn="cn=pykotaadmin,dc=example,dc=com" size.soft=-1 size.hard=soft
         limits dn="cn=pykotauser,dc=example,dc=com" size.soft=-1 size.hard=soft
-    
+
     Where pykotaadmin and pykotauser are the usernames used to bind to your
-    OpenLDAP server within PyKota, respectively in complete ReadWrite mode 
+    OpenLDAP server within PyKota, respectively in complete ReadWrite mode
     (as set in pykotadmin.conf) and in ReadOnly mode (pykota.conf).
-    
+
     NB : YOU have to define the ACLs necessary for user pykotaadmin to
     have unlimited Read+Write access to your LDAP tree, and for user
@@ -87,50 +87,50 @@
     this is up to you to decide. An example giving full write access
     to the pykotaadmin user is :
-    
-        access to dn.subtree="ou=PyKota,dc=example,dc=com" 
-               by dn="cn=pykotaadmin,dc=example,dc=com" write   
-               
-        access to dn.subtree="ou=People,dc=example,dc=com" 
-               by dn="cn=pykotaadmin,dc=example,dc=com" write   
-               
-        access to dn.subtree="ou=Groups,dc=example,dc=com" 
-               by dn="cn=pykotaadmin,dc=example,dc=com" write   
-               
+
+        access to dn.subtree="ou=PyKota,dc=example,dc=com"
+               by dn="cn=pykotaadmin,dc=example,dc=com" write
+
+        access to dn.subtree="ou=People,dc=example,dc=com"
+               by dn="cn=pykotaadmin,dc=example,dc=com" write
+
+        access to dn.subtree="ou=Groups,dc=example,dc=com"
+               by dn="cn=pykotaadmin,dc=example,dc=com" write
+
     Please adapt this to your own needs and configuration.
-    
-    Now, stop the OpenLDAP server :    
-    
+
+    Now, stop the OpenLDAP server :
+
         $ /etc/init.d/slapd stop
-    
-    Generate the index files :    
-    
+
+    Generate the index files :
+
         $ slapindex
-        
-    And finally restart the OpenLDAP server :    
-    
+
+    And finally restart the OpenLDAP server :
+
         $ /etc/init.d/slapd start
 
-    NB: On Red Hat-based distros, use '/sbin/service ldap stop' and 
+    NB: On Red Hat-based distros, use '/sbin/service ldap stop' and
         '/sbin/service ldap start' instead.
-        
-Sun Directory Server :        
+
+Sun Directory Server :
 ----------------------
 
     See README.sunds
-    
-Initial datas :   
+
+Initial datas :
 ===============
-    
-    You can use the pykota-sample.ldif file to initialize an LDAP tree 
+
+    You can use the pykota-sample.ldif file to initialize an LDAP tree
     for PyKota, if you want.
-    
+
     The structure used in this file is NOT mandatory !
     Provided you put correct parameters into /etc/pykota/pykota.conf,
     you can structure your LDAP directory the way you want.
-    
-To use an LDAP directory as the Quota Storage, just modify  
+
+To use an LDAP directory as the Quota Storage, just modify
 ~pykota/pykota.conf to make it contain lines similar to the LDAP
 related ones in conf/pykota.conf.sample, but adapted to your
 own configuration. Also de-activate the PostgreSQL-related lines.
-Don't forget to adapt ~pykota/pykotadmin.conf as well.    
+Don't forget to adapt ~pykota/pykotadmin.conf as well.
 ============================================================
Index: pykota/trunk/initscripts/ldap/pykota-schema-sunds.ldif
===================================================================
--- pykota/trunk/initscripts/ldap/pykota-schema-sunds.ldif (revision 3351)
+++ pykota/trunk/initscripts/ldap/pykota-schema-sunds.ldif (revision 3413)
@@ -20,5 +20,5 @@
 # 16868.1.2.x   => classes
 #
-# Contributors : Leif Johansson - Stockholm University 
+# Contributors : Leif Johansson - Stockholm University
 #
 dn: cn=schema
@@ -295,5 +295,5 @@
         DESC 'Last job information for a printer'
         MUST ( pykotaLastJobIdent )
-        MAY ( pykotaPrinterName ) ) 
+        MAY ( pykotaPrinterName ) )
 -
 add: objectClasses
Index: pykota/trunk/initscripts/sqlite/pykota-sqlite.sql
===================================================================
--- pykota/trunk/initscripts/sqlite/pykota-sqlite.sql (revision 3279)
+++ pykota/trunk/initscripts/sqlite/pykota-sqlite.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -32,5 +32,5 @@
 CREATE TABLE users(id INTEGER PRIMARY KEY NOT NULL,
                    username TEXT UNIQUE NOT NULL,
-                   email TEXT, 
+                   email TEXT,
                    balance FLOAT DEFAULT 0.0,
                    lifetimepaid FLOAT DEFAULT 0.0,
@@ -38,5 +38,5 @@
                    description TEXT,
                    overcharge FLOAT NOT NULL DEFAULT 1.0);
-                   
+
 --
 -- Create the groups table
@@ -46,5 +46,5 @@
                     description TEXT,
                     limitby TEXT DEFAULT 'quota');
-                    
+
 --
 -- Create the printers table
@@ -57,5 +57,5 @@
                       passthrough BOOLEAN DEFAULT FALSE,
                       maxjobsize INT4);
-                    
+
 --
 -- Create the print quota table for users
@@ -70,9 +70,9 @@
                         datelimit TEXT,
                         maxjobsize INT4,
-                        warncount INT4 DEFAULT 0); 
+                        warncount INT4 DEFAULT 0);
 CREATE INDEX userpquota_u_id_ix ON userpquota (userid);
 CREATE INDEX userpquota_p_id_ix ON userpquota (printerid);
 CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid);
-                        
+
 --
 -- Create the job history table
@@ -103,5 +103,5 @@
 CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate);
 CREATE INDEX jobhistory_hostname_ix ON jobhistory (hostname);
-                        
+
 --
 -- Create the print quota table for groups
@@ -117,6 +117,6 @@
 CREATE INDEX grouppquota_p_id_ix ON grouppquota (printerid);
 CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid);
-                        
---                         
+
+--
 -- Create the groups/members relationship
 --
@@ -124,6 +124,6 @@
                            userid INT4 REFERENCES users(id),
                            PRIMARY KEY (groupid, userid));
-                           
---                         
+
+--
 -- Create the printer groups relationship
 --
@@ -133,5 +133,5 @@
 --
 -- Create the table for payments
--- 
+--
 CREATE TABLE payments (id INTEGER PRIMARY KEY NOT NULL,
                        userid INT4 REFERENCES users(id),
@@ -141,14 +141,14 @@
 CREATE INDEX payments_date_ix ON payments (date);
 
--- 
+--
 -- Create the table for coefficients wrt paper sizes and the like
 --
-CREATE TABLE coefficients (id INTEGER PRIMARY KEY NOT NULL, 
-                           printerid INTEGER NOT NULL REFERENCES printers(id), 
-                           label TEXT NOT NULL, 
-                           coefficient FLOAT DEFAULT 1.0, 
+CREATE TABLE coefficients (id INTEGER PRIMARY KEY NOT NULL,
+                           printerid INTEGER NOT NULL REFERENCES printers(id),
+                           label TEXT NOT NULL,
+                           coefficient FLOAT DEFAULT 1.0,
                            CONSTRAINT coeffconstraint UNIQUE (printerid, label));
 
--- 
+--
 -- Create the table for the billing codes
 --
Index: pykota/trunk/initscripts/sqlite/README.sqlite
===================================================================
--- pykota/trunk/initscripts/sqlite/README.sqlite (revision 3279)
+++ pykota/trunk/initscripts/sqlite/README.sqlite (revision 3413)
@@ -27,20 +27,20 @@
     for use with PyKota, in the case you don't want to use
     either PostgreSQL, MySQL, or LDAP :
-    
+
     NB : an SQLite3 database can't be shared between several
     PyKota managed print servers, contrarily to the other
     database backends.
-    
+
     HowTo :
-    
+
       - Install SQLite v3.2.1 or higher, and its development files,
         for example on my Debian box :
-        
+
                 # apt-get install sqlite3 libsqlite3-dev
-                
-        You can also download SQLite from http://www.sqlite.org        
+
+        You can also download SQLite from http://www.sqlite.org
 
       - Download and install PySQLite v2.0.5 or higher from :
-      
+
                 http://www.pysqlite.org
 
@@ -50,10 +50,10 @@
                 # cd pysqlite-2.0.5
                 # python setup.py install
-                
+
         Under Debian, if the package exists for your version of Debian,
         simply do :
-        
+
                 # apt-get install python-pysqlite2
-                
+
       - Create an SQLite3 database for PyKota :
 
@@ -62,9 +62,9 @@
                 # chmod 660 ~pykota/pykota.db
                 # chown pykota.pykota ~pykota       (seems to be necessary)
-                
+
         NB : adapt the permissions so that the user your printing
              system runs as (e.g. user 'lp') can read and write
              to the /etc/pykota/pykota.db file.
-                
+
       - In ~pykota/pykotadmin.conf, just comment out all the lines
 
@@ -74,10 +74,10 @@
                 storagebackend : sqlitestorage
                 storagename : /etc/pykota/pykota.db
-                
+
         And comment out all other directives which name begins with 'storage'.
         NB : feel free to use a different path to store pykota.db, and
              adapt your configuration files and permissions accordingly.
-                
-Your PyKota setup is now ready to be used with an SQLite3 database.             
+
+Your PyKota setup is now ready to be used with an SQLite3 database.
 
 IMPORTANT : with PyKota's SQLite backend there's no possibility to separate
Index: pykota/trunk/initscripts/postgresql/README.postgresql
===================================================================
--- pykota/trunk/initscripts/postgresql/README.postgresql (revision 3279)
+++ pykota/trunk/initscripts/postgresql/README.postgresql (revision 3413)
@@ -31,28 +31,28 @@
         - edit the pykota-postgresql.sql file and modify the passwords on
           the 'CREATE USER' lines.
-          
+
         - Launch the psql frontend and connect to the
           database template1 as a PostgreSQL administrator
           (i.e. the postgres user) :
-          
+
           as user 'root' :
-          
+
             # su - postgres
-            
-          you're now user 'postgres', then continue with :   
-          
+
+          you're now user 'postgres', then continue with :
+
             $ psql -f pykota-postgresql.sql template1
-            
-          or depending on your settings you may prefer :  
-          
+
+          or depending on your settings you may prefer :
+
             $ psql -h localhost -U postgres -f pykota-postgresql.sql template1
-          
-        - If no error message appears, your PostgreSQL PyKota storage 
+
+        - If no error message appears, your PostgreSQL PyKota storage
           is now ready for use. NB : a lot of NOTICE messages might appear,
           this is perfectly normal.
-          
+
         - In ~pykota/pykota.conf, ensure that the following lines
           are present and unique inside the [global] section :
-        
+
             storagebackend : pgstorage
             storageserver : localhost
@@ -60,24 +60,24 @@
             storageuser : pykotauser
             storageuserpw : readonlypw
-            
+
             NB : replace 'readonlypw' with the password you chose
             for user 'pykotauser' when you modified pykota-postgresql.sql
-            
+
         - In ~pykota/pykotadmin.conf ensure that the following lines
           are present and unique inside the [global] section :
-        
+
             storageadmin : pykotaadmin
             storageadminpw : readwritepw
-            
+
             NB : replace 'readwritepw' with the password you chose
             for user 'pykotaadmin' when you modified pykota-postgresql.sql
-        
-        - IMPORTANT : if your database is not located on the print server, 
-          replace 'localhost' in the lines above with your database server's 
+
+        - IMPORTANT : if your database is not located on the print server,
+          replace 'localhost' in the lines above with your database server's
           hostname or IP address. If your database server doesn't listen on
           its standard port, add the port number at the end of the hostname
           with a colon to separate the hostname from the port.
           See pykota/conf/pykota.conf.sample for examples.
-          
+
 ============================================================
 
@@ -89,84 +89,84 @@
   Some scripts to upgrade old PyKota databases to the new
   database schema are included. You may have to run all
-  of them or only some of them, depending on your 
+  of them or only some of them, depending on your
   version of PyKota. Usually running them several times, for
   example if you used several different development versions
   of PyKota, won't do any harm.
-  
+
   If you're connected as user 'root', you have to be user 'postgres'
   instead :
-          
+
             # su - postgres
-            
+
   You're now user 'postgres', then continue the upgrade by following
   the instructions below, depending on the version you actually use :
-  
+
   * An SQL script to upgrade a 1.22 PyKota Storage DataBase to
     1.23 is included. Launch it this way on the Quota Storage Server :
-    
+
         $ psql -U postgres pykota
         pykota=# \i upgrade-to-1.23.sql
         pykota=# \q
         $
-        
+
     This script adds many fields to existing tables, and a table to
     manage billing codes.
-    
+
   * An SQL script to upgrade a 1.20 PyKota Storage DataBase to
     1.21 is included. Launch it this way on the Quota Storage Server :
-    
+
         $ psql -U postgres pykota
         pykota=# \i upgrade-to-1.21.sql
         pykota=# \q
         $
-        
+
     This script adds many fields to existing tables, and also adds
     some tables in indexes.
-    
+
   * An SQL script to upgrade a 1.18 PyKota Storage DataBase to
     1.19 is included. Launch it this way on the Quota Storage Server :
-    
+
         $ psql -U postgres pykota
         pykota=# \i upgrade-to-1.19.sql
         pykota=# \q
         $
-        
+
     This script adds a field to the print job history. The field that
     is added is : hostname
-    
+
   * An SQL script to upgrade a pre-1.16 PyKota Storage DataBase to
     1.16 is included. Launch it this way on the Quota Storage Server :
-    
+
         $ psql -U postgres pykota
         pykota=# \i upgrade-to-1.16.sql
         pykota=# \q
         $
-        
+
     This script adds some fields to the print job history, so that
     more complete information will be known. The fields that
-    are added are : jobprice, filename, title, copies and print 
+    are added are : jobprice, filename, title, copies and print
     command options. Also some indexes are created to speed things up.
-  
-What is below is for historical reasons only, real people don't use  
+
+What is below is for historical reasons only, real people don't use
 such old beasts, and YOU SHOULDN'T EITHER !
 
   * An SQL script to upgrade a pre-1.14 PyKota Storage DataBase to
     1.14 is included. Launch it this way on the Quota Storage Server :
-    
+
         $ psql -U postgres pykota
         pykota=# \i upgrade-to-1.14.sql
         pykota=# \q
         $
-        
-    This script adds an "email" field for each user. This field, if not    
+
+    This script adds an "email" field for each user. This field, if not
     NULL, is used as the email address of the user when sending warning
     messages in case he is over quota.
-    
-  * An sql script to upgrade a pre-1.01 PyKota Quota Storage DataBase to 
-    1.01 is still included for historical reasons. PLEASE DON'T USE IT ! 
-  
-  * If you are already running an old version of PyKota (<1.03) and 
-    want to upgrade to 1.03, YOU HAVE TO RUN the 
-    upgrade-from-before-1.03.py shell script. NOT LAUNCHING THIS SCRIPT 
-    WILL CAUSE PYKOTA TO STOP WORKING ! PLEASE NEVER RUN THIS SCRIPT IF 
-    YOUR EXISTING VERSION OF PYKOTA IS ALREADY 1.03 OR HIGHER. 
+
+  * An sql script to upgrade a pre-1.01 PyKota Quota Storage DataBase to
+    1.01 is still included for historical reasons. PLEASE DON'T USE IT !
+
+  * If you are already running an old version of PyKota (<1.03) and
+    want to upgrade to 1.03, YOU HAVE TO RUN the
+    upgrade-from-before-1.03.py shell script. NOT LAUNCHING THIS SCRIPT
+    WILL CAUSE PYKOTA TO STOP WORKING ! PLEASE NEVER RUN THIS SCRIPT IF
+    YOUR EXISTING VERSION OF PYKOTA IS ALREADY 1.03 OR HIGHER.
Index: pykota/trunk/initscripts/postgresql/VERYOLDpykota-upgrade-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/VERYOLDpykota-upgrade-postgresql.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/VERYOLDpykota-upgrade-postgresql.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -26,10 +26,10 @@
 -- the normal script instead.
 --
-                        
---                         
+
+--
 -- WARNING : YOU NEED A RECENT VERSION OF POSTGRESQL FOR THE DROP COLUMN STATEMENT TO WORK !
 --
 
---                         
+--
 -- Modify the old database schema
 --
@@ -37,5 +37,5 @@
 ALTER TABLE grouppquota DROP COLUMN pagecounter;
 
---                         
+--
 -- Create the groups/members relationship
 --
@@ -43,8 +43,8 @@
                            userid INT4 REFERENCES users(id),
                            PRIMARY KEY (groupid, userid));
-                           
---                        
--- Set some ACLs                        
+
 --
-REVOKE ALL ON groupsmembers FROM public;                        
+-- Set some ACLs
+--
+REVOKE ALL ON groupsmembers FROM public;
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON groupsmembers TO pykotaadmin;
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.21.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.21.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.21.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -22,10 +22,10 @@
 -- This script has to be used if you already
 -- have a pre-1.21 version of PyKota to upgrade
--- your database schema. 
+-- your database schema.
 --
 -- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA
 --
-                        
---                         
+
+--
 -- Modify the old database schema
 --
@@ -51,14 +51,14 @@
 CREATE INDEX jobhistory_u_id_ix ON jobhistory (userid);
 
--- 
+--
 -- Create the table for coefficients wrt paper sizes and the like
 --
-CREATE TABLE coefficients (id SERIAL PRIMARY KEY NOT NULL, 
-                           printerid INTEGER NOT NULL REFERENCES printers(id), 
-                           label TEXT NOT NULL, 
-                           coefficient FLOAT DEFAULT 1.0, 
+CREATE TABLE coefficients (id SERIAL PRIMARY KEY NOT NULL,
+                           printerid INTEGER NOT NULL REFERENCES printers(id),
+                           label TEXT NOT NULL,
+                           coefficient FLOAT DEFAULT 1.0,
                            CONSTRAINT coeffconstraint UNIQUE (printerid, label));
-                           
-REVOKE ALL ON coefficients FROM public;                        
+
+REVOKE ALL ON coefficients FROM public;
 REVOKE ALL ON coefficients_id_seq FROM public;
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON coefficients TO pykotaadmin;
Index: pykota/trunk/initscripts/postgresql/pykota-postgresql.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 3279)
+++ pykota/trunk/initscripts/postgresql/pykota-postgresql.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -35,11 +35,11 @@
 -- Create the print quota database users
 -- NOTE: Change the password values to the passwords you would like.
--- 
+--
 CREATE USER pykotauser WITH UNENCRYPTED PASSWORD 'readonlypw' NOCREATEDB NOCREATEUSER;
 CREATE USER pykotaadmin WITH UNENCRYPTED PASSWORD 'readwritepw' NOCREATEDB NOCREATEUSER;
 
--- 
+--
 -- Now connect to the new database
--- 
+--
 \connect pykota
 
@@ -49,5 +49,5 @@
 CREATE TABLE users(id SERIAL PRIMARY KEY NOT NULL,
                    username TEXT UNIQUE NOT NULL,
-                   email TEXT, 
+                   email TEXT,
                    balance FLOAT DEFAULT 0.0,
                    lifetimepaid FLOAT DEFAULT 0.0,
@@ -55,5 +55,5 @@
                    description TEXT,
                    overcharge FLOAT NOT NULL DEFAULT 1.0);
-                   
+
 --
 -- Create the groups table
@@ -63,5 +63,5 @@
                     description TEXT,
                     limitby TEXT DEFAULT 'quota');
-                    
+
 --
 -- Create the printers table
@@ -74,5 +74,5 @@
                       passthrough BOOLEAN DEFAULT FALSE,
                       maxjobsize INT4);
-                    
+
 --
 -- Create the print quota table for users
@@ -87,9 +87,9 @@
                         datelimit TIMESTAMP,
                         maxjobsize INT4,
-                        warncount INT4 DEFAULT 0); 
+                        warncount INT4 DEFAULT 0);
 CREATE INDEX userpquota_u_id_ix ON userpquota (userid);
 CREATE INDEX userpquota_p_id_ix ON userpquota (printerid);
 CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid);
-                        
+
 --
 -- Create the job history table
@@ -120,5 +120,5 @@
 CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate);
 CREATE INDEX jobhistory_hostname_ix ON jobhistory (hostname);
-                        
+
 --
 -- Create the print quota table for groups
@@ -134,6 +134,6 @@
 CREATE INDEX grouppquota_p_id_ix ON grouppquota (printerid);
 CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid);
-                        
---                         
+
+--
 -- Create the groups/members relationship
 --
@@ -141,6 +141,6 @@
                            userid INT4 REFERENCES users(id),
                            PRIMARY KEY (groupid, userid));
-                           
---                         
+
+--
 -- Create the printer groups relationship
 --
@@ -150,5 +150,5 @@
 --
 -- Create the table for payments
--- 
+--
 CREATE TABLE payments (id SERIAL PRIMARY KEY NOT NULL,
                        userid INT4 REFERENCES users(id),
@@ -158,14 +158,14 @@
 CREATE INDEX payments_date_ix ON payments (date);
 
--- 
+--
 -- Create the table for coefficients wrt paper sizes and the like
 --
-CREATE TABLE coefficients (id SERIAL PRIMARY KEY NOT NULL, 
-                           printerid INTEGER NOT NULL REFERENCES printers(id), 
-                           label TEXT NOT NULL, 
-                           coefficient FLOAT DEFAULT 1.0, 
+CREATE TABLE coefficients (id SERIAL PRIMARY KEY NOT NULL,
+                           printerid INTEGER NOT NULL REFERENCES printers(id),
+                           label TEXT NOT NULL,
+                           coefficient FLOAT DEFAULT 1.0,
                            CONSTRAINT coeffconstraint UNIQUE (printerid, label));
 
--- 
+--
 -- Create the table for the billing codes
 --
@@ -176,6 +176,6 @@
                            pagecounter INT4 DEFAULT 0);
 
---                        
--- Set some ACLs                        
+--
+-- Set some ACLs
 --
 REVOKE ALL ON users, groups, printers, userpquota, grouppquota, groupsmembers, printergroupsmembers, jobhistory, payments, coefficients, billingcodes FROM public;
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.14.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.14.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.14.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -19,10 +19,10 @@
 --
 --
-                        
---                         
+
+--
 -- WARNING : YOU NEED A RECENT VERSION OF POSTGRESQL FOR THE ALTER COLUMN STATEMENT TO WORK !
 --
 
---                         
+--
 -- Modify the old database schema
 --
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.23.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.23.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.23.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -22,10 +22,10 @@
 -- This script has to be used if you already
 -- have a pre-1.23alpha30 version of PyKota to upgrade
--- your database schema. 
+-- your database schema.
 --
 -- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA
 --
-                        
---                         
+
+--
 -- Modify the old database schema
 --
@@ -49,5 +49,5 @@
 UPDATE printers SET passthrough=FALSE;
 
--- 
+--
 -- Create the table for the billing codes
 --
@@ -59,5 +59,5 @@
 ALTER TABLE billingcodes RENAME COLUMN label TO billingcode;
 
-REVOKE ALL ON billingcodes FROM public;                        
+REVOKE ALL ON billingcodes FROM public;
 REVOKE ALL ON billingcodes_id_seq FROM public;
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON billingcodes TO pykotaadmin;
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.16.sql (revision 3413)
@@ -7,13 +7,13 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
--- 
+--
 -- $Id$
 --
@@ -22,14 +22,14 @@
 -- This script has to be used if you already
 -- have a pre-1.16 version of PyKota to upgrade
--- your database schema. 
+-- your database schema.
 --
 -- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA
 --
-                        
---                         
+
+--
 -- WARNING : YOU NEED A RECENT VERSION OF POSTGRESQL FOR THE ALTER COLUMN STATEMENT TO WORK !
 --
 
---                         
+--
 -- Modify the old database schema
 --
@@ -48,8 +48,8 @@
 ALTER TABLE jobhistory ADD CONSTRAINT checkUserPQuota FOREIGN KEY (userid, printerid) REFERENCES userpquota (userid, printerid);
 
--- 
+--
 -- Add new tables
 --
---                         
+--
 -- Create the printer groups relationship
 --
@@ -58,5 +58,5 @@
                            PRIMARY KEY (groupid, printerid));
 
---                         
+--
 -- Now add some indexes
 --
@@ -66,8 +66,8 @@
 CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid);
 
--- 
+--
 -- And now sets some ACLs
--- 
-REVOKE ALL ON printergroupsmembers FROM public;                        
+--
+REVOKE ALL ON printergroupsmembers FROM public;
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON printergroupsmembers TO pykotaadmin;
 GRANT SELECT ON printergroupsmembers TO pykotauser;
Index: pykota/trunk/initscripts/postgresql/upgrade-to-1.19.sql
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-to-1.19.sql (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-to-1.19.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -22,14 +22,14 @@
 -- This script has to be used if you already
 -- have a pre-1.19 version of PyKota to upgrade
--- your database schema. 
+-- your database schema.
 --
 -- YOU DON'T NEED TO USE IT IF YOU'VE JUST INSTALLED PYKOTA
 --
-                        
---                         
+
+--
 -- WARNING : YOU NEED A RECENT VERSION OF POSTGRESQL FOR THE ALTER COLUMN STATEMENT TO WORK !
 --
 
---                         
+--
 -- Modify the old database schema
 --
@@ -45,5 +45,5 @@
 CREATE INDEX payments_date_ix ON payments (date);
 
-REVOKE ALL ON payments FROM public;                        
+REVOKE ALL ON payments FROM public;
 REVOKE ALL ON payments_id_seq FROM public;
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON payments TO pykotaadmin;
Index: pykota/trunk/initscripts/postgresql/upgrade-from-before-1.03.py
===================================================================
--- pykota/trunk/initscripts/postgresql/upgrade-from-before-1.03.py (revision 3259)
+++ pykota/trunk/initscripts/postgresql/upgrade-from-before-1.03.py (revision 3413)
@@ -8,10 +8,10 @@
 # the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -26,5 +26,5 @@
 try :
     import pg
-except ImportError :    
+except ImportError :
     sys.stderr.write("The PyGreSQL Python module doesn't seem to be available. ABORTED.\n")
     sys.exit(-1)
@@ -32,7 +32,7 @@
 def dump_old_database() :
     """Dumps the existing PyKota database to a file, to avoir loosing data.
-    
+
        Returns 1 if dump is successfull, 0 if it isn't.
-    """   
+    """
     pipeinput = os.popen("pg_dump -C -D -N -U postgres -f pykota-dump.sql pykota")
     dummy = pipeinput.read()
@@ -44,5 +44,5 @@
     dummy = pipeinput.read()
     return (pipeinput.close() is None) or 0
-    
+
 def restore_original_database() :
     """Creates the empty database."""
@@ -50,28 +50,28 @@
     dummy = pipeinput.read()
     return (pipeinput.close() is None) or 0
-    
+
 def open_database(dbname="pykota") :
     """Returns the database object or None if we can't connect to it."""
     try :
         pykotadb = pg.connect(host="localhost", port=5432, dbname=dbname, user="postgres")
-    except pg.error, msg :     
+    except pg.error, msg :
         sys.stderr.write("%s\n" % msg)
         sys.stderr.write("Unable to connect to the local PostgreSQL server.\nPlease modify the open_database() method in %s\nto connect to the correct PostgreSQL server\nand relaunch the script.\n" % sys.argv[0])
-        return 
-    else :    
+        return
+    else :
         return pykotadb
-        
-        
+
+
 def doQuote(field) :
     """Quotes a field for use as a string in SQL queries."""
     if type(field) == type(0) : # TODO : do something safer
         typ = "decimal"
-    else :    
+    else :
         typ = "text"
     return pg._quote(field, typ)
-        
+
 def main() :
     """Does the work."""
-    
+
     # First we make a dump of the old database
     print "Dumping old database for safety...",
@@ -80,21 +80,21 @@
         return -1
     print "Done."
-        
-    # Second we try to connect to it    
-    print "Extracting datas from old database...", 
+
+    # Second we try to connect to it
+    print "Extracting datas from old database...",
     db = open_database()
     if db is None :
         sys.stderr.write("Impossible to connect to old PyKota database. ABORTED.\nAre you sure you are upgrading an existing installation ?\n")
         return -1
-    
+
     # Third we extract datas
     oldprinters = db.query("SELECT * FROM printers ORDER BY id;")
     oldusers = db.query("SELECT * FROM users ORDER BY id;")
     oldquotas = db.query("SELECT * FROM userpquota ORDER BY printerid, userid;")
-    
+
     # Fourth close the database
     db.close()
     print "Done."
-    
+
     # Fifth we delete the old database !
     answer = raw_input("The old database will be deleted for the upgrade to take place.\nAre you sure you want to continue (y/N) ? ")
@@ -112,7 +112,7 @@
         db.close()
         return -1
-    else :    
+    else :
         db.close()
-        
+
     # Sixth we create the new database
     print "Creating the new database...",
@@ -121,5 +121,5 @@
         return -1
     print "Done."
-    
+
     # Seventh we restore old data
     print "Restoring old datas..."
@@ -131,8 +131,8 @@
             sys.stderr.write("Shit ! A double-error occured !!!\nPlease report problem to your database administrator.\n")
             sys.stderr.write("And file a bug report to alet@librelogiciel.com\n")
-        else :    
+        else :
             print "Done."
         return -1
-    db.query("BEGIN;")    
+    db.query("BEGIN;")
     try :
         newprinters = {}
@@ -141,23 +141,23 @@
             newid = db.query("SELECT id FROM printers WHERE printername='%s';" % oldprinter["printername"]).dictresult()[0]["id"]
             newprinters[oldprinter["id"]] = newid
-        newusers = {}    
-        for olduser in oldusers.dictresult() :    
+        newusers = {}
+        for olduser in oldusers.dictresult() :
             db.query("INSERT INTO users (username) VALUES (%s);" % doQuote(olduser["username"]))
             newid = db.query("SELECT id FROM users WHERE username='%s';" % olduser["username"]).dictresult()[0]["id"]
             newusers[olduser["id"]] = newid
-        for oldquota in oldquotas.dictresult() :   
-            db.query("INSERT INTO userpquota (userid, printerid, pagecounter, lifepagecounter, softlimit, hardlimit, datelimit) VALUES (%s, %s, %s, %s, %s, %s, %s);" % 
+        for oldquota in oldquotas.dictresult() :
+            db.query("INSERT INTO userpquota (userid, printerid, pagecounter, lifepagecounter, softlimit, hardlimit, datelimit) VALUES (%s, %s, %s, %s, %s, %s, %s);" %
                                               (doQuote(newusers[oldquota["userid"]]) , doQuote(newprinters[oldquota["printerid"]]), doQuote(oldquota["pagecounter"]), doQuote(oldquota["lifepagecounter"]), doQuote(oldquota["softlimit"]), doQuote(oldquota["hardlimit"]), doQuote(oldquota["datelimit"])))
-    except pg.error, msg :    
+    except pg.error, msg :
         sys.stderr.write("ERROR : %s\nABORTED.\n" % msg)
         db.query("ROLLBACK;")
-        db.close()    
+        db.close()
         return -1
-    except :    
+    except :
         sys.stderr.write("Unknown error ! ABORTED.\n")
         db.query("ROLLBACK;")
-        db.close()    
+        db.close()
         return -1
-    else :    
+    else :
         db.query("COMMIT;")
         db.close()
@@ -165,5 +165,5 @@
     print "NB : Last job on each printer was lost. This is normal !"
     return 0
-    
+
 if __name__ == "__main__" :
     sys.exit(main())
Index: pykota/trunk/initscripts/mysql/README.mysql
===================================================================
--- pykota/trunk/initscripts/mysql/README.mysql (revision 3279)
+++ pykota/trunk/initscripts/mysql/README.mysql (revision 3413)
@@ -25,18 +25,18 @@
 DataBase using MySQL as a backend.
 
-        - edit the pykota-mysql.sql file and modify the passwords at 
+        - edit the pykota-mysql.sql file and modify the passwords at
           the end of the 'GRANT USAGE' lines.
-          
+
         - As MySQL's administrative user, usually root,
           do the following :
-          
+
             # mysql <pykota-mysql.sql
-            
+
         - If no error message appear, your MySQL PyKota storage
           is now ready for use.
-          
+
         - In ~pykota/pykota.conf, ensure that the following lines
           are present and unique inside the [global] section :
-        
+
             storagebackend : mysqlstorage
             storageserver : localhost
@@ -44,23 +44,23 @@
             storageuser : pykotauser
             storageuserpw : readonlypw
-            
+
             NB : replace 'readonlypw' with the password you chose
             for user 'pykotauser' when you modified pykota-mysql.sql
-            
+
         - In ~pykota/pykotadmin.conf ensure that the following lines
           are present and unique inside the [global] section :
-        
+
             storageadmin : pykotaadmin
             storageadminpw : readwritepw
-            
+
             NB : replace 'readwritepw' with the password you chose
             for user 'pykotaadmin' when you modified pykota-mysql.sql
-            
-        - IMPORTANT : if your database is not located on the print server, 
-          replace 'localhost' in the lines above with your database server's 
+
+        - IMPORTANT : if your database is not located on the print server,
+          replace 'localhost' in the lines above with your database server's
           hostname or IP address. If your database server doesn't listen on
           its standard port, add the port number at the end of the hostname
           with a colon to separate the hostname from the port.
           See pykota/conf/pykota.conf.sample for examples.
-        
+
 ============================================================
Index: pykota/trunk/initscripts/mysql/pykota-mysql.sql
===================================================================
--- pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 3279)
+++ pykota/trunk/initscripts/mysql/pykota-mysql.sql (revision 3413)
@@ -7,10 +7,10 @@
 -- the Free Software Foundation, either version 3 of the License, or
 -- (at your option) any later version.
--- 
+--
 -- This program is distributed in the hope that it will be useful,
 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 -- GNU General Public License for more details.
--- 
+--
 -- You should have received a copy of the GNU General Public License
 -- along with this program.  If not, see <http://www.gnu.org/licenses/>.
@@ -35,9 +35,9 @@
 -- Create the print quota database users
 -- NOTE: Change the "IDENTIFIED BY" strings to the passwords you would like.
--- 
+--
 GRANT USAGE ON *.* TO 'pykotauser'@'localhost' IDENTIFIED BY 'readonlypw';
 GRANT USAGE ON *.* TO 'pykotaadmin'@'localhost' IDENTIFIED BY 'readwritepw';
 
--- 
+--
 -- If necessary activate the lines below (and keep the preceding ones
 -- activated at the same time)
@@ -46,7 +46,7 @@
 -- GRANT USAGE ON *.* TO 'pykotaadmin'@'%' IDENTIFIED BY 'readwritepw';
 
--- 
+--
 -- Now connect to the new database
--- 
+--
 USE pykota;
 
@@ -56,5 +56,5 @@
 CREATE TABLE users (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT,
                    username VARCHAR(255) UNIQUE NOT NULL,
-                   email TEXT, 
+                   email TEXT,
                    balance FLOAT DEFAULT 0.0,
                    lifetimepaid FLOAT DEFAULT 0.0,
@@ -62,5 +62,5 @@
                    description TEXT,
                    overcharge FLOAT NOT NULL DEFAULT 1.0) TYPE=INNODB;
-                   
+
 --
 -- Create the groups table
@@ -70,5 +70,5 @@
                     description TEXT,
                     limitby VARCHAR(30) DEFAULT 'quota') TYPE=INNODB;
-                    
+
 --
 -- Create the printers table
@@ -81,11 +81,11 @@
                       passthrough ENUM('t','f') DEFAULT 'f',
                       maxjobsize INT4) TYPE=INNODB;
-                    
+
 --
 -- Create the print quota table for users
 --
 CREATE TABLE userpquota (id INT8 PRIMARY KEY NOT NULL AUTO_INCREMENT,
-                        userid INT4, 
-                        printerid INT4, 
+                        userid INT4,
+                        printerid INT4,
                         lifepagecounter INT4 DEFAULT 0,
                         pagecounter INT4 DEFAULT 0,
@@ -94,12 +94,12 @@
                         datelimit DATETIME,
                         maxjobsize INT4,
-                        warncount INT4 DEFAULT 0, 
+                        warncount INT4 DEFAULT 0,
                         INDEX (userid),
                         FOREIGN KEY (userid) REFERENCES users(id),
                         INDEX (printerid),
-                        FOREIGN KEY (printerid) REFERENCES printers(id)) 
+                        FOREIGN KEY (printerid) REFERENCES printers(id))
                         TYPE=INNODB;
 CREATE UNIQUE INDEX userpquota_up_id_ix ON userpquota (userid, printerid);
-                        
+
 --
 -- Create the job history table
@@ -132,10 +132,10 @@
 CREATE INDEX jobhistory_pd_id_ix ON jobhistory (printerid, jobdate);
 CREATE INDEX jobhistory_hostname_ix ON jobhistory (hostname);
-                        
+
 --
 -- Create the print quota table for groups
 --
 CREATE TABLE grouppquota(id INT8 PRIMARY KEY NOT NULL AUTO_INCREMENT,
-                         groupid INT4, 
+                         groupid INT4,
                          printerid INT4,
                          softlimit INT4,
@@ -149,6 +149,6 @@
                          TYPE=INNODB;
 CREATE UNIQUE INDEX grouppquota_up_id_ix ON grouppquota (groupid, printerid);
-                        
---                         
+
+--
 -- Create the groups/members relationship
 --
@@ -160,6 +160,6 @@
                            FOREIGN KEY (userid) REFERENCES users(id),
                            PRIMARY KEY (groupid, userid)) TYPE=INNODB;
-                           
---                         
+
+--
 -- Create the printer groups relationship
 --
@@ -173,5 +173,5 @@
 --
 -- Create the table for payments
--- 
+--
 CREATE TABLE payments (id INT4 PRIMARY KEY NOT NULL AUTO_INCREMENT,
                        userid INT4,
@@ -195,5 +195,5 @@
                            ) TYPE=INNODB;
 
--- 
+--
 -- Create the table for the billing codes
 --
@@ -203,11 +203,11 @@
                            balance FLOAT DEFAULT 0.0,
                            pagecounter INT4 DEFAULT 0) TYPE=INNODB;
---                        
--- Set some ACLs                        
+--
+-- Set some ACLs
 --
 GRANT SELECT, INSERT, UPDATE, DELETE, REFERENCES ON `pykota`.* TO 'pykotaadmin'@'localhost';
 GRANT SELECT ON `pykota`.* TO 'pykotauser'@'localhost';
 
--- 
+--
 -- If necessary activate the lines below (and keep the preceding ones
 -- activated at the same time)
Index: pykota/trunk/initscripts/README
===================================================================
--- pykota/trunk/initscripts/README (revision 3279)
+++ pykota/trunk/initscripts/README (revision 3413)
@@ -29,59 +29,59 @@
 
   * postgresql/pykota-postgresql.sql :
-  
+
     This file creates an empty Quota Storage Database, using PostgreSQL
     as a backend. You have to use it the first time you install PyKota
     if you want to use PostgreSQL as the Quota Storage Backend.
-    
-  * ldap/pykota.schema :  
-  
+
+  * ldap/pykota.schema :
+
     This file adds the necessary classes and attributes to an existing
-    LDAP directory for use with PyKota. Read this file and the 
+    LDAP directory for use with PyKota. Read this file and the
     associated ldap/README.ldap files for details.
-    
-    
-Old files, kept to allow people to upgrade from very old versions of PyKota :   
+
+
+Old files, kept to allow people to upgrade from very old versions of PyKota :
 =============================================================================
-    
-  * upgrade-to-1.19.sql :  
-  
+
+  * upgrade-to-1.19.sql :
+
     This file upgrades the PostgreSQL Quota Storage Database schema
     from versions before 1.19alpha7 to version 1.19alpha7 and above.
     NEVER USE IT IF YOU ALREADY RUN 1.19alpha7 OR ABOVE !
-    
-  * upgrade-to-1.16.sql :  
-  
+
+  * upgrade-to-1.16.sql :
+
     This file upgrades the PostgreSQL Quota Storage Database schema
     from versions before 1.16 to version 1.16.
     NEVER USE IT IF YOU ALREADY RUN 1.16 OR ABOVE !
-    
-  * upgrade-to-1.14.sql :  
-  
+
+  * upgrade-to-1.14.sql :
+
     This file upgrades the PostgreSQL Quota Storage Database schema
     from versions before 1.14 to version 1.14.
     NEVER USE IT IF YOU ALREADY RUN 1.14 OR ABOVE !
-    
+
   * VERYOLDpykota-upgrade-postgresql.sql :
-  
+
     This file upgrades the PostgreSQL Quota Storage Database schema
     from versions before 1.01 to version 1.01.
-    
+
     IT'S THERE FOR HISTORICAL REASONS ONLY : DON'T USE IT, USE
     THE SCRIPT DESCRIBED BELOW INSTEAD !
-    
+
   * upgrade-from-before-1.03.py :
-  
+
     This shell script upgrades the PostgreSQL Quota Storage Database schema
     from versions 1.01 or 1.02 to version 1.03.
     PLEASE DO A BACKUP OF YOUR PYKOTA DATABASE BEFORE RUNNING THIS SCRIPT !
     Also this script will try to connect to PostgreSQL as the postgres user
-    (i.e. PostgreSQL's administrator), on the local machine (PyKota Storage 
-    Server), without prompting for a password. Please read this script and 
+    (i.e. PostgreSQL's administrator), on the local machine (PyKota Storage
+    Server), without prompting for a password. Please read this script and
     adapt it to your own configuration before running it. THIS IS IMPORTANT.
-    
-    THIS SCRIPT MAKES ANY REASONABLE CHECK TO ENSURE THAT YOUR DATAS WON'T 
+
+    THIS SCRIPT MAKES ANY REASONABLE CHECK TO ENSURE THAT YOUR DATAS WON'T
     BE LOST, AND ALSO DUMPS YOUR OLD DATABASE TO A TEXT FILE BEFORE DOING
     ANYTHING. IT WAS TESTED SEVERAL TIMES AND SHOULDN'T PRODUCE ANY ERROR
-    EXCEPT ABOUT THE pykotaadmin and pykotauser POSTGRESQL USERS WHO 
+    EXCEPT ABOUT THE pykotaadmin and pykotauser POSTGRESQL USERS WHO
     ALREADY EXIST WHEN THE DATABASE SCHEMA IS UPGRADED. THIS IS NORMAL !
-  
+
