Global Site Search Pagination

Hi,

I am testing out functionality of Global Site Search and to me it seems it should have pagination, you can set the number of records per page etc.

However for me, I'm not getting any 'next' 'previous' pagination

After some extensive examination, I found out that it was because my test was with 6 post in the db and page size set to 5. For some reason 1 is subtracted the number of posts calculated line 797 of global-site-search.php (line 20 of extract)

if($global_site_search_post_type == 'all') {

		$post_count = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->base_prefix . "site_posts WHERE ( post_title LIKE '%" . $phrase . "%' OR post_content LIKE '%" . $phrase . "%'" . $author_search . " ) AND blog_public = 1 ORDER BY site_post_id DESC");

	} else {

		$post_count = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->base_prefix . "site_posts WHERE ( post_title LIKE '%" . $phrase . "%' OR post_content LIKE '%" . $phrase . "%'" . $author_search . " ) AND blog_public = 1 AND post_type = '" . $global_site_search_post_type . "' ORDER BY site_post_id DESC");

	}

	$post_count = $post_count - 1;

	//generate page div

So when you have just one more than the page size, it will not get shown.

I assume this is a bug, I can see no valid reason.

Screen shot shows debug count of 6 from the db but 6 as the post count, of course pagination works with 7 post & 5 page size.

Hope this helps.