From a0b9e7c1a166c109d680d945653ecc2637e31bcb Mon Sep 17 00:00:00 2001 From: ryan Date: Fri, 18 Nov 2005 09:28:37 +0000 Subject: [PATCH] Set default tab for inline uploader. Props skeltoac. fixes #1905 git-svn-id: http://svn.automattic.com/wordpress/trunk@3146 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/inline-uploading.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index 239a856819..58e450796f 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -121,7 +121,10 @@ if ( '' == $sort ) $images = $wpdb->get_results("SELECT ID, post_date, post_title, guid FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image' $and_post ORDER BY $sort LIMIT $start, $double", ARRAY_A); -if ( count($images) > $num ) { +if ( count($images) == 0 ) { + header("Location: ".basename(__FILE__)."?post=$post&action=upload"); + die; +} elseif ( count($images) > $num ) { $next = $start + count($images) - $num; } else { $next = false;