aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-03 10:33:27 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-03 10:33:27 +0000
commit58e99b5c9b19780d99af841e2a8d537d9e054d5f (patch)
tree811ba7b36bb6a7530f7aa4f5df62e2c2c2df26ca /views
parentd9e770e095c9944bddcaff8b2f2131239ed863e8 (diff)
downloadelgg-58e99b5c9b19780d99af841e2a8d537d9e054d5f.tar.gz
elgg-58e99b5c9b19780d99af841e2a8d537d9e054d5f.tar.bz2
pagination now only displays if there is content to paginate through
git-svn-id: https://code.elgg.org/elgg/trunk@1668 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views')
-rw-r--r--views/default/navigation/pagination.php23
1 files changed, 15 insertions, 8 deletions
diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php
index bba122d5a..875579802 100644
--- a/views/default/navigation/pagination.php
+++ b/views/default/navigation/pagination.php
@@ -42,6 +42,9 @@
$currentpage = ceil($offset / $limit) + 1;
$baseurl = preg_replace('/[\&\?]'.$word.'\=[0-9]*/',"",$vars['baseurl']);
+
+ //only display if there is content to paginate through
+ if ($count >= $limit){
?>
@@ -49,15 +52,15 @@
<p>
<?php
- if ($count == 0) {
+ //if ($count == 0) {
- static $notfounddisplayed;
- if (!isset($notfounddisplayed) && $nonefound) {
- echo elgg_echo("notfound");
- $notfounddisplayed = true;
- }
+ // static $notfounddisplayed;
+ // if (!isset($notfounddisplayed) && $nonefound) {
+ // echo elgg_echo("notfound");
+ // $notfounddisplayed = true;
+ // }
- }
+ //}
if ($offset > 0) {
@@ -146,4 +149,8 @@
?>
</p>
-</div> \ No newline at end of file
+</div>
+
+<?php
+ } // end of pagination check if statement
+?> \ No newline at end of file