diff options
author | Eugene Mutavchi <emutavchi@productengine.com> | 2010-02-03 19:38:12 +0200 |
---|---|---|
committer | Eugene Mutavchi <emutavchi@productengine.com> | 2010-02-03 19:38:12 +0200 |
commit | 8c1618ca5ae81eec0a5fa6229e89cd0f1a072a27 (patch) | |
tree | b04fd3a34db8db2fbd94b6cefd93b98e9b878ebc /indra/newview | |
parent | 7e1911baa23c2c7491c5089015d8f9b30df5ce01 (diff) |
Fixed major bug EXT-4876 (Switch from slurl.com to maps.secondlife.com)
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llslurl.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llslurl.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 5 |
3 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp index 37e268ad34..3343ee88bd 100644 --- a/indra/newview/llslurl.cpp +++ b/indra/newview/llslurl.cpp @@ -39,7 +39,8 @@ const std::string LLSLURL::PREFIX_SL_HELP = "secondlife://app."; const std::string LLSLURL::PREFIX_SL = "sl://"; const std::string LLSLURL::PREFIX_SECONDLIFE = "secondlife://"; -const std::string LLSLURL::PREFIX_SLURL = "http://slurl.com/secondlife/"; +const std::string LLSLURL::PREFIX_SLURL_OLD = "http://slurl.com/secondlife/"; +const std::string LLSLURL::PREFIX_SLURL = "http://maps.secondlife.com/secondlife/"; const std::string LLSLURL::APP_TOKEN = "app/"; @@ -63,6 +64,11 @@ std::string LLSLURL::stripProtocol(const std::string& url) { stripped.erase(0, PREFIX_SLURL.length()); } + else if (matchPrefix(stripped, PREFIX_SLURL_OLD)) + { + stripped.erase(0, PREFIX_SLURL_OLD.length()); + } + return stripped; } @@ -74,6 +80,7 @@ bool LLSLURL::isSLURL(const std::string& url) if (matchPrefix(url, PREFIX_SL)) return true; if (matchPrefix(url, PREFIX_SECONDLIFE)) return true; if (matchPrefix(url, PREFIX_SLURL)) return true; + if (matchPrefix(url, PREFIX_SLURL_OLD)) return true; return false; } @@ -83,7 +90,8 @@ bool LLSLURL::isSLURLCommand(const std::string& url) { if (matchPrefix(url, PREFIX_SL + APP_TOKEN) || matchPrefix(url, PREFIX_SECONDLIFE + "/" + APP_TOKEN) || - matchPrefix(url, PREFIX_SLURL + APP_TOKEN) ) + matchPrefix(url, PREFIX_SLURL + APP_TOKEN) || + matchPrefix(url, PREFIX_SLURL_OLD + APP_TOKEN) ) { return true; } diff --git a/indra/newview/llslurl.h b/indra/newview/llslurl.h index 05b0143e72..21b32ce409 100644 --- a/indra/newview/llslurl.h +++ b/indra/newview/llslurl.h @@ -50,6 +50,7 @@ public: static const std::string PREFIX_SL; static const std::string PREFIX_SECONDLIFE; static const std::string PREFIX_SLURL; + static const std::string PREFIX_SLURL_OLD; static const std::string APP_TOKEN; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index e525561b7d..143d95d27e 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1478,6 +1478,11 @@ void inventory_offer_handler(LLOfferInfo* info) // Strip any SLURL from the message display. (DEV-2754) std::string msg = info->mDesc; int indx = msg.find(" ( http://slurl.com/secondlife/"); + if(indx == std::string::npos) + { + // try to find new slurl host + indx = msg.find(" ( http://maps.secondlife.com/secondlife/"); + } if(indx >= 0) { LLStringUtil::truncate(msg, indx); |