Add post checksum mode

This commit is contained in:
2020-11-09 20:38:31 +01:00
parent 4119163c4c
commit a00cf1e408
2 changed files with 27 additions and 2 deletions
@@ -210,6 +210,20 @@ public class TippligaSQLConnector {
executeUpdate(query);
}
public String getChecksumOfPost(int forum_id, String subject) {
String queryString = "SELECT post_checksum FROM phpbb_posts WHERE forum_id = " + forum_id + " AND post_subject = '" + subject + "'";
ResultSet rset = executeQuery(queryString);
String checksum = null;
try {
while (rset.next()) {
checksum = rset.getString(1);
}
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return checksum;
}
public String getPostUpdateQuery(int postId, String postText, String postChecksum, long postEditTime, String postEditReason, int postEditUser) {
return "UPDATE phpbb_posts SET " +
"post_text = '" + postText + "', " +