Index: apachesolr_search.module =================================================================== --- apachesolr_search.module (revision 1679) +++ apachesolr_search.module (working copy) @@ -801,7 +801,9 @@ $links[] = theme('apachesolr_unclick_link', $fielddisplay, $new_query->get_path(), $options); } } - $content = theme('apachesolr_currentsearch', $response->response->numFound, $links); + $results_start = $response->response->start + 1; + $results_end = $response->response->start + count($response->response->docs); + $content = theme('apachesolr_currentsearch', $response->response->numFound, $results_start, $results_end, $links); return array('subject' => t('Current search'), 'content' => $content); case 'is_book_bid': return apachesolr_facet_block($response, $query, 'apachesolr_search', $delta, $delta, t('Filter by book'), 'apachesolr_search_get_book'); @@ -1140,7 +1142,7 @@ 'arguments' => array('blocks' => NULL), ), 'apachesolr_currentsearch' => array( - 'arguments' => array('total_found' => NULL, 'links' => NULL), + 'arguments' => array('total_found' => NULL, 'results_start' => NULL, 'results_end' => NULL, 'links' => NULL), ), 'apachesolr_search_snippets' => array( 'arguments' => array('doc' => NULL, 'snippets' => NULL), @@ -1236,8 +1238,13 @@ /** * Return current search block contents */ -function theme_apachesolr_currentsearch($total_found, $links) { - return theme_item_list($links, format_plural($total_found, 'Search found 1 item', 'Search found @count items')); +function theme_apachesolr_currentsearch($total_found, $results_start, $results_end, $links) { + if ($results_start == 1 && $total_found == $results_end) { + return theme_item_list($links, format_plural($total_found, 'Search found 1 item', 'Search found @count items')); + } + else { + return theme_item_list($links, t('Showing !start-!end of !total_found items', array('!start' => $results_start, '!end' => $results_end, '!total_found' => $total_found))); + } } /**