Add post checksum mode
This commit is contained in:
@@ -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 + "', " +
|
||||
|
||||
Reference in New Issue
Block a user