Changeset 2217 for pykota/trunk/pykota/storages/ldapstorage.py
- Timestamp:
- 04/24/05 00:01:46 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldapstorage.py
r2211 r2217 531 531 lastjob.JobHostName = fields.get("pykotaHostName", [""])[0] 532 532 lastjob.JobSizeBytes = fields.get("pykotaJobSizeBytes", [0L])[0] 533 lastjob.JobBillingCode = fields.get("pykotaBillingCode", [None])[0]533 lastjob.JobBillingCode = self.databaseToUserCharset(fields.get("pykotaBillingCode", [None])[0]) 534 534 lastjob.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 535 535 lastjob.JobPages = fields.get("pykotaPages", [""])[0] … … 929 929 self.doModify(lastjob.ident, fields) 930 930 931 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None, clienthost=None, jobsizebytes=None, jobmd5sum=None ) :931 def writeJobNew(self, printer, user, jobid, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None, clienthost=None, jobsizebytes=None, jobmd5sum=None, jobpages=None, jobbilling=None) : 932 932 """Adds a job in a printer's history.""" 933 933 if (not self.disablehistory) or (not printer.LastJob.Exists) : … … 939 939 if self.privacy : 940 940 # For legal reasons, we want to hide the title, filename and options 941 title = filename = options = "Hidden because of privacy concerns"941 title = filename = options = _("Hidden because of privacy concerns") 942 942 fields = { 943 943 "objectClass" : ["pykotaObject", "pykotaJob"], … … 955 955 "pykotaJobSizeBytes" : str(jobsizebytes), 956 956 "pykotaMD5Sum" : str(jobmd5sum), 957 "pykotaPages" : jobpages, # don't add this attribute if it is not set, so no string conversion 958 "pykotaBillingCode" : self.userCharsetToDatabase(jobbilling), # don't add this attribute if it is not set, so no string conversion 957 959 } 958 960 if (not self.disablehistory) or (not printer.LastJob.Exists) : … … 1089 1091 job.JobHostName = fields.get("pykotaHostName", [""])[0] 1090 1092 job.JobSizeBytes = fields.get("pykotaJobSizeBytes", [0L])[0] 1091 job.JobBillingCode = fields.get("pykotaBillingCode", [None])[0]1093 job.JobBillingCode = self.databaseToUserCharset(fields.get("pykotaBillingCode", [None])[0]) 1092 1094 job.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 1093 1095 job.JobPages = fields.get("pykotaPages", [""])[0]