From 8d3c2c6eb6eb07785cd921ac839dc17a11fd6af0 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Wed, 26 Feb 2014 23:26:47 +0100 Subject: [PATCH] - 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 : RLVa --- indra/newview/rlvcommon.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index d382faba55..532f3604c7 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -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); }