Make WordPress Core


Ignore:
Timestamp:
02/22/2008 10:38:52 PM (17 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-attachment-rows.php

    r6980 r6988  
    6767            $m_time = $post->post_date;
    6868            $time = get_post_time();
    69             if ( ( abs(time() - $time) ) < 86400 ) {
    70                 if ( 'future' == get_post_status($post->ID) )
     69            if ( ( abs($t_diff = time() - $time) ) < 86400 ) {
     70                if ( $t_diff < 0 )
    7171                    $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
    7272                else
     
    8282
    8383    case 'parent':
    84         $title = get_the_title($post->post_parent);
    85         if ( empty($title) )
    86             $title = __('(no title)');
     84        if ( $post_parent = get_post($post->post_parent) ) {
     85            $title = get_the_title($post->post_parent);
     86            if ( empty($title) )
     87                $title = __('(no title)');
     88        } else {
     89            $title = '';
     90        }
    8791        ?>
    8892        <td><strong><a href="post.php?action=edit&amp;post=<?php echo $post->post_parent; ?>"><?php echo $title ?></a></strong></td>
Note: See TracChangeset for help on using the changeset viewer.