= $vars['limit']) { break; } } } } if ($vars['pagination'] !== false) { $baseurl = $_SERVER['REQUEST_URI']; $nav = ''; if (sizeof($vars['items']) > $vars['limit']) { $newoffset = $vars['offset'] + $vars['limit']; $nexturl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); $nav .= '« ' . elgg_echo('previous') . ' '; } if ($vars['offset'] > 0) { $newoffset = $vars['offset'] - $vars['limit']; if ($newoffset < 0) { $newoffset = 0; } $prevurl = elgg_http_add_url_query_elements($baseurl, array('offset' => $newoffset)); $nav .= '' . elgg_echo('next') . ' » '; } if (!empty($nav)) { echo '

'.$nav.'

'; } } ?>