diff options
author | cash <cash.costello@gmail.com> | 2013-05-02 19:38:55 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-05-02 19:38:55 -0400 |
commit | a1f59d380a15c3bdf002e5fec2db039a8be9e28b (patch) | |
tree | 72046080ad73848cc91263717f9ead0f5ee2bc24 /mod/search/views | |
parent | 11c8b773274e3e7217eb7e842448ceb592541c63 (diff) | |
download | elgg-a1f59d380a15c3bdf002e5fec2db039a8be9e28b.tar.gz elgg-a1f59d380a15c3bdf002e5fec2db039a8be9e28b.tar.bz2 |
Fixes #5424 not showing more link on a non-faceted search page
Diffstat (limited to 'mod/search/views')
-rw-r--r-- | mod/search/views/default/search/list.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mod/search/views/default/search/list.php b/mod/search/views/default/search/list.php index 1ed40be1b..90aa28989 100644 --- a/mod/search/views/default/search/list.php +++ b/mod/search/views/default/search/list.php @@ -36,16 +36,21 @@ $query = http_build_query( $url = elgg_get_site_url() . "search?$query"; +$more_items = $vars['results']['count'] - ($vars['params']['offset'] + $vars['params']['limit']); + // get pagination if (array_key_exists('pagination', $vars['params']) && $vars['params']['pagination']) { - $nav = elgg_view('navigation/pagination',array( + $nav = elgg_view('navigation/pagination', array( 'base_url' => $url, 'offset' => $vars['params']['offset'], 'count' => $vars['results']['count'], 'limit' => $vars['params']['limit'], )); + $show_more = false; } else { + // faceted search page so no pagination $nav = ''; + $show_more = $more_items > 0; } // figure out what we're dealing with. @@ -75,12 +80,7 @@ if (array_key_exists('search_type', $vars['params']) $type_str = $search_type_str; } -// get any more links. -$more_check = $vars['results']['count'] - ($vars['params']['offset'] + $vars['params']['limit']); -$more = ($more_check > 0) ? $more_check : 0; - -if ($more) { - $title_key = ($more == 1) ? 'comment' : 'comments'; +if ($show_more) { $more_str = elgg_echo('search:more', array($count, $type_str)); $more_url = elgg_http_remove_url_query_element($url, 'limit'); $more_link = "<li class='elgg-item'><a href=\"$more_url\">$more_str</a></li>"; |