Changeset 11396


Ignore:
Timestamp:
Nov 8, 2010, 7:16:03 PM (11 years ago)
Author:
charles
Message:

(trunk) #3698 "creation date of magnet links are set before the epoch." -- fixed.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/details.c

    r11343 r11396  
    606606    char buf[64];
    607607    struct tm tm;
     608
     609    if( !t )
     610        return g_strdup( _( "N/A" ) );
     611
    608612    tr_localtime_r( &t, &tm );
    609613    strftime( buf, sizeof( buf ), "%d %b %Y", &tm );
  • trunk/qt/details.cc

    r11246 r11396  
    620620        if( mixed_creator && mixed_date )
    621621            string = mixed;
    622         else if( mixed_date )
     622        else if( mixed_date && !creator.isEmpty())
    623623            string = tr( "Created by %1" ).arg( creator );
    624         else if( mixed_creator || creator.isEmpty( ) )
     624        else if( mixed_creator && !date.isEmpty())
    625625            string = tr( "Created on %1" ).arg( date );
     626        else if( creator.isEmpty() && date.isEmpty())
     627            string = tr( "N/A" );
    626628        else
    627629            string = tr( "Created by %1 on %2" ).arg( creator ).arg( date );
  • trunk/web/javascript/formatter.js

    r11228 r11396  
    211211                timestamp: function( seconds )
    212212                {
     213                        if( !seconds )
     214                                return 'N/A';
     215
    213216                        var myDate = new Date(seconds*1000);
    214217                        var now = new Date();
Note: See TracChangeset for help on using the changeset viewer.