Changeset 2248

Show
Ignore:
Timestamp:
2008-07-25 01:34:02 (6 weeks ago)
Author:
dmondark
Message:

Do not display the how many post the user has if he/she don't have any. Fixes #533. Thanks arthus.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/htdocs/system/admin/users_items.php

    r2179 r2248  
    3131                    } 
    3232                } 
    33  
    34                 printf( _t( 'was last seen %1$s at %2$s and currently has %3$s'), 
     33                 
     34                $string = 'was last seen %1$s at %2$s'; 
     35                if(Posts::count_by_author( $user->id, Post::status('any') ) != 0) { 
     36                    $string .= ' and currently has %3$s'; 
     37                } 
     38                 
     39                printf( _t( $string ), 
    3540                    "<strong>" . date('M j, Y', strtotime($user->info->authenticate_time)) . "</strong>", 
    3641                    "<strong>" . date('H:i', strtotime($user->info->authenticate_time)) . "</strong>", 
    3742                    Format::and_list( $message_bits ) 
    3843                ); 
     44                 
     45                 
    3946            } 
    4047        ?>