X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ffreenet%2Fidentityxml.cpp;h=4b0fa237dbd58adc16dbe5310c51be11005e2bb3;hb=1230cc420c955e75051d011d964bc68f061ba08c;hp=e3905a9b418ef1b562a453ed3db418420882cb59;hpb=107bd97018964d48425306026d06afd038e84db0;p=fms.git diff --git a/src/freenet/identityxml.cpp b/src/freenet/identityxml.cpp index e3905a9..4b0fa23 100644 --- a/src/freenet/identityxml.cpp +++ b/src/freenet/identityxml.cpp @@ -28,6 +28,12 @@ std::string IdentityXML::GetXML() tid->LinkEndChild(XMLCreateBooleanElement("PublishBoardList",m_publishboardlist)); + // freesite edition will be -1 if identity isn't publishing a freesite + if(m_freesiteedition>=0) + { + tid->LinkEndChild(XMLCreateTextElement("FreesiteEdition",m_freesiteedition)); + } + td.Accept(&tp); return std::string(tp.CStr()); @@ -39,6 +45,7 @@ void IdentityXML::Initialize() m_publishtrustlist=false; m_publishboardlist=false; m_singleuse=false; + m_freesiteedition=-1; } const bool IdentityXML::ParseXML(const std::string &xml) @@ -70,6 +77,13 @@ const bool IdentityXML::ParseXML(const std::string &xml) m_publishboardlist=XMLGetBooleanElement(hnd.FirstChild("Identity").ToElement(),"PublishBoardList"); + txt=hnd.FirstChild("Identity").FirstChild("FreesiteEdition").FirstChild().ToText(); + if(txt) + { + std::string editionstr=SanitizeSingleString(txt->ValueStr()); + StringFunctions::Convert(editionstr,m_freesiteedition); + } + return true; }