diff options
| author | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-02-14 12:09:11 +0000 |
|---|---|---|
| committer | donncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36> | 2006-02-14 12:09:11 +0000 |
| commit | 39854b3d3a80e4ac2bfee92a4b1210852baa7091 (patch) | |
| tree | 95125abe2a96d8b137949ce71bc33340a0c6e376 /wp-inst/wp-admin/inline-uploading.php | |
| parent | 5cd626aede5b92cd056bc0e205ac9dedfd96ae05 (diff) | |
WP Merge - requires upgrading of db through wp-admin/upgrade.php!
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@524 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-inst/wp-admin/inline-uploading.php')
| -rw-r--r-- | wp-inst/wp-admin/inline-uploading.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wp-inst/wp-admin/inline-uploading.php b/wp-inst/wp-admin/inline-uploading.php index 88b1239..f2a0b58 100644 --- a/wp-inst/wp-admin/inline-uploading.php +++ b/wp-inst/wp-admin/inline-uploading.php @@ -63,7 +63,7 @@ $filename = basename($file); $attachment = array(
'post_title' => $imgtitle ? $imgtitle : $filename,
'post_content' => $descr,
- 'post_status' => 'attachment',
+ 'post_type' => 'attachment',
'post_parent' => $post,
'post_mime_type' => $type,
'guid' => $url
@@ -127,7 +127,7 @@ if (! current_user_can('edit_others_posts') ) $and_user = "AND post_author = " . $user_ID;
if ( $last )
- $start = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment' $and_user $and_post") - $num;
+ $start = $wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment' $and_user $and_post") - $num;
else
$start = (int) $start;
@@ -137,7 +137,7 @@ if ( $start < 0 ) if ( '' == $sort )
$sort = "post_date_gmt DESC";
-$attachments = $wpdb->get_results("SELECT ID, post_date, post_title, post_mime_type, guid FROM $wpdb->posts WHERE post_status = 'attachment' $and_type $and_post $and_user ORDER BY $sort LIMIT $start, $double", ARRAY_A);
+$attachments = $wpdb->get_results("SELECT ID, post_date, post_title, post_mime_type, guid FROM $wpdb->posts WHERE post_type = 'attachment' $and_type $and_post $and_user ORDER BY $sort LIMIT $start, $double", ARRAY_A);
if ( count($attachments) == 0 ) {
header("Location: ".basename(__FILE__)."?post=$post&action=upload");
@@ -646,7 +646,7 @@ th { <?php if ( $attachments = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$post'") ) { ?>
<li<?php echo $current_2; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>&all=false"><?php _e('Browse'); ?></a></li>
<?php } ?>
-<?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_status = 'attachment'")) { ?>
+<?php if ($wpdb->get_var("SELECT count(ID) FROM $wpdb->posts WHERE post_type = 'attachment'")) { ?>
<li<?php echo $current_3; ?>><a href="<?php echo basename(__FILE__); ?>?action=view&post=<?php echo $post; ?>&all=true"><?php _e('Browse All'); ?></a></li>
<?php } ?>
<li> </li>
|
