- 3 small bugfixes

3-00
Dries Buytaert 2001-01-20 12:53:54 +00:00
parent 7241d38e4c
commit e25c50b994
5 changed files with 5 additions and 4 deletions

View File

@ -325,6 +325,7 @@ function comment_render($lid, $cid) {
global $link, $theme, $REQUEST_URI, $user;
// Pre-process variables:
$lid = empty($lid) ? 0 : $lid;
$cid = empty($cid) ? 0 : $cid;
$mode = ($user->id) ? $user->mode : 4;
$order = ($user->id) ? $user->sort : 1;

View File

@ -73,7 +73,7 @@ function drupal_page() {
break;
default:
$theme->header();
drupal_render(0, $cid);
drupal_render($id, $cid);
$theme->footer();
}
}

View File

@ -73,7 +73,7 @@ function drupal_page() {
break;
default:
$theme->header();
drupal_render(0, $cid);
drupal_render($id, $cid);
$theme->footer();
}
}

View File

@ -22,7 +22,7 @@ function story_help() {
}
function story_block() {
$result = db_query("SELECT s.id, COUNT(s.id) AS comments, s.subject FROM stories s LEFT JOIN comments c ON s.id = c.lid WHERE s.status = 2 AND c.link = 'link' GROUP BY s.id ORDER BY comments DESC LIMIT 10");
$result = db_query("SELECT s.id, COUNT(s.id) AS comments, s.subject FROM stories s LEFT JOIN comments c ON s.id = c.lid WHERE s.status = 2 AND c.link = 'story' GROUP BY s.id ORDER BY comments DESC LIMIT 10");
while ($story = db_fetch_object($result)) {
$content .= "<LI><A HREF=\"story.php?id=$story->id\">$story->subject</A><BR><SMALL>(". format_plural($story->comments, "comment", "comments") .")</SMALL></LI>\n";
}

View File

@ -22,7 +22,7 @@ function story_help() {
}
function story_block() {
$result = db_query("SELECT s.id, COUNT(s.id) AS comments, s.subject FROM stories s LEFT JOIN comments c ON s.id = c.lid WHERE s.status = 2 AND c.link = 'link' GROUP BY s.id ORDER BY comments DESC LIMIT 10");
$result = db_query("SELECT s.id, COUNT(s.id) AS comments, s.subject FROM stories s LEFT JOIN comments c ON s.id = c.lid WHERE s.status = 2 AND c.link = 'story' GROUP BY s.id ORDER BY comments DESC LIMIT 10");
while ($story = db_fetch_object($result)) {
$content .= "<LI><A HREF=\"story.php?id=$story->id\">$story->subject</A><BR><SMALL>(". format_plural($story->comments, "comment", "comments") .")</SMALL></LI>\n";
}