Changeset 8948

Show
Ignore:
Timestamp:
09/22/08 03:27:48 (2 months ago)
Author:
azaozz
Message:

Bulk delete: only delete when Apply button is clicked, move Advanced Options to separate form

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/categories.php

    r8944 r8948  
    134134 
    135135<div class="wrap"> 
    136 <form id="posts-filter" action="" method="get"> 
    137  
     136 
     137<form id="adv-settings" action="" method="get"> 
    138138<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    139139<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    146146<br class="clear" /> 
    147147</div></div> 
    148 </div> 
     148<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     149</div></form> 
    149150 
    150151    <h2><?php printf( current_user_can('manage_categories') ? __('Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
     
    152153<br class="clear" /> 
    153154 
     155<form id="posts-filter" action="" method="get"> 
    154156<div class="tablenav"> 
    155157 
     
    199201</table> 
    200202 
    201 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
    202  
    203203</form> 
    204204 
  • trunk/wp-admin/edit-link-categories.php

    r8944 r8948  
    7575<div class="wrap"> 
    7676 
    77 <form id="posts-filter" action="" method="get"> 
    78  
     77<form id="adv-settings" action="" method="get"> 
    7978<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    8079<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    8786<br class="clear" /> 
    8887</div></div> 
    89 </div> 
     88<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     89</div></form> 
    9090 
    9191    <h2><?php printf( current_user_can('manage_categories') ? __('Link Categories (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addcat' ); ?></h2> 
     
    9393<br class="clear" /> 
    9494 
     95<form id="posts-filter" action="" method="get"> 
    9596<div class="tablenav"> 
    9697 
     
    156157</table> 
    157158 
    158 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
    159  
    160159</form> 
    161160 
  • trunk/wp-admin/edit-pages.php

    r8943 r8948  
    1111 
    1212// Handle bulk deletes 
    13 if ( isset($_GET['action']) && isset($_GET['delete']) ) { 
     13if ( isset($_GET['action']) && isset($_GET['post']) && isset($_GET['doaction']) ) { 
    1414    check_admin_referer('bulk-pages'); 
    1515    if ( $_GET['action'] == 'delete' ) { 
    16         foreach( (array) $_GET['delete'] as $post_id_del ) { 
     16        foreach( (array) $_GET['post'] as $post_id_del ) { 
    1717            $post_del = & get_post($post_id_del); 
    1818 
     
    8787 
    8888<div class="wrap"> 
    89 <form id="posts-filter" action="" method="get"> 
    90  
     89<form id="adv-settings" action="" method="get"> 
    9190<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    9291<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    9998<br class="clear" /> 
    10099</div></div> 
    101 </div> 
     100<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     101</div></form> 
    102102 
    103103<h2><?php 
     
    112112?></h2> 
    113113 
     114<form id="posts-filter" action="" method="get"> 
    114115<ul class="subsubsub"> 
    115116<?php 
     
    140141<?php if ( isset($_GET['post_status'] ) ) : ?> 
    141142<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" /> 
    142 <?php 
    143 endif; 
     143<?php endif; 
     144 
    144145if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
    145146<div id="message" class="updated fade"><p><strong><?php _e('Your page has been saved.'); ?></strong> <a href="<?php echo get_permalink( $_GET['posted'] ); ?>"><?php _e('View page'); ?></a> | <a href="<?php echo get_edit_post_link( $_GET['posted'] ); ?>"><?php _e('Edit page'); ?></a></p></div> 
     
    171172<div class="alignleft"> 
    172173<select name="action"> 
    173 <option value="" selected><?php _e('Actions'); ?></option> 
     174<option value="-1" selected><?php _e('Actions'); ?></option> 
    174175<option value="edit"><?php _e('Edit'); ?></option> 
    175176<option value="delete"><?php _e('Delete'); ?></option> 
     
    201202  </tbody> 
    202203</table> 
    203  
    204 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
    205  
    206204</form> 
    207205 
  • trunk/wp-admin/edit-tags.php

    r8944 r8948  
    141141<div class="wrap"> 
    142142 
    143 <form id="posts-filter" action="" method="get"> 
    144  
     143<form id="adv-settings" action="" method="get"> 
    145144<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    146145<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    153152<br class="clear" /> 
    154153</div></div> 
    155 </div> 
     154<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     155</div></form> 
    156156 
    157157    <h2><?php printf( current_user_can('manage_categories') ? __('Tags (<a href="%s">Add New</a>)') : __('Manage Tags'), '#addtag' ); ?></h2> 
     
    159159<br class="clear" /> 
    160160 
     161<form id="posts-filter" action="" method="get"> 
    161162<div class="tablenav"> 
    162163 
     
    208209    </tbody> 
    209210</table> 
    210 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     211 
    211212</form> 
    212213 
  • trunk/wp-admin/edit.php

    r8943 r8948  
    1111 
    1212// Handle bulk actions 
    13 if ( !empty($_GET['action']) && $_GET['action'] != 'Actions' ) { 
     13if ( isset($_GET['action']) && $_GET['action'] != -1 && isset($_GET['doaction']) ) { 
    1414    switch ( $_GET['action'] ) { 
    1515        case 'delete': 
     
    8282<div class="wrap"> 
    8383 
    84 <form id="posts-filter" action="" method="get"> 
    85  
     84<form id="adv-settings" action="" method="get"> 
    8685<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    8786<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    9493<br class="clear" /> 
    9594</div></div> 
    96 </div> 
     95<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     96</div></form> 
    9797 
    9898<h2><?php 
     
    127127?></h2> 
    128128 
     129<form id="posts-filter" action="" method="get"> 
    129130<ul class="subsubsub"> 
    130131<?php 
     
    154155<?php if ( isset($_GET['post_status'] ) ) : ?> 
    155156<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" /> 
    156 <?php 
    157 endif; 
     157<?php endif; 
    158158 
    159159if ( isset($_GET['posted']) && $_GET['posted'] ) : $_GET['posted'] = (int) $_GET['posted']; ?> 
     
    186186<div class="alignleft"> 
    187187<select name="action"> 
    188 <option value="" selected="selected"><?php _e('Actions'); ?></option> 
     188<option value="-1" selected="selected"><?php _e('Actions'); ?></option> 
    189189<option value="edit"><?php _e('Edit'); ?></option> 
    190190<option value="delete"><?php _e('Delete'); ?></option> 
     
    241241 
    242242<?php include( 'edit-post-rows.php' ); ?> 
    243  
    244 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
    245243 
    246244</form> 
  • trunk/wp-admin/link-manager.php

    r8923 r8948  
    1111 
    1212// Handle bulk deletes 
    13 if ( isset($_GET['action']) && isset($_GET['linkcheck']) ) { 
     13if ( isset($_GET['action']) && isset($_GET['linkcheck']) && isset($_GET['doaction']) ) { 
    1414    check_admin_referer('bulk-bookmarks'); 
    1515 
     
    9595<div class="wrap"> 
    9696 
    97 <form id="links-filter" action="" method="get"> 
    98  
     97<form id="adv-settings" action="" method="get"> 
    9998<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    10099<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    107106<br class="clear" /> 
    108107</div></div> 
    109 </div> 
     108<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     109</div></form> 
    110110 
    111111<h2><?php printf( __('Links (<a href="%s">Add New</a>)' ), 'link-add.php' ); ?></h2> 
     
    113113<br class="clear" /> 
    114114 
     115<form id="posts-filter" action="" method="get"> 
    115116<div class="tablenav"> 
    116117 
     
    257258<p><?php _e('No links found.') ?></p> 
    258259<?php } ?> 
    259 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     260 
    260261</form> 
    261262 
  • trunk/wp-admin/upload.php

    r8944 r8948  
    6363    $_GET['detached'] = 1; 
    6464 
    65 } elseif ( isset($_GET['action']) && isset($_GET['media']) ) { 
     65} elseif ( isset($_GET['action']) && isset($_GET['media']) && isset($_GET['doaction']) ) { 
    6666    check_admin_referer('bulk-media'); 
    6767    if ( $_GET['action'] == 'delete' ) { 
     
    148148<div class="wrap"> 
    149149 
    150 <form id="posts-filter" action="" method="get"> 
    151  
     150<form id="adv-settings" action="" method="get"> 
    152151<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    153152<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    160159<br class="clear" /> 
    161160</div></div> 
    162 </div> 
     161<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     162</div></form> 
    163163 
    164164<h2><?php 
     
    195195?></h2> 
    196196 
     197<form id="posts-filter" action="" method="get"> 
    197198<ul class="subsubsub"> 
    198199<?php 
     
    318319 
    319320<br class="clear" /> 
    320 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
    321321 
    322322<?php if ( isset($orphans) ) { ?> 
  • trunk/wp-admin/users.php

    r8937 r8948  
    263263<div class="wrap"> 
    264264 
     265<form id="adv-settings" action="" method="get"> 
    265266<div id="show-settings"><a href="#edit_settings" id="show-settings-link" class="hide-if-no-js"><?php _e('Advanced Options') ?></a> 
    266267<a href="#edit_settings" id="hide-settings-link" class="hide-if-js hide-if-no-js"><?php _e('Hide Options') ?></a></div> 
     
    273274<br class="clear" /> 
    274275</div></div> 
    275 </div> 
     276<?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     277</div></form> 
    276278 
    277279<form id="posts-filter" action="" method="get"> 
     
    391393 
    392394<?php endif; ?> 
    393 <?php wp_nonce_field( 'hiddencolumns', 'hiddencolumnsnonce', false ); ?> 
     395 
    394396</form> 
    395397</div>