Index: wp-admin/includes/meta-boxes.php
===================================================================
--- wp-admin/includes/meta-boxes.php	(revision 17488)
+++ wp-admin/includes/meta-boxes.php	(working copy)
@@ -652,7 +652,9 @@
  *
  * @param object $link
  */
-function link_categories_meta_box($link) { ?>
+function link_categories_meta_box($link) {
+	$link_id = isset( $link->link_id ) ? $link->link_id : 0;  
+	 ?>
 <ul id="category-tabs" class="category-tabs">
 	<li class="tabs"><a href="#categories-all"><?php _e( 'All Categories' ); ?></a></li>
 	<li class="hide-if-no-js"><a href="#categories-pop"><?php _e( 'Most Used' ); ?></a></li>
@@ -660,18 +662,13 @@
 
 <div id="categories-all" class="tabs-panel">
 	<ul id="categorychecklist" class="list:category categorychecklist form-no-clear">
-		<?php
-		if ( isset($link->link_id) )
-			wp_link_category_checklist($link->link_id);
-		else
-			wp_link_category_checklist();
-		?>
+		<?php wp_link_category_checklist( $link_id ); ?>
 	</ul>
 </div>
 
 <div id="categories-pop" class="tabs-panel" style="display: none;">
 	<ul id="categorychecklist-pop" class="categorychecklist form-no-clear">
-		<?php wp_popular_terms_checklist('link_category'); ?>
+		<?php wp_link_category_checklist( $link_id, true); ?>
 	</ul>
 </div>
 
Index: wp-admin/includes/template.php
===================================================================
--- wp-admin/includes/template.php	(revision 17488)
+++ wp-admin/includes/template.php	(working copy)
@@ -190,13 +190,16 @@
 }
 
 /**
- * {@internal Missing Short Description}}
+ * Display a checklist of link categories
  *
  * @since 2.5.1
  *
- * @param unknown_type $link_id
+ * @param int $link_id optional The ID of the link for which to display categories
+ * @param bool $popular optional Whether to show the most popular categories If set to false,
+ * then all categories will be shown
+ * @param int $number optional The number of popular categories to show.
  */
-function wp_link_category_checklist( $link_id = 0 ) {
+function wp_link_category_checklist( $link_id = 0, $popular = false, $number = 10 ) {
 	$default = 1;
 
 	if ( $link_id ) {
@@ -208,7 +211,11 @@
 		$checked_categories[] = $default;
 	}
 
-	$categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );
+	if ( $popular )
+		$categories = get_terms( 'link_category', array( 'orderby' => 'count', 'order' => 'desc', 'limit' => (int)$popular, 'hide_empty' => 0 ) );
+	else
+		$categories = get_terms( 'link_category', array( 'orderby' => 'name', 'hide_empty' => 0 ) );
+		
 
 	if ( empty( $categories ) )
 		return;
@@ -217,7 +224,11 @@
 		$cat_id = $category->term_id;
 		$name = esc_html( apply_filters( 'the_category', $category->name ) );
 		$checked = in_array( $cat_id, $checked_categories ) ? ' checked="checked"' : '';
-		echo '<li id="link-category-', $cat_id, '"><label for="in-link-category-', $cat_id, '" class="selectit"><input value="', $cat_id, '" type="checkbox" name="link_category[]" id="in-link-category-', $cat_id, '"', $checked, '/> ', $name, "</label></li>";
+
+		if( $popular )
+			echo "<li class='popular-category' id='popular-link-category-$cat_id'><label for='in-popular-category-$cat_id' class='selectit'><input value='$cat_id' type='checkbox' id='in-popular-category-$cat_id' $checked /> $name </label></li>";
+		else 
+			echo "<li id='link-category-$cat_id'><label for='in-link-category-$cat_id' class='selectit'><input value='$cat_id' type='checkbox' name='link_category[]' id='in-link-category-$cat_id' $checked /> $name </label></li>";
 	}
 }
 
