diff options
author | natrak <> | 2001-07-12 15:14:15 +0000 |
---|---|---|
committer | natrak <> | 2001-07-12 15:14:15 +0000 |
commit | b885ccb824f21e0565f5cc0045e001e09fbe1506 (patch) | |
tree | a0f57fb81c4033a63b9f425c70e1422ba35e7a19 | |
parent | 170cf2f4a446d99da3336da20ee42848a7da4c3d (diff) | |
download | brdo-b885ccb824f21e0565f5cc0045e001e09fbe1506.tar.gz brdo-b885ccb824f21e0565f5cc0045e001e09fbe1506.tar.bz2 |
- Fixed "Recent nodes" showing not showing "No nodes recently" in
account_track_site().
-rw-r--r-- | account.php | 12 |
1 files 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 .= "<TABLE BORDER=\"0\" CELLSPACING=\"4\" CELLPADDING=\"4\">\n"; - $output .= " <TR><TH>". t("Subject") ."</TH><TH>". t("Author") ."</TH><TH>". t("Type") ."</TH><TH>". t("Status") ."</TH></TR>\n"; - while ($node = db_fetch_object($result)) { - $output .= " <TR><TD><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid) ."</TD><TD ALIGN=\"center\">$node->type</TD><TD>". node_status($node->status) ."</TD></TR>"; + if (db_num_rows($result)) { + $output .= "<TABLE BORDER=\"0\" CELLSPACING=\"4\" CELLPADDING=\"4\">\n"; + $output .= " <TR><TH>". t("Subject") ."</TH><TH>". t("Author") ."</TH><TH>". t("Type") ."</TH><TH>". t("Status") ."</TH></TR>\n"; + while ($node = db_fetch_object($result)) { + $output .= " <TR><TD><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></TD><TD ALIGN=\"center\">". format_username($node->userid) ."</TD><TD ALIGN=\"center\">$node->type</TD><TD>". node_status($node->status) ."</TD></TR>"; + } + $output .= "</TABLE>"; } - $output .= "</TABLE>"; $theme->box(t("Recent nodes"), ($output ? $output : t("No nodes recently."))); |