From e4b12c7fcca12dcb004bf4102efd6553db0bf794 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 26 Dec 2006 20:21:51 +0000 Subject: [PATCH] r1369: Don't show an empty grid if there are no bugs to display on index.php --- docs/changes.txt | 1 + index.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 4a9badc..c7da44a 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -9,6 +9,7 @@ - Users can save a search so they can rerun it at any time - Component and product changes wouldn't appear correcly on showhistory.php - Versions can be marked "Obsolete" so new bugs cannot be filed against them +- When there are no bugs to display on index.php, don't show an empty grid, but rather an error message 1.1.4 =============================== diff --git a/index.php b/index.php index 8b26826..9da45fe 100644 --- a/index.php +++ b/index.php @@ -52,6 +52,11 @@ $count = $db->query_first(" AND status NOT IN (" . ($bugsys->userinfo['hidestatuses'] != '' ? $bugsys->userinfo['hidestatuses'] : $bugsys->options['hidestatuses']) . ")" : "") ); +if (!$count['count']) +{ + $message->error(_('There are no bugs to display. This could be because you do not have permission to view bugs, or there may be none in the database.')); +} + $pagination->setTotal($count['count']); $pagination->splitPages(); -- 2.43.5