WordPress.org

Make WordPress Core

Changeset 9607


Ignore:
Timestamp:
11/11/08 11:34:08 (5 years ago)
Author:
azaozz
Message:

Add check for bulk-edit when deleting posts/pages, see #8135

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9606 r9607  
    279279} 
    280280 
    281 .button-secondary { 
    282     border-color: #CFE1EF; 
    283     color: #464646; 
    284     text-shadow: #FFF, 0 1px 0; 
    285 } 
    286  
    287281.button, 
    288282.submit input, 
     
    291285} 
    292286 
    293 .button-primary { 
     287.button-secondary, 
     288.submit .button-secondary { 
     289    border-color: #CFE1EF; 
     290    color: #464646; 
     291    text-shadow: #FFF, 0 1px 0; 
     292} 
     293 
     294.button-primary, 
     295.submit .button-primary { 
    294296    border-color: #21759B; 
    295297    color: #FFF; 
     
    300302.button:disabled { 
    301303    background-color: #999; 
     304    background-image: none; 
    302305} 
    303306 
  • trunk/wp-admin/edit-pages.php

    r9603 r9607  
    1616    switch ( $doaction ) { 
    1717        case 'delete': 
    18             if ( isset($_GET['post']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { 
     18            if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { 
    1919                check_admin_referer('bulk-pages'); 
    2020                foreach( (array) $_GET['post'] as $post_id_del ) { 
     
    3535            break; 
    3636        case 'edit': 
    37             if ( isset($_GET['post']) ) { 
     37            if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { 
    3838                check_admin_referer('bulk-pages'); 
    3939 
     
    4949            break; 
    5050    } 
     51 
    5152    $sendback = wp_get_referer(); 
    5253    if (strpos($sendback, 'page.php') !== false) $sendback = admin_url('page-new.php'); 
     
    121122    printf( __ngettext( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['skipped'] ) ); 
    122123    unset($_GET['locked']); 
    123 } ?> 
     124} 
     125$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated'), $_SERVER['REQUEST_URI'] ); 
     126?> 
    124127</p></div> 
    125128<?php } ?> 
  • trunk/wp-admin/edit.php

    r9591 r9607  
    1616    switch ( $doaction ) { 
    1717        case 'delete': 
    18             if ( isset($_GET['post']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { 
     18            if ( isset($_GET['post']) && ! isset($_GET['bulk_edit']) && (isset($_GET['doaction']) || isset($_GET['doaction2'])) ) { 
    1919                check_admin_referer('bulk-posts'); 
    2020                foreach( (array) $_GET['post'] as $post_id_del ) { 
     
    3535            break; 
    3636        case 'edit': 
    37             if ( isset($_GET['post']) ) { 
     37            if ( isset($_GET['post']) && isset($_GET['bulk_edit']) ) { 
    3838                check_admin_referer('bulk-posts'); 
    3939 
     
    115115    printf( __ngettext( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['locked'] ) ); 
    116116    unset($_GET['locked']); 
    117 } ?> 
     117}  
     118$_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated'), $_SERVER['REQUEST_URI'] ); 
     119?> 
    118120</p></div> 
    119121<?php } ?> 
  • trunk/wp-admin/includes/template.php

    r9606 r9607  
    11221122    <p class="submit inline-edit-save"> 
    11231123        <a accesskey="c" href="#inline-edit" title="<?php _e('Cancel'); ?>" class="button-secondary cancel alignleft"><?php _e('Cancel'); ?></a> 
    1124         <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-primary save alignright"><?php _e('Save'); ?></a> 
    11251124        <?php if ( ! $bulk ) { 
    11261125            wp_nonce_field( 'inlineeditnonce', '_inline_edit', false ); ?> 
     1126            <a accesskey="s" href="#inline-edit" title="<?php _e('Save'); ?>" class="button-primary save alignright"><?php _e('Save'); ?></a> 
    11271127            <img class="waiting" style="display:none;" src="images/loading.gif" alt="" /> 
     1128        <?php } else { ?> 
     1129            <input accesskey="s" class="button-primary alignright" type="submit" name="bulk_edit" value="<?php _e('Save'); ?>" /> 
    11281130        <?php } ?> 
    11291131        <input type="hidden" name="post_view" value="<?php echo $m; ?>" /> 
  • trunk/wp-admin/js/inline-edit-post.js

    r9604 r9607  
    2424 
    2525        $('a.cancel', bulkRow).click(function() { return inlineEditPost.revert(); }); 
    26         $('a.save', bulkRow).click(function() { return inlineEditPost.saveBulk(); }); 
    2726 
    2827        // add events 
     
    228227    }, 
    229228 
    230     saveBulk : function() { 
    231         $('form#posts-filter').submit(); 
    232     }, 
    233  
    234229    revert : function() { 
    235230        var id; 
Note: See TracChangeset for help on using the changeset viewer.