Ticket #923: link-manager.php.diff
| File link-manager.php.diff, 1.6 kB (added by tivac, 3 years ago) |
|---|
-
link-manager.php
old new 66 66 if ('' != $_POST['assign']) $action = 'assign'; 67 67 if ('' != $_POST['visibility']) $action = 'visibility'; 68 68 if ('' != $_POST['move']) $action = 'move'; 69 if ('' != $_POST['bulkdelete']) $action = 'bulkdelete'; 69 70 if ('' != $_POST['linkcheck']) $linkcheck = $_POST[linkcheck]; 70 71 71 72 switch ($action) { … … 270 271 wp_redirect($this_file); 271 272 break; 272 273 } // end Delete 274 275 case 'bulkdelete': { 276 check_admin_referer(); 277 278 if($user_level < 5) 279 die(__("You're not qualified to swim here")); 280 281 // let's clean this up a bit, just to be safe 282 foreach($_POST['linkcheck'] as $link_id) { 283 $links[] = (int) $link_id; 284 } 285 286 $wpdb->query("DELETE FROM $wpdb->links WHERE (link_id = ".implode(" OR link_id = ", $links).")"); 287 288 wp_redirect($this_file); 289 290 break; 291 } // end bulkdelete 273 292 274 293 case 'linkedit': { 275 294 $xfn = true; … … 733 752 <td> 734 753 <?php _e('Move to category:'); category_dropdown('category'); ?> <input name="move" type="submit" id="move" value="<?php _e('Go') ?>" /> 735 754 </td> 755 <td> 756 <input name="bulkdelete" type="submit" id="bulkdelete" value="<?php _e('Delete Selected') ?>" onclick="return confirm('You are about to delete all selected links.\n \'Cancel\' to stop, \'OK\' to delete.');"/> 757 </td> 736 758 <td align="right"> 737 759 <a href="#" onclick="checkAll(document.getElementById('links')); return false; "><?php _e('Toggle Checkboxes') ?></a> 738 760 </td>
