Skip to content

Commit

Permalink
Now forum_get_discussions() is using $limitfrom and $limitnum
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 5, 2006
1 parent c5836b7 commit 9eabd19
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mod/forum/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1445,10 +1445,10 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
$userselect = "";
}

$limitfrom = 0;
$limitnum = 0;
if ($limit) {
$limit = " LIMIT $limit ";
} else {
$limit = "";
$limitnum = $limit;
}

if ($visiblegroups == -1) {
Expand Down Expand Up @@ -1485,7 +1485,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
WHERE d.forum = '$forum'
AND p.parent = 0
$timelimit $groupselect $userselect
ORDER BY $forumsort $limit");
ORDER BY $forumsort", $limitfrom, $limitnum);
} else {
return get_records_sql("SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid,
u.firstname, u.lastname, u.email, u.picture $umfields
Expand All @@ -1497,7 +1497,7 @@ function forum_get_discussions($forum="0", $forumsort="d.timemodified DESC",
AND p.discussion = d.id
AND p.parent = 0
AND p.userid = u.id $timelimit $groupselect $userselect
ORDER BY $forumsort $limit");
ORDER BY $forumsort", $limitfrom, $limitnum);
}
}

Expand Down

0 comments on commit 9eabd19

Please sign in to comment.