Make WordPress Core

Ticket #6027: human-diff-comments.diff

File human-diff-comments.diff, 1.1 KB (added by nbachiyski, 19 years ago)
  • wp-admin/includes/template.php

     
    606606        $author_url_display = $author_url;
    607607        if ( strlen($author_url_display) > 50 )
    608608                $author_url_display = substr($author_url_display, 0, 49) . '...';
    609         $ptime = get_post_time('G', true);
    610         if ( ( abs(time() - $ptime) ) < 86400 )
    611                 $ptime = sprintf( __('%s ago'), human_time_diff( $ptime ) );
     609        $hours = mysql2date('G', $comment->comment_date_gmt);
     610        if ( ( abs(time() - $hours) ) < 86400 )
     611                $ptime = sprintf( __('%s ago'), human_time_diff( $hours ) );
    612612        else
    613                 $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $post->post_date);
     613                $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $comment->comment_date);
    614614
    615615        $delete_url  = clean_url( wp_nonce_url( "comment.php?action=deletecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "delete-comment_$comment->comment_ID" ) );
    616616        $approve_url = clean_url( wp_nonce_url( "comment.php?action=approvecomment&p=$comment->comment_post_ID&c=$comment->comment_ID", "approve-comment_$comment->comment_ID" ) );