From 5c1bc9d2ec9c50710251083355254832097635a0 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 18 Jun 2008 14:08:37 +0000 Subject: Interface tweak when no results are found. git-svn-id: https://code.elgg.org/elgg/trunk@966 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 5 +++-- views/default/navigation/pagination.php | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index dae53daa9..8e7d8283e 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -264,7 +264,7 @@ $html = ""; - $nav = elgg_view('navigation/pagination',array( + $html .= elgg_view('navigation/pagination',array( 'baseurl' => $_SERVER['REQUEST_URI'], 'offset' => $offset, @@ -280,7 +280,8 @@ } } - $html .= $nav; + if ($count) + $html .= $nav; return $html; diff --git a/views/default/navigation/pagination.php b/views/default/navigation/pagination.php index c946544ae..b96ce32d1 100644 --- a/views/default/navigation/pagination.php +++ b/views/default/navigation/pagination.php @@ -41,7 +41,11 @@ if ($count == 0) { - echo elgg_echo("notfound"); + static $notfounddisplayed; + if (!isset($notfounddisplayed)) { + echo elgg_echo("notfound"); + $notfounddisplayed = true; + } } -- cgit v1.2.3