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/ldapstorage.py

    r2276 r2287  
    541541                lastjob.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 
    542542                lastjob.JobPages = fields.get("pykotaPages", [""])[0] 
     543                if lastjob.JobTitle == lastjob.JobFileName == lastjob.JobOptions == "hidden" : 
     544                    (lastjob.JobTitle, lastjob.JobFileName, lastjob.JobOptions) = (_("Hidden because of privacy concerns"),) * 3 
    543545                date = fields.get("createTimestamp", ["19700101000000"])[0] 
    544546                year = int(date[:4]) 
     
    946948        if self.privacy :     
    947949            # For legal reasons, we want to hide the title, filename and options 
    948             title = filename = options = _("Hidden because of privacy concerns") 
     950            title = filename = options = "hidden" 
    949951        fields = { 
    950952                   "objectClass" : ["pykotaObject", "pykotaJob"], 
     
    11031105                job.JobMD5Sum = fields.get("pykotaMD5Sum", [None])[0] 
    11041106                job.JobPages = fields.get("pykotaPages", [""])[0] 
     1107                if job.JobTitle == job.JobFileName == job.JobOptions == "hidden" : 
     1108                    (job.JobTitle, job.JobFileName, job.JobOptions) = (_("Hidden because of privacy concerns"),) * 3 
    11051109                date = fields.get("createTimestamp", ["19700101000000"])[0] 
    11061110                year = int(date[:4])