diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-23 18:28:40 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2007-10-23 18:28:40 +0000 |
| commit | 87bb8cd69cc593fe6bed330fb1791eac9df87167 (patch) | |
| tree | 6b2ad252df89d2a1863198fd44b321b59e42ef54 /wp-admin/includes/upload.php | |
| parent | 0cbda3349a2571904ea063fdd73e018299919589 (diff) | |
| download | wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.gz wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.tar.xz wordpress-mu-87bb8cd69cc593fe6bed330fb1791eac9df87167.zip | |
Merge with WordPress, rev 6285 and untested
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1125 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-admin/includes/upload.php')
| -rw-r--r-- | wp-admin/includes/upload.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wp-admin/includes/upload.php b/wp-admin/includes/upload.php index 61b0302..c66feeb 100644 --- a/wp-admin/includes/upload.php +++ b/wp-admin/includes/upload.php @@ -31,6 +31,9 @@ function wp_upload_display( $dims = false, $href = '' ) { $src = wp_make_link_relative( $src_base ); $src_base = str_replace($src, '', $src_base); + if ( !trim($post_title) ) + $post_title = basename($src); + $r = ''; if ( $href ) @@ -39,7 +42,9 @@ function wp_upload_display( $dims = false, $href = '' ) { $r .= "\t\t\t$innerHTML"; if ( $href ) $r .= "</a>\n"; - $r .= "\t\t\t\t<span class='upload-file-size'>".size_format(filesize($filesystem_path))."</span>\n"; + $size = @filesize($filesystem_path); + if ( !empty($size) ) + $r .= "\t\t\t\t<span class='upload-file-size'>".size_format($size)."</span>\n"; $r .= "\n\t\t<div class='upload-file-data'>\n\t\t\t<p>\n"; $r .= "\t\t\t\t<input type='hidden' name='attachment-url-$id' id='attachment-url-$id' value='$src' />\n"; $r .= "\t\t\t\t<input type='hidden' name='attachment-url-base-$id' id='attachment-url-base-$id' value='$src_base' />\n"; |
