- Patch #9031 by Ber: if the comment module is not available comment_num_all()

should not be called.
4.5.x
Dries Buytaert 2004-07-06 07:38:35 +00:00
parent 7bb88809b7
commit 4e9ef33896
2 changed files with 14 additions and 10 deletions

View File

@ -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 .= '<br />';
$comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new');
if ($new = comment_num_new($node->nid)) {
$comments .= '<br />';
$comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new');
}
}
}
else {

View File

@ -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 .= '<br />';
$comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new');
if ($new = comment_num_new($node->nid)) {
$comments .= '<br />';
$comments .= l(t('%num new', array('%num' => $new)), "node/$node->nid", NULL, NULL, 'new');
}
}
}
else {