Index: wp-includes/general-template.php
===================================================================
--- wp-includes/general-template.php	(revision 4275)
+++ wp-includes/general-template.php	(working copy)
@@ -902,6 +902,8 @@
 
 	// Who knows what else people pass in $args
 	$total    = (int) $total;
+	if ( $total < 2 )
+		return;
 	$current  = (int) $current;
 	$end_size = 0  < (int) $end_size ? (int) $end_size : 1; // Out of bounds?  Make it the default.
 	$mid_size = 0 <= (int) $mid_size ? (int) $mid_size : 2;
@@ -912,7 +914,8 @@
 	$dots = false;
 
 	if ( $prev_next && $current && 1 < $current ) :
-		$link = str_replace('%_%', 2 == $current ? '' : str_replace('%#%', $current - 1, $format), $base);
+		$link = str_replace('%_%', 2 == $current ? '' : $format, $base);
+		$link = str_replace('%#%', $current - 1, $link);
 		if ( $add_args )
 			$link = add_query_arg( $add_args, $link );
 		$page_links[] = "<a class='prev page-numbers' href='" . wp_specialchars( $link, 1 ) . "'>$prev_text</a>";
@@ -923,7 +926,8 @@
 			$dots = true;
 		else :
 			if ( $show_all || ( $n <= $end_size || ( $current && $n >= $current - $mid_size && $n <= $current + $mid_size ) || $n > $total - $end_size ) ) :
-				$link = str_replace('%_%', 1 == $n ? '' : str_replace('%#%', $n, $format), $base);
+				$link = str_replace('%_%', 1 == $n ? '' : $format, $base);
+				$link = str_replace('%#%', $n, $link);
 				if ( $add_args )
 					$link = add_query_arg( $add_args, $link );
 				$page_links[] = "<a class='page-numbers' href='" . wp_specialchars( $link, 1 ) . "'>$n</a>";
@@ -935,7 +939,8 @@
 		endif;
 	endfor;
 	if ( $prev_next && $current && ( $current < $total || -1 == $total ) ) :
-		$link = str_replace('%_%', str_replace('%#%', $current + 1, $format), $base);
+		$link = str_replace('%_%', $format, $base);
+		$link = str_replace('%#%', $current + 1, $link);
 		if ( $add_args )
 			$link = add_query_arg( $add_args, $link );
 		$page_links[] = "<a class='next page-numbers' href='" . wp_specialchars( $link, 1 ) . "'>$next_text</a>";
Index: wp-admin/upload-js.php
===================================================================
--- wp-admin/upload-js.php	(revision 4275)
+++ wp-admin/upload-js.php	(working copy)
@@ -165,6 +165,9 @@
 			var filesEl = $('upload-files');
 			if ( filesEl )
 				filesEl.hide();
+			var navEl = $('current-tab-nav');
+			if ( navEl )
+				navEl.hide();
 			this.grabImageData(id);
 		},
 
@@ -173,6 +176,9 @@
 				var filesEl = $('upload-files');
 				if ( filesEl )
 					filesEl.show();
+				var navEl = $('current-tab-nav');
+				if ( navEl )
+					navEl.show();
 			}
 			if ( !this.ID )
 				this.grabImageData(0);
Index: wp-admin/upload-rtl.css
===================================================================
--- wp-admin/upload-rtl.css	(revision 4275)
+++ wp-admin/upload-rtl.css	(working copy)
@@ -2,7 +2,7 @@
 
 #upload-menu li { margin: 0 .75em 0 0; }
 
-#upload-menu .current a {
+#upload-menu .current div {
 	border-right: 0;
 	border-left: 2px solid #448abd;
 }
Index: wp-admin/upload.php
===================================================================
--- wp-admin/upload.php	(revision 4275)
+++ wp-admin/upload.php	(working copy)
@@ -24,14 +24,16 @@
 $wp_upload_tabs = array();
 $all_atts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment'");
 $post_atts = 0;
+
 if ( $pid ) {
-	$wp_upload_tabs['upload'] = array(__('Upload'), 'upload_files', 'wp_upload_tab_upload');
+	// 0 => tab display name, 1 => required cap, 2 => function that produces tab content, 3 => total number objects OR array(total, objects per page), 4 => add_query_args
+	$wp_upload_tabs['upload'] = array(__('Upload'), 'upload_files', 'wp_upload_tab_upload', 0);
 	if ( $all_atts && $post_atts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'attachment' AND post_parent = '$post_id'") )
-		$wp_upload_tabs['browse'] = array(__('Browse'), 'upload_files', "wp_upload_tab_browse");
+		$wp_upload_tabs['browse'] = array(__('Browse'), 'upload_files', "wp_upload_tab_browse", $action ? 0 : $post_atts);
 	if ( $post_atts < $all_atts )
-		$wp_upload_tabs['browse-all'] = array(__('Browse All'), 'upload_files', 'wp_upload_tab_browse');
+		$wp_upload_tabs['browse-all'] = array(__('Browse All'), 'upload_files', 'wp_upload_tab_browse', $action ? 0 : $all_atts);
 } else
-	$wp_upload_tabs['browse-all'] = array(__('Browse All'), 'upload_files', 'wp_upload_tab_browse');
+	$wp_upload_tabs['browse-all'] = array(__('Browse All'), 'upload_files', 'wp_upload_tab_browse', $action ? 0 : $all_atts);
 
 	$wp_upload_tabs = array_merge($wp_upload_tabs, apply_filters( 'wp_upload_tabs', array() ));
 
@@ -54,14 +56,37 @@
 echo "<ul id='upload-menu'>\n";
 foreach ( $wp_upload_tabs as $t => $tab_array ) { // We've already done the current_user_can check
 	$class = 'upload-tab';
-	$href = add_query_arg( array('tab' => $t, 'ID' => '', 'action' => '') );
-	if ( isset($tab_array[3]) && is_array($tab_array[3]) )
-		add_query_arg( $tab_array[3], $href );
+	$href = add_query_arg( array('tab' => $t, 'ID' => '', 'action' => '', 'paged' => '') );
+	if ( isset($tab_array[4]) && is_array($tab_array[4]) )
+		add_query_arg( $tab_array[4], $href );
 	$_href = wp_specialchars( $href, 1 );
-	if ( $tab == $t )
+	$page_links = '';
+	if ( $tab == $t ) {
 		$class .= ' current';
-	echo "\t<li class='$class left'><a href='$_href' title='{$tab_array[0]}'>{$tab_array[0]}</a></li>\n";
+		if ( $tab_array[3] ) {
+			if ( is_array($tab_array[3]) ) {
+				$total = $tab_array[3][0];
+				$per = $tab_array[3][1];
+			} else {
+				$total = $tab_array[3];
+				$per = 10;
+			}
+			$page_links = paginate_links( array(
+				'base' => add_query_arg( 'paged', '%#%' ),
+				'format' => '',
+				'total' => ceil($total / $per),
+				'current' => $paged ? $paged : 1,
+				'prev_text' => '&laquo;',
+				'next_text' => '&raquo;'
+			));
+			if ( $page_links )
+				$page_links = "<span id='current-tab-nav'>: $page_links</span>";
+		}
+	}
+
+	echo "\t<li class='$class left'><div><a href='$_href' title='{$tab_array[0]}'>{$tab_array[0]}</a>$page_links</div></li>\n";
 }
+unset($t, $tab_array, $href, $_href, $page_links, $total, $per, $class);
 echo "</ul>\n\n";
 
 echo "<div id='upload-content'>\n";
Index: wp-admin/upload-functions.php
===================================================================
--- wp-admin/upload-functions.php	(revision 4275)
+++ wp-admin/upload-functions.php	(working copy)
@@ -303,8 +303,6 @@
 		echo "</ul>\n\n";
 
 		echo "<form action='' id='browse-form'><input type='hidden' id='nonce-value' value='" . wp_create_nonce( 'inlineuploading' )  . "' /></form>\n";
-
-//		echo $total;
 		break;
 	endswitch;
 
Index: wp-admin/upload.css
===================================================================
--- wp-admin/upload.css	(revision 4275)
+++ wp-admin/upload.css	(working copy)
@@ -14,21 +14,26 @@
 
 #upload-menu li { margin: 0 0 0 .75em; }
 
-#upload-menu a {
-	display: block;
+#upload-menu li div {
+	color: #000;
 	padding: 5px;
+	border-top: 3px solid #fff;
+}
+
+#upload-menu li a {
 	color: #000;
-	border-top: 3px solid #fff;
 	text-decoration: none;
 	border-bottom: none;
 }
 
-#upload-menu .current a {
+#upload-menu li span a.page-numbers { color: #00019b; }
+
+#upload-menu .current div {
 	background: #dfe8f1;
 	border-right: 2px solid #448abd;
 }
 
-#upload-menu a:hover {
+#upload-menu div:hover {
 	background: #dfe8f1;
 	color: #000;
 }
