summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-12-05 17:53:26 +0000
committerDries Buytaert <dries@buytaert.net>2006-12-05 17:53:26 +0000
commit1ea9f060935a9bd47a036514b79e2f62e97ab313 (patch)
treee606a94d35c3ed3f4fee6eaab20ac6e48cb4ce3e
parent00758e24dc159d734669ad9d62c765424180a412 (diff)
downloadbrdo-1ea9f060935a9bd47a036514b79e2f62e97ab313.tar.gz
brdo-1ea9f060935a9bd47a036514b79e2f62e97ab313.tar.bz2
- Patch #8716 by webchick et al: small usability improvement: don't show empty tables.
-rw-r--r--modules/tracker/tracker.module5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index 28b732a69..8a06631a1 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -91,6 +91,7 @@ function tracker_page($uid = 0) {
$result = pager_query($sql, 25, 0, $sql_count);
}
+ $rows = array();
while ($node = db_fetch_object($result)) {
// Determine the number of comments:
$comments = 0;
@@ -112,6 +113,10 @@ function tracker_page($uid = 0) {
);
}
+ if (!$rows) {
+ $rows[] = array(array('data' => t('No posts available.'), 'colspan' => '5'));
+ }
+
$header = array(t('Type'), t('Post'), t('Author'), t('Replies'), t('Last post'));
$output = '<div id="tracker">';