summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
index ab9d3343..ee24f8af 100644
--- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
+++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/database/mappers/DbLecture.java
@@ -14,6 +14,7 @@ import org.apache.logging.log4j.Logger;
import org.openslx.bwlp.sat.database.Database;
import org.openslx.bwlp.sat.database.MysqlConnection;
import org.openslx.bwlp.sat.database.MysqlStatement;
+import org.openslx.bwlp.sat.database.Paginator;
import org.openslx.bwlp.sat.database.models.LocalImageVersion;
import org.openslx.bwlp.sat.mail.MailGenerator;
import org.openslx.bwlp.sat.permissions.User;
@@ -246,7 +247,8 @@ public class DbLecture {
public static List<LectureSummary> getAll(UserInfo user, int page) throws SQLException {
try (MysqlConnection connection = Database.getConnection()) {
MysqlStatement stmt = connection.prepareStatement(summaryBaseSql
- + (User.isStudent(user) ? " WHERE i.isrestricted = 0" : ""));
+ + (User.isStudent(user) ? " WHERE i.isrestricted = 0" : "")
+ + Paginator.limitStatement(page));
stmt.setString("userid", user == null ? "-" : user.userId);
ResultSet rs = stmt.executeQuery();
List<LectureSummary> list = new ArrayList<>(100);