From 4e9ef33896bc0798f766e684e1c57783a2d700a7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 6 Jul 2004 07:38:35 +0000 Subject: [PATCH] - Patch #9031 by Ber: if the comment module is not available comment_num_all() should not be called. --- modules/tracker.module | 12 +++++++----- modules/tracker/tracker.module | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/modules/tracker.module b/modules/tracker.module index 36791ecd65c..9b68752ae5f 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -52,12 +52,14 @@ function tracker_page($uid = 0) { while ($node = db_fetch_object($result)) { // Determine the number of comments: - if ($all = comment_num_all($node->nid)) { - $comments = $all; + if (module_exist('comment')) { + if ($all = comment_num_all($node->nid)) { + $comments = $all; - if ($new = comment_num_new($node->nid)) { - $comments .= '
'; - $comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new'); + if ($new = comment_num_new($node->nid)) { + $comments .= '
'; + $comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new'); + } } } else { diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 36791ecd65c..9b68752ae5f 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -52,12 +52,14 @@ function tracker_page($uid = 0) { while ($node = db_fetch_object($result)) { // Determine the number of comments: - if ($all = comment_num_all($node->nid)) { - $comments = $all; + if (module_exist('comment')) { + if ($all = comment_num_all($node->nid)) { + $comments = $all; - if ($new = comment_num_new($node->nid)) { - $comments .= '
'; - $comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new'); + if ($new = comment_num_new($node->nid)) { + $comments .= '
'; + $comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new'); + } } } else {