Date and title fixes for media management from andy. fixes #5927

git-svn-id: http://svn.automattic.com/wordpress/trunk@6988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-22 22:38:52 +00:00
parent bc092c9a68
commit 3d70875d81
1 changed files with 9 additions and 5 deletions

View File

@ -66,8 +66,8 @@ foreach($posts_columns as $column_name=>$column_display_name) {
$t_time = get_the_time(__('Y/m/d g:i:s A')); $t_time = get_the_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_date; $m_time = $post->post_date;
$time = get_post_time(); $time = get_post_time();
if ( ( abs(time() - $time) ) < 86400 ) { if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
if ( 'future' == get_post_status($post->ID) ) if ( $t_diff < 0 )
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
else else
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
@ -81,9 +81,13 @@ foreach($posts_columns as $column_name=>$column_display_name) {
break; break;
case 'parent': case 'parent':
if ( $post_parent = get_post($post->post_parent) ) {
$title = get_the_title($post->post_parent); $title = get_the_title($post->post_parent);
if ( empty($title) ) if ( empty($title) )
$title = __('(no title)'); $title = __('(no title)');
} else {
$title = '';
}
?> ?>
<td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td> <td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
<?php <?php