X-Git-Url: https://git.pterodactylus.net/?p=fms.git;a=blobdiff_plain;f=src%2Fmessage.cpp;h=4c897e3c5c30f0a4c6bd7647d6ebc6d2c6617913;hp=0445e294e71125b5612aae3978b82a1b83456b12;hb=59a5414ec47a2932a7802fcd1d98c4d80166564f;hpb=4e96d123460d6363cf7274e36bd9357768eb86ad diff --git a/src/message.cpp b/src/message.cpp index 0445e29..4c897e3 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -18,12 +18,12 @@ #include #endif -Message::Message() +Message::Message(SQLite3DB::DB *db):IDatabase(db) { Initialize(); } -Message::Message(const long messageid) +Message::Message(SQLite3DB::DB *db, const long messageid):IDatabase(db) { Load(messageid); } @@ -400,9 +400,11 @@ void Message::Initialize() m_inreplyto.clear(); m_fileattachments.clear(); m_changemessagetrustonreply=0; - Option::Instance()->Get("ChangeMessageTrustOnReply",tempval); + Option option(m_db); + + option.Get("ChangeMessageTrustOnReply",tempval); StringFunctions::Convert(tempval,m_changemessagetrustonreply); - Option::Instance()->Get("AddNewPostFromIdentities",tempval); + option.Get("AddNewPostFromIdentities",tempval); if(tempval=="true") { m_addnewpostfromidentities=true; @@ -412,10 +414,10 @@ void Message::Initialize() m_addnewpostfromidentities=false; } tempval="50"; - Option::Instance()->Get("MinLocalMessageTrust",tempval); + option.Get("MinLocalMessageTrust",tempval); StringFunctions::Convert(tempval,m_minlocalmessagetrust); tempval="51"; - Option::Instance()->Get("MinLocalTrustListTrust",tempval); + option.Get("MinLocalTrustListTrust",tempval); StringFunctions::Convert(tempval,m_minlocaltrustlisttrust); }