Index: wp-admin/link-manager.php
===================================================================
--- wp-admin/link-manager.php	(revision 6124)
+++ wp-admin/link-manager.php	(working copy)
@@ -12,6 +12,9 @@
                        'description', 'visible', 'target', 'category', 'link_id',
                        'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel',
                        'notes', 'linkcheck[]');
+					   
+if ( ! current_user_can('manage_links') )
+     wp_die( __('You do not have sufficient permissions to edit the links for this blog.') );
 
 for ($i=0; $i<count($wpvarstoreset); $i += 1) {
     $wpvar = $wpvarstoreset[$i];
@@ -41,10 +44,6 @@
   {
 	check_admin_referer('bulk-bookmarks');
 
-    // check the current user's level first.
-    if ( !current_user_can('manage_links') )
-      die (__("Cheatin' uh ?"));
-
     //for each link id (in $linkcheck[]): if the current user level >= the
     //userlevel of the owner of the link then we can proceed.
 
@@ -70,10 +69,6 @@
   {
   	check_admin_referer('bulk-bookmarks');
 
-    // check the current user's level first.
-    if ( !current_user_can('manage_links') )
-      die (__("Cheatin' uh ?"));
-
     //for each link id (in $linkcheck[]): toggle the visibility
     if (count($linkcheck) == 0) {
         wp_redirect($this_file);
@@ -108,10 +103,6 @@
   {
 	check_admin_referer('bulk-bookmarks');
 
-    // check the current user's level first.
-    if ( !current_user_can('manage_links') )
-      die (__("Cheatin' uh ?"));
-
     //for each link id (in $linkcheck[]) change category to selected value
     if (count($linkcheck) == 0) {
         wp_redirect($this_file);
@@ -164,9 +155,6 @@
 	$link_id = (int) $_GET['link_id'];
 	check_admin_referer('delete-bookmark_' . $link_id);
 
-    if ( !current_user_can('manage_links') )
-      die (__("Cheatin' uh ?"));
-
 	wp_delete_link($link_id);
 	
     if (isset($links_show_cat_id) && ($links_show_cat_id != ''))
@@ -185,15 +173,13 @@
 
   case 'linkedit': {
 	$xfn_js = true;
-	include_once ('admin-header.php');
-	if ( !current_user_can('manage_links') )
-		die(__('You do not have sufficient permissions to edit the links for this blog.'));
 	
 	$link_id = (int) $_GET['link_id'];
 	
 	if ( !$link = get_link_to_edit($link_id) )
 		die( __('Link not found.') );
-	
+
+	include_once ('admin-header.php');		
 	include('edit-link-form.php');
 	break;
   } // end linkedit
@@ -237,9 +223,7 @@
     setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600);
     setcookie('links_show_order_' . COOKIEHASH, $links_show_order, time()+600);
     include_once ("./admin-header.php");
-    if ( !current_user_can('manage_links') )
-      die(__("You do not have sufficient permissions to edit the links for this blog."));
-
+ 
     switch ($order_by)
     {
         case 'order_id':     $sqlorderby = 'id';          break;
