Commit 8030c135 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix calculation of last page offset


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent be8e2f8c
......@@ -199,7 +199,7 @@ class ArtefactTypeComment extends ArtefactType {
if ($result->count > 0) {
if ($lastpage) { // Ignore $offset and just get the last page of feedback
$offset = (ceil($count / $limit) - 1) * $limit;
$offset = (ceil($result->count / $limit) - 1) * $limit;
}
$comments = get_records_sql_assoc('
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment