Show
Ignore:
Timestamp:
01/13/07 23:35:41 (23 months ago)
Author:
asterix
Message:

merge diff from trunc to 0.11 branch

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/gajim_0.11/src/common/logger.py

    r7787 r7829  
    426426                self.cur.execute(''' 
    427427                        SELECT time, kind, message FROM logs 
    428                         WHERE (%s) AND kind IN (%d, %d, %d, %d) AND time > %d 
     428                        WHERE (%s) AND kind IN (%d, %d, %d, %d, %d) AND time > %d 
    429429                        ORDER BY time DESC LIMIT %d OFFSET %d 
    430                         ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV, constants.KIND_CHAT_MSG_RECV, 
    431                                 constants.KIND_SINGLE_MSG_SENT, constants.KIND_CHAT_MSG_SENT, 
     430                        ''' % (where_sql, constants.KIND_SINGLE_MSG_RECV, 
     431                                constants.KIND_CHAT_MSG_RECV, constants.KIND_SINGLE_MSG_SENT, 
     432                                constants.KIND_CHAT_MSG_SENT, constants.KIND_ERROR, 
    432433                                timed_out, restore_how_many_rows, pending_how_many) 
    433434                        ) 
     
    516517                result = self.cur.fetchall() 
    517518 
    518                 # Copy all interesant time in a temporary table  
     519                # Copy all interesting times in a temporary table  
    519520                self.cur.execute('CREATE TEMPORARY TABLE blabla(time,INTEGER)')  
    520521                for line in result:  
     
    555556                        where_sql = 'jid_id = %s' % jid_id       
    556557                self.cur.execute(''' 
    557                         SELECT time FROM logs 
     558                        SELECT MAX(time) FROM logs 
    558559                        WHERE (%s)  
    559560                        AND kind NOT IN (%d, %d) 
    560                         ORDER BY time DESC LIMIT 1 
    561561                        ''' % (where_sql, constants.KIND_STATUS, constants.KIND_GCSTATUS)) 
    562562