From 775c0dc5c1d7657c7deec72479da6d314a736477 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Fri, 24 Nov 2006 02:23:58 +0000 Subject: [PATCH] r1319: Show an error if a user does not have any favorites in his list but tries to view the tab rather than just an empty list --- docs/changes.txt | 4 ++++ favorite.php | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/docs/changes.txt b/docs/changes.txt index 41fffcf..6fb9410 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -1,3 +1,7 @@ +1.2.0 Beta 1 +=============================== +- When a user does not have any favorites in his list, show a message instead of an empty screen + 1.1.4 =============================== - Time zones with half-hours are not saved because the field only allows INTs (http://www.bluestatic.org/bugs/showreport.php?bugid=38) diff --git a/favorite.php b/favorite.php index 457d058..05da601 100644 --- a/favorite.php +++ b/favorite.php @@ -79,6 +79,12 @@ if ($_REQUEST['do'] == 'manage') WHERE favorite.userid = " . $bugsys->userinfo['userid'] . " AND (!bug.hidden OR (bug.hidden AND bug.product IN (" . fetch_on_bits('canviewhidden') . "))" . (can_perform('canviewownhidden') ? " OR (bug.hidden AND bug.userid = " . $bugsys->userinfo['userid'] . " AND bug.product IN (" . fetch_on_bits('canviewownhidden') . "))" : "") . ") "); + + if ($db->num_rows($favorites) < 1) + { + $message->error(_('You do not have any favorites in your list. To add a bug to your list, while viewing the report, click the [Add to Favorites] link next to the bug\'s ID.')); + } + while ($bug = $db->fetch_array($favorites)) { $funct->exec_swap_bg($stylevar['alt_color'], ''); -- 2.43.5