Ticket #4627: wp2-linkmanager.patch
| File wp2-linkmanager.patch, 2.8 KB (added by snakefoot, 6 years ago) |
|---|
-
wp-admin/link-manager.php
12 12 'description', 'visible', 'target', 'category', 'link_id', 13 13 'submit', 'order_by', 'links_show_cat_id', 'rating', 'rel', 14 14 'notes', 'linkcheck[]'); 15 16 if ( ! current_user_can('manage_links') ) 17 wp_die( __('You do not have sufficient permissions to edit the links for this blog.') ); 15 18 16 19 for ($i=0; $i<count($wpvarstoreset); $i += 1) { 17 20 $wpvar = $wpvarstoreset[$i]; … … 41 44 { 42 45 check_admin_referer('bulk-bookmarks'); 43 46 44 // check the current user's level first.45 if ( !current_user_can('manage_links') )46 die (__("Cheatin' uh ?"));47 48 47 //for each link id (in $linkcheck[]): if the current user level >= the 49 48 //userlevel of the owner of the link then we can proceed. 50 49 … … 70 69 { 71 70 check_admin_referer('bulk-bookmarks'); 72 71 73 // check the current user's level first.74 if ( !current_user_can('manage_links') )75 die (__("Cheatin' uh ?"));76 77 72 //for each link id (in $linkcheck[]): toggle the visibility 78 73 if (count($linkcheck) == 0) { 79 74 wp_redirect($this_file); … … 108 103 { 109 104 check_admin_referer('bulk-bookmarks'); 110 105 111 // check the current user's level first.112 if ( !current_user_can('manage_links') )113 die (__("Cheatin' uh ?"));114 115 106 //for each link id (in $linkcheck[]) change category to selected value 116 107 if (count($linkcheck) == 0) { 117 108 wp_redirect($this_file); … … 164 155 $link_id = (int) $_GET['link_id']; 165 156 check_admin_referer('delete-bookmark_' . $link_id); 166 157 167 if ( !current_user_can('manage_links') )168 die (__("Cheatin' uh ?"));169 170 158 wp_delete_link($link_id); 171 159 172 160 if (isset($links_show_cat_id) && ($links_show_cat_id != '')) … … 185 173 186 174 case 'linkedit': { 187 175 $xfn_js = true; 188 include_once ('admin-header.php');189 if ( !current_user_can('manage_links') )190 die(__('You do not have sufficient permissions to edit the links for this blog.'));191 176 192 177 $link_id = (int) $_GET['link_id']; 193 178 194 179 if ( !$link = get_link_to_edit($link_id) ) 195 180 die( __('Link not found.') ); 196 181 182 include_once ('admin-header.php'); 197 183 include('edit-link-form.php'); 198 184 break; 199 185 } // end linkedit … … 237 223 setcookie('links_show_cat_id_' . COOKIEHASH, $links_show_cat_id, time()+600); 238 224 setcookie('links_show_order_' . COOKIEHASH, $links_show_order, time()+600); 239 225 include_once ("./admin-header.php"); 240 if ( !current_user_can('manage_links') ) 241 die(__("You do not have sufficient permissions to edit the links for this blog.")); 242 226 243 227 switch ($order_by) 244 228 { 245 229 case 'order_id': $sqlorderby = 'id'; break;
