From b885ccb824f21e0565f5cc0045e001e09fbe1506 Mon Sep 17 00:00:00 2001
From: natrak <>
Date: Thu, 12 Jul 2001 15:14:15 +0000
Subject: - Fixed "Recent nodes" showing not showing "No nodes recently" in
account_track_site().
---
account.php | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/account.php b/account.php
index 47edb0c74..84c401cde 100644
--- a/account.php
+++ b/account.php
@@ -381,12 +381,14 @@ function account_track_site() {
$result = db_query("SELECT n.title, n.nid, n.type, n.status, u.userid FROM node n LEFT JOIN users u ON n.author = u.id WHERE ". time() ." - n.timestamp < $period ORDER BY n.timestamp DESC LIMIT 10");
- $output .= "
\n";
- $output .= " ". t("Subject") ." | ". t("Author") ." | ". t("Type") ." | ". t("Status") ." |
\n";
- while ($node = db_fetch_object($result)) {
- $output .= " nid\">". check_output($node->title) ." | ". format_username($node->userid) ." | $node->type | ". node_status($node->status) ." |
";
+ if (db_num_rows($result)) {
+ $output .= "\n";
+ $output .= " ". t("Subject") ." | ". t("Author") ." | ". t("Type") ." | ". t("Status") ." |
\n";
+ while ($node = db_fetch_object($result)) {
+ $output .= " nid\">". check_output($node->title) ." | ". format_username($node->userid) ." | $node->type | ". node_status($node->status) ." |
";
+ }
+ $output .= "
";
}
- $output .= "
";
$theme->box(t("Recent nodes"), ($output ? $output : t("No nodes recently.")));
--
cgit v1.2.3