Set default tab for inline uploader. Props skeltoac. fixes #1905

git-svn-id: https://develop.svn.wordpress.org/trunk@3146 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-11-18 09:28:37 +00:00
parent 7a90a61c9d
commit 2ec4d8bd55
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;