X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fhttp%2Fpages%2Fpeertrustpage.cpp;h=ac6b053adc7caecfb63e9f32385d54bac8f5cafa;hb=6836fbb5db8464f56e682989996b2210b14231d0;hp=21b07305491472bda5e1dacb28435d2770c90587;hpb=b4f4686250878cdf4fcb2986a2ea6546cba867d1;p=fms.git diff --git a/src/http/pages/peertrustpage.cpp b/src/http/pages/peertrustpage.cpp index 21b0730..ac6b053 100644 --- a/src/http/pages/peertrustpage.cpp +++ b/src/http/pages/peertrustpage.cpp @@ -131,7 +131,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s } } - if(queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="update") + if(localidentityid!=-1 && queryvars.find("formaction")!=queryvars.end() && (*queryvars.find("formaction")).second=="update") { std::vector identityids; std::vector oldlmt; @@ -239,8 +239,9 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s } content+="

Peer Trust

"; - content+="Message Trust is how much you trust the identity to post good messages. Trust List Trust is how much weight you want the trust list of that identity to have when calculating the total. The local trust levels are set by you, and the peer trust levels are calculated by a weighted average using other identities' trust lists. Trust is recalculated once an hour from received trust lists. You must have at least 1 identity created and have received the SSK keypair for it from Freenet before setting trust."; - + content+="Message Trust is how much you trust the identity to post good messages. Trust List Trust is how much weight you want the trust list of that identity to have when calculating the total. The local trust levels are set by you, and the peer trust levels are calculated by a weighted average using other identities' trust lists. Trust is recalculated once an hour from received trust lists. You must have at least 1 identity created and have received the SSK keypair for it from Freenet before setting trust.
"; + content+="* - This identity is not publishing a trust list
"; + // search drop down content+="
"; content+="
"; @@ -276,7 +277,6 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s content+="Message Count"; content+="\r\n"; -//TODO - modify this query // get count of identities we are showing sql="SELECT COUNT(*) FROM tblIdentity LEFT JOIN (SELECT IdentityID FROM tblIdentityTrust WHERE LocalIdentityID=?) AS 'tblIdentityTrust' ON tblIdentity.IdentityID=tblIdentityTrust.IdentityID "; sql+="WHERE tblIdentity.Hidden='false'"; @@ -296,7 +296,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s st.ResultInt(0,identitycount); st.Finalize(); - sql="SELECT tblIdentity.IdentityID,Name,tblIdentityTrust.LocalMessageTrust,PeerMessageTrust,tblIdentityTrust.LocalTrustListTrust,PeerTrustListTrust,PublicKey,tblIdentityTrust.MessageTrustComment,tblIdentityTrust.TrustListTrustComment,COUNT(MessageID) AS 'MessageCount' "; + sql="SELECT tblIdentity.IdentityID,Name,tblIdentityTrust.LocalMessageTrust,PeerMessageTrust,tblIdentityTrust.LocalTrustListTrust,PeerTrustListTrust,PublicKey,tblIdentityTrust.MessageTrustComment,tblIdentityTrust.TrustListTrustComment,COUNT(MessageID) AS 'MessageCount',tblIdentity.PublishTrustList "; sql+="FROM tblIdentity LEFT JOIN (SELECT LocalIdentityID,IdentityID,LocalMessageTrust,LocalTrustListTrust,MessageTrustComment,TrustListTrustComment FROM tblIdentityTrust WHERE LocalIdentityID=?) AS tblIdentityTrust ON tblIdentity.IdentityID=tblIdentityTrust.IdentityID LEFT JOIN tblMessage ON tblIdentity.IdentityID=tblMessage.IdentityID "; sql+="WHERE tblIdentity.Hidden='false'"; if(namesearch!="") @@ -339,6 +339,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s std::string messagetrustcomment=""; std::string trustlisttrustcomment=""; std::string messagecountstr=""; + std::string publishtrustlist=""; StringFunctions::Convert(count,countstr); @@ -352,6 +353,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s st.ResultText(7,messagetrustcomment); st.ResultText(8,trustlisttrustcomment); st.ResultText(9,messagecountstr); + st.ResultText(10,publishtrustlist); content+=""; content+=""; @@ -378,7 +380,12 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s content+=peermessagetrust+""; content+=""; content+=""; - content+=""; + content+=""; + if(publishtrustlist=="false") + { + content+="*"; + } + content+=""; content+=""; content+=""; content+=""; @@ -415,7 +422,7 @@ const std::string PeerTrustPage::GeneratePage(const std::string &method, const s content+=""; } - content+="
"; + content+="
"; content+=""; content+="
";