Show
Ignore:
Timestamp:
06/08/05 09:19:43 (19 years ago)
Author:
jerome
Message:

Now stores 'hidden' in the title, filename and options fields instead of the
sentence "Hidden because of privacy concerns". When the history is retrieved,
'hidden' is automatically transformed into this sentence, translated into
the final user's preferred language. This effectively delays the translation
until the message is needed, and allows the database to be consitent when
different users with different locales use the system.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r2266 r2287  
    266266            lastjob.JobPages = fields.get("pages") 
    267267            lastjob.JobBillingCode = self.databaseToUserCharset(fields.get("billingcode")) 
     268            if lastjob.JobTitle == lastjob.JobFileName == lastjob.JobOptions == "hidden" : 
     269                (lastjob.JobTitle, lastjob.JobFileName, lastjob.JobOptions) = (_("Hidden because of privacy concerns"),) * 3 
    268270            lastjob.Exists = 1 
    269271        return lastjob 
     
    464466        if self.privacy :     
    465467            # For legal reasons, we want to hide the title, filename and options 
    466             title = filename = options = _("Hidden because of privacy concerns") 
     468            title = filename = options = "hidden" 
    467469        filename = self.userCharsetToDatabase(filename) 
    468470        title = self.userCharsetToDatabase(title) 
     
    552554                job.UserName = fields.get("username") 
    553555                job.PrinterName = fields.get("printername") 
     556                if job.JobTitle == job.JobFileName == job.JobOptions == "hidden" : 
     557                    (job.JobTitle, job.JobFileName, job.JobOptions) = (_("Hidden because of privacy concerns"),) * 3 
    554558                job.Exists = 1 
    555559                jobs.append(job)