- 3 small bugfixes
parent
7241d38e4c
commit
e25c50b994
|
@ -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;
|
||||
|
|
|
@ -73,7 +73,7 @@ function drupal_page() {
|
|||
break;
|
||||
default:
|
||||
$theme->header();
|
||||
drupal_render(0, $cid);
|
||||
drupal_render($id, $cid);
|
||||
$theme->footer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ function drupal_page() {
|
|||
break;
|
||||
default:
|
||||
$theme->header();
|
||||
drupal_render(0, $cid);
|
||||
drupal_render($id, $cid);
|
||||
$theme->footer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue