X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffreenet%2Fidentityinserter.cpp;h=f246d66402989d8bb6c75e1bba1fa51bc1786b30;hb=e773b0ecb8a35c67cde5b2e82bbebb05224f34d0;hp=3fabf007174a222a5d87b832c247debd0c08212c;hpb=c7fcb4c4bc5012a584add81a9509fc1f84c3c688;p=fms.git diff --git a/src/freenet/identityinserter.cpp b/src/freenet/identityinserter.cpp index 3fabf00..f246d66 100644 --- a/src/freenet/identityinserter.cpp +++ b/src/freenet/identityinserter.cpp @@ -150,7 +150,7 @@ void IdentityInserter::StartInsert(const long localidentityid) StringFunctions::Convert(localidentityid,idstring); date.SetToGMTime(); - SQLite3DB::Recordset rs=m_db->Query("SELECT Name,PrivateKey,SingleUse,PublishTrustList,PublishBoardList FROM tblLocalIdentity WHERE LocalIdentityID="+idstring+";"); + SQLite3DB::Recordset rs=m_db->Query("SELECT Name,PrivateKey,SingleUse,PublishTrustList,PublishBoardList,PublishFreesite,FreesiteEdition FROM tblLocalIdentity WHERE LocalIdentityID="+idstring+";"); if(rs.Empty()==false) { @@ -166,6 +166,8 @@ void IdentityInserter::StartInsert(const long localidentityid) std::string singleuse="false"; std::string publishtrustlist="false"; std::string publishboardlist="false"; + std::string freesiteedition=""; + int edition=-1; now.SetToGMTime(); @@ -213,6 +215,16 @@ void IdentityInserter::StartInsert(const long localidentityid) } publishboardlist=="true" ? idxml.SetPublishBoardList(true) : idxml.SetPublishBoardList(false); + if(rs.GetField(5) && rs.GetField(6)) + { + if(std::string(rs.GetField(5))=="true") + { + freesiteedition=rs.GetField(6); + StringFunctions::Convert(freesiteedition,edition); + idxml.SetFreesiteEdition(edition); + } + } + data=idxml.GetXML(); StringFunctions::Convert(data.size(),datasizestr);