Changeset 15642 for trunk/wp-admin/edit-comments.php
- Timestamp:
- 09/22/2010 12:10:39 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r15596 r15642 13 13 $wp_list_table->check_permissions(); 14 14 15 if ( isset( $_REQUEST['doaction'] ) || isset( $_REQUEST['doaction2'] ) || isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) { 15 $doaction = $wp_list_table->current_action(); 16 17 if ( $doaction ) { 16 18 check_admin_referer( 'bulk-comments' ); 17 19 18 if ( ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) )&& !empty( $_REQUEST['pagegen_timestamp'] ) ) {20 if ( 'delete_all' == $do_action && !empty( $_REQUEST['pagegen_timestamp'] ) ) { 19 21 $comment_status = $wpdb->escape( $_REQUEST['comment_status'] ); 20 22 $delete_time = $wpdb->escape( $_REQUEST['pagegen_timestamp'] ); 21 23 $comment_ids = $wpdb->get_col( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = '$comment_status' AND '$delete_time' > comment_date_gmt" ); 22 24 $doaction = 'delete'; 23 } elseif ( ( $_REQUEST['action'] != -1 || $_REQUEST['action2'] != -1 ) &&isset( $_REQUEST['delete_comments'] ) ) {25 } elseif ( isset( $_REQUEST['delete_comments'] ) ) { 24 26 $comment_ids = $_REQUEST['delete_comments']; 25 27 $doaction = ( $_REQUEST['action'] != -1 ) ? $_REQUEST['action'] : $_REQUEST['action2']; 26 } elseif ( $_REQUEST['doaction'] == 'undo' &&isset( $_REQUEST['ids'] ) ) {28 } elseif ( isset( $_REQUEST['ids'] ) ) { 27 29 $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) ); 28 $doaction = $_REQUEST['action'];29 30 } else { 30 31 wp_redirect( wp_get_referer() );
Note: See TracChangeset
for help on using the changeset viewer.