Ticket #4627: 4627.2.diff

File 4627.2.diff, 0.9 kB (added by DD32, 11 months ago)

just moved a few things around, Blank document this way if user accesses it directly.

  • wp-admin/link.php

    old new  
    6161        case 'add' : 
    6262                check_admin_referer('add-bookmark'); 
    6363 
     64                // check the current user's level first. 
     65                if (!current_user_can('manage_links')) 
     66                        wp_die(__('Cheatin’ uh?')); 
     67 
    6468                add_link(); 
    6569 
    6670                wp_redirect(wp_get_referer().'?added=true'); 
     
    7175                $link_id = (int) $_POST['link_id']; 
    7276                check_admin_referer('update-bookmark_' . $link_id); 
    7377 
     78                // check the current user's level first. 
     79                if (!current_user_can('manage_links')) 
     80                        wp_die(__('Cheatin’ uh?')); 
     81 
    7482                edit_link($link_id); 
    7583 
    7684                wp_redirect($this_file); 
     
    107115                        wp_die(__('Link not found.')); 
    108116 
    109117                include ('edit-link-form.php'); 
     118                include ('admin-footer.php'); 
    110119                break; 
    111120 
    112121        default : 
    113122                break; 
    114123} 
    115  
    116 include ('admin-footer.php'); 
    117124?>