Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3/wp-admin/includes/upload.php

    r5965 r6234  
    3232    $src_base = str_replace($src, '', $src_base);
    3333
     34    if ( !trim($post_title) )
     35        $post_title = basename($src);
     36
    3437    $r = '';
    3538
     
    4043    if ( $href )
    4144        $r .= "</a>\n";
    42     $r .= "\t\t\t\t<span class='upload-file-size'>".size_format(filesize($filesystem_path))."</span>\n";
     45    $size = @filesize($filesystem_path);
     46    if ( !empty($size) )
     47        $r .= "\t\t\t\t<span class='upload-file-size'>".size_format($size)."</span>\n";
    4348    $r .= "\n\t\t<div class='upload-file-data'>\n\t\t\t<p>\n";
    4449    $r .= "\t\t\t\t<input type='hidden' name='attachment-url-$id' id='attachment-url-$id' value='$src' />\n";
Note: See TracChangeset for help on using the changeset viewer.