Changeset 1419 for pykota/trunk/cgi-bin

Show
Ignore:
Timestamp:
03/24/04 20:37:04 (21 years ago)
Author:
jalet
Message:

Doesn't retrieve users or printers objects to display the history,
this is not needed, and saves a lot of time (and database queries
if storagecahing is disabled)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/printquota.cgi

    r1278 r1419  
    2323# 
    2424# $Log$ 
     25# Revision 1.26  2004/03/24 19:37:04  jalet 
     26# Doesn't retrieve users or printers objects to display the history, 
     27# this is not needed, and saves a lot of time (and database queries 
     28# if storagecahing is disabled) 
     29# 
    2530# Revision 1.25  2004/01/12 15:28:45  jalet 
    2631# Now can output the user's history on several printers at the same time. 
     
    274279                    elif job.JobAction == "WARN" :     
    275280                        oddevenclass = "warn" 
    276                     username = '<a href="%s?%s">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode({"history" : 1, "username" : job.User.Name}), job.User.Name) 
    277                     self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (job.JobDate[:19], username, job.Printer.Name, job.PrinterPageCounter, job.JobId, job.JobSize, job.JobPrice, job.JobCopies, job.JobTitle, job.JobFileName, job.JobOptions, job.JobAction)]))) 
     281                    username = '<a href="%s?%s">%s</a>' % (os.environ.get("SCRIPT_NAME", ""), urllib.urlencode({"history" : 1, "username" : job.UserName}), job.UserName) 
     282                    self.report.append('<tr class="%s">%s</tr>' % (oddevenclass, "".join(["<td>%s</td>" % h for h in (job.JobDate[:19], username, job.PrinterName, job.PrinterPageCounter, job.JobId, job.JobSize, job.JobPrice, job.JobCopies, job.JobTitle, job.JobFileName, job.JobOptions, job.JobAction)]))) 
    278283                self.report.append('</table>') 
    279284                dico = { "history" : 1,