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

'.$nav.'

'; } } ?>