- internal : quick and dirty hack fix for RlvUtil::filterNames() but there's no time to do a proper backport from RLVa-1.5
--HG-- branch : RLVameow-7.2.2
parent
e4d224d390
commit
8d3c2c6eb6
|
|
@ -385,7 +385,9 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
|
|||
if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
|
||||
{
|
||||
const std::string& strDisplayName = avName.getDisplayName();
|
||||
bool fFilterDisplay = (strDisplayName.length() > 2);
|
||||
const std::string& strLegacyName = avName.getLegacyName();
|
||||
fFilterLegacy &= (strLegacyName.length() > 2);
|
||||
const std::string& strAnonym = RlvStrings::getAnonym(avName);
|
||||
|
||||
// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
|
||||
|
|
@ -393,11 +395,13 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
|
|||
{
|
||||
if (fFilterLegacy)
|
||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterDisplay)
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
}
|
||||
else
|
||||
{
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterDisplay)
|
||||
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||
if (fFilterLegacy)
|
||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue