#include <xmem.h>\r
#endif\r
\r
-IntroductionPuzzleInserter::IntroductionPuzzleInserter():IIndexInserter<long>()\r
+IntroductionPuzzleInserter::IntroductionPuzzleInserter(SQLite3DB::DB *db):IIndexInserter<long>(db)\r
{\r
Initialize();\r
}\r
\r
-IntroductionPuzzleInserter::IntroductionPuzzleInserter(FCPv2::Connection *fcp):IIndexInserter<long>(fcp)\r
+IntroductionPuzzleInserter::IntroductionPuzzleInserter(SQLite3DB::DB *db, FCPv2::Connection *fcp):IIndexInserter<long>(db,fcp)\r
{\r
Initialize();\r
}\r
}\r
}\r
\r
- Option::Instance()->Get("MessageBase",messagebase);\r
+ Option option(m_db);\r
+ option.Get("MessageBase",messagebase);\r
\r
GenerateCaptcha(encodedpuzzle,solutionstring);\r
if(encodedpuzzle.size()==0)\r
m_fcp->Send(message);\r
m_fcp->Send(std::vector<char>(xmldata.begin(),xmldata.end()));\r
\r
- // insert to USK\r
+ // insert to USK - not used, but don't remove code yet\r
+ /*\r
message.Clear();\r
message.SetName("ClientPutComplexDir");\r
message["URI"]="USK"+privatekey.substr(3)+messagebase+"|"+Poco::DateTimeFormatter::format(now,"%Y.%m.%d")+"|IntroductionPuzzle/0/";\r
message["Files.0.DataLength"]=xmldatasizestr;\r
m_fcp->Send(message);\r
m_fcp->Send(std::vector<char>(xmldata.begin(),xmldata.end()));\r
+ */\r
\r
m_db->Execute("INSERT INTO tblIntroductionPuzzleInserts(UUID,Type,MimeType,LocalIdentityID,PuzzleData,PuzzleSolution) VALUES('"+xml.GetUUID()+"','captcha','image/bmp',"+idstring+",'"+encodedpuzzle+"','"+solutionstring+"');");\r
\r