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
This commit is contained in:
ryan 2005-11-18 09:28:37 +00:00
parent f4f22fce81
commit a0b9e7c1a1
1 changed files with 4 additions and 1 deletions

View File

@ -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;