r1369: Don't show an empty grid if there are no bugs to display on index.php
authorRobert Sesek <rsesek@bluestatic.org>
Tue, 26 Dec 2006 20:21:51 +0000 (20:21 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Tue, 26 Dec 2006 20:21:51 +0000 (20:21 +0000)
docs/changes.txt
index.php

index 4a9badcd1c3e2dfb78ac28f8c9767c8f00c66082..c7da44a7a95fe99ea372d5e760882a739584ba87 100644 (file)
@@ -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
 ===============================
index 8b2682623addf71a27f481e3f0c1182fdd5bd8b4..9da45feaf92c8c1246f6ccb1eb6a33e699882cd3 100644 (file)
--- 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();