From 251e06d3943ea8268c6766f3441a86fac46cecac Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 4 Dec 2007 15:30:49 +0000 Subject: Fixed pagination, fixes #519, props ktlee Update siteurl and home if domain updated git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1168 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/wpmu-blogs.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'wp-admin/wpmu-blogs.php') diff --git a/wp-admin/wpmu-blogs.php b/wp-admin/wpmu-blogs.php index a130555..6764cd9 100644 --- a/wp-admin/wpmu-blogs.php +++ b/wp-admin/wpmu-blogs.php @@ -79,12 +79,13 @@ switch( $_GET['action'] ) {
- - + + - + @@ -280,7 +281,7 @@ switch( $_GET['action'] ) { // List blogs default: $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1; - $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 30; + $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15; $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; @@ -320,16 +321,16 @@ switch( $_GET['action'] ) { $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; - if ( $_GET['ip_address'] == '' ) - $query .= " LIMIT " . intval( ( $apage - 1 ) * $num) . ", " . intval( $num ); - - $blog_list = $wpdb->get_results( $query, ARRAY_A ); - if( !empty($_GET['s']) || !empty($_GET['blog_id']) || !empty($_GET['ip_address'])) { + $blog_list = $wpdb->get_results( $query, ARRAY_A ); $total = count($blog_list); } else { $total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "); } + + $query .= " LIMIT " . intval( ( $apage - 1 ) * $num) . ", " . intval( $num ); + + $blog_list = $wpdb->get_results( $query, ARRAY_A ); // Pagination $url2 = "&order=" . $_GET['order'] . "&sortby=" . $_GET['sortby'] . "&s=" . $_GET['s'] . "&ip_address=" . $_GET['ip_address']; -- cgit
http://http://
+
()