Ticket #16208: 16208.patch
| File 16208.patch, 4.4 KB (added by , 15 years ago) |
|---|
-
wp-admin/edit-comments.php
101 101 102 102 $wp_list_table->prepare_items(); 103 103 104 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );105 if ( $pagenum > $total_pages && $total_pages > 0 ) {106 wp_redirect( add_query_arg( 'paged', $total_pages ) );107 exit;108 }109 110 104 wp_enqueue_script('admin-comments'); 111 105 enqueue_comment_hotkeys_js(); 112 106 -
wp-admin/edit.php
142 142 143 143 $wp_list_table->prepare_items(); 144 144 145 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );146 if ( $pagenum > $total_pages && $total_pages > 0 ) {147 wp_redirect( add_query_arg( 'paged', $total_pages ) );148 exit;149 }150 151 145 wp_enqueue_script('inline-edit-post'); 152 146 153 147 $title = $post_type_object->labels->name; -
wp-admin/includes/class-wp-list-table.php
138 138 139 139 if ( !$args['total_pages'] && $args['per_page'] > 0 ) 140 140 $args['total_pages'] = ceil( $args['total_items'] / $args['per_page'] ); 141 141 142 // redirect if page number is invalid and headers are not already sent 143 if ( ! headers_sent() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) && $args['total_pages'] > 0 && $this->get_pagenum() > $args['total_pages'] ) { 144 wp_redirect( add_query_arg( 'paged', $args['total_pages'] ) ); 145 exit; 146 } 147 142 148 $this->_pagination_args = $args; 143 149 } 144 150 -
wp-admin/network/sites.php
88 88 89 89 $wp_list_table->prepare_items(); 90 90 91 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );92 if ( $pagenum > $total_pages && $total_pages > 0 ) {93 wp_redirect( add_query_arg( 'paged', $total_pages ) );94 exit;95 }96 97 91 require_once( '../admin-header.php' ); 98 92 ?> 99 93 -
wp-admin/network/themes.php
171 171 172 172 $wp_list_table->prepare_items(); 173 173 174 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );175 if ( $pagenum > $total_pages && $total_pages > 0 ) {176 wp_redirect( add_query_arg( 'paged', $total_pages ) );177 exit;178 }179 180 174 add_thickbox(); 181 175 182 176 add_screen_option( 'per_page', array('label' => _x( 'Themes', 'themes per page (screen options)' )) ); -
wp-admin/plugin-install.php
23 23 $wp_list_table = _get_list_table('WP_Plugin_Install_List_Table'); 24 24 $pagenum = $wp_list_table->get_pagenum(); 25 25 $wp_list_table->prepare_items(); 26 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );27 if ( $pagenum > $total_pages && $total_pages > 0 ) {28 wp_redirect( add_query_arg( 'paged', $total_pages ) );29 exit;30 }31 26 32 27 $title = __('Install Plugins'); 33 28 $parent_file = 'plugins.php'; -
wp-admin/plugins.php
313 313 314 314 $wp_list_table->prepare_items(); 315 315 316 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );317 if ( $pagenum > $total_pages && $total_pages > 0 ) {318 wp_redirect( add_query_arg( 'paged', $total_pages ) );319 exit;320 }321 322 316 wp_enqueue_script('plugin-install'); 323 317 add_thickbox(); 324 318 -
wp-admin/theme-install.php
23 23 $wp_list_table = _get_list_table('WP_Theme_Install_List_Table'); 24 24 $pagenum = $wp_list_table->get_pagenum(); 25 25 $wp_list_table->prepare_items(); 26 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );27 if ( $pagenum > $total_pages && $total_pages > 0 ) {28 wp_redirect( add_query_arg( 'paged', $total_pages ) );29 exit;30 }31 26 32 27 $title = __('Install Themes'); 33 28 $parent_file = 'themes.php'; -
wp-admin/upload.php
130 130 131 131 $wp_list_table->prepare_items(); 132 132 133 $total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );134 if ( $pagenum > $total_pages && $total_pages > 0 ) {135 wp_redirect( add_query_arg( 'paged', $total_pages ) );136 exit;137 }138 139 133 $title = __('Media Library'); 140 134 $parent_file = 'upload.php'; 141 135