X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fannounceidentitypage.cpp;h=710904c274b9f61ec2b6bb98c77c1613120fd007;hp=460302af9b08d9c88873b0214c2a3bef37a29120;hb=b9c3763a932cebaa015a27fe111017f6f34dfbaa;hpb=37a8d59548287dcad78ef00e7b18058721eb9935 diff --git a/src/http/pages/announceidentitypage.cpp b/src/http/pages/announceidentitypage.cpp index 460302a..710904c 100644 --- a/src/http/pages/announceidentitypage.cpp +++ b/src/http/pages/announceidentitypage.cpp @@ -84,6 +84,8 @@ const std::string AnnounceIdentityPage::GeneratePage(const std::string &method, content+="
Type the answers of a few puzzles"; content+=""; + //TODO if we are already inserting a solution for an identity - we shouldn't select any puzzles that are older than the one we are inserting + date.SetToGMTime(); date.Add(0,0,0,-1); SQLite3DB::Statement st=m_db->Prepare("SELECT UUID,Day,IdentityID FROM tblIntroductionPuzzleRequests WHERE UUID NOT IN (SELECT UUID FROM tblIdentityIntroductionInserts) AND UUID NOT IN (SELECT UUID FROM tblIntroductionPuzzleInserts) AND Day>='"+date.Format("%Y-%m-%d")+"' AND Found='true' ORDER BY IdentityID, Day DESC, RequestIndex DESC;");