Changeset 16856
- Timestamp:
- 12/10/2010 08:55:17 AM (14 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r16855 r16856 37 37 38 38 $approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0; 39 39 40 $redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() ); 40 41 // Fix the problem with wrong page number. This happens when the user use the javascript42 // pagination feature to navigate to a certain page, then does some bulk actions there,43 // he will be redirected back to te original page number instead of the navigated one.44 41 $redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to ); 45 42 … … 106 103 $wp_list_table->prepare_items(); 107 104 108 // redirect to the last page if the page number is larger than the total number of pages109 // this can happen when all the items in the last page are deleted, for example110 105 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 111 106 if ( $pagenum > $total_pages && $total_pages > 0 ) { -
trunk/wp-admin/edit.php
r16855 r16856 22 22 unset( $_redirect ); 23 23 24 // Handle bulk actions25 24 $doaction = $wp_list_table->current_action(); 26 25 27 26 if ( $doaction ) { 28 27 check_admin_referer('bulk-posts'); 28 29 29 $sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() ); 30 31 // Fix the problem with wrong page number. This happens when the user use the javascript32 // pagination feature to navigate to a certain page, then does some bulk actions there,33 // he will be redirected back to te original page number instead of the navigated one.34 30 $sendback = add_query_arg( 'paged', $pagenum, $sendback ); 35 36 31 if ( strpos($sendback, 'post.php') !== false ) 37 32 $sendback = admin_url($post_new_file); … … 134 129 $wp_list_table->prepare_items(); 135 130 136 // redirect to the last page if the page number is larger than the total number of pages137 // this can happen when all the items in the last page are deleted, for example138 131 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' ); 139 132 if ( $pagenum > $total_pages && $total_pages > 0 ) {
Note: See TracChangeset
for help on using the changeset viewer.