diff options
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llurldispatcher.cpp | 9 | ||||
-rw-r--r-- | linden/indra/newview/llviewermessage.cpp | 5 |
3 files changed, 19 insertions, 1 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 00fa517..2d46943 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -4547,6 +4547,12 @@ BOOL LLTextEditor::findHTML(const std::string &line, S32 *begin, S32 *end) const | |||
4547 | std::string slurlID = "slurl.com/secondlife/"; | 4547 | std::string slurlID = "slurl.com/secondlife/"; |
4548 | strpos = url.find(slurlID); | 4548 | strpos = url.find(slurlID); |
4549 | 4549 | ||
4550 | if (strpos < 0) | ||
4551 | { | ||
4552 | slurlID="maps.secondlife.com/secondlife/"; | ||
4553 | strpos = url.find(slurlID); | ||
4554 | } | ||
4555 | |||
4550 | if (strpos < 0) | 4556 | if (strpos < 0) |
4551 | { | 4557 | { |
4552 | slurlID="secondlife://"; | 4558 | slurlID="secondlife://"; |
diff --git a/linden/indra/newview/llurldispatcher.cpp b/linden/indra/newview/llurldispatcher.cpp index 7c50bd4..f9b6b39 100644 --- a/linden/indra/newview/llurldispatcher.cpp +++ b/linden/indra/newview/llurldispatcher.cpp | |||
@@ -53,6 +53,7 @@ const std::string SLURL_SL_HELP_PREFIX = "secondlife://app."; | |||
53 | const std::string SLURL_SL_PREFIX = "sl://"; | 53 | const std::string SLURL_SL_PREFIX = "sl://"; |
54 | const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; | 54 | const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; |
55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; | 55 | const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; |
56 | const std::string SLURL_SLURL_ALT_PREFIX = "http://maps.secondlife.com/secondlife/"; | ||
56 | 57 | ||
57 | const std::string SLURL_APP_TOKEN = "app/"; | 58 | const std::string SLURL_APP_TOKEN = "app/"; |
58 | 59 | ||
@@ -117,6 +118,7 @@ bool LLURLDispatcherImpl::isSLURL(const std::string& url) | |||
117 | if (matchPrefix(url, SLURL_SL_PREFIX)) return true; | 118 | if (matchPrefix(url, SLURL_SL_PREFIX)) return true; |
118 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; | 119 | if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; |
119 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; | 120 | if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; |
121 | if (matchPrefix(url, SLURL_SLURL_ALT_PREFIX)) return true; | ||
120 | return false; | 122 | return false; |
121 | } | 123 | } |
122 | 124 | ||
@@ -125,7 +127,8 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url) | |||
125 | { | 127 | { |
126 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) | 128 | if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) |
127 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) | 129 | || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) |
128 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) ) | 130 | || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) |
131 | || matchPrefix(url, SLURL_SLURL_ALT_PREFIX + SLURL_APP_TOKEN)) | ||
129 | { | 132 | { |
130 | return true; | 133 | return true; |
131 | } | 134 | } |
@@ -364,6 +367,10 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url) | |||
364 | { | 367 | { |
365 | stripped.erase(0, SLURL_SLURL_PREFIX.length()); | 368 | stripped.erase(0, SLURL_SLURL_PREFIX.length()); |
366 | } | 369 | } |
370 | else if (matchPrefix(stripped, SLURL_SLURL_ALT_PREFIX)) | ||
371 | { | ||
372 | stripped.erase(0, SLURL_SLURL_ALT_PREFIX.length()); | ||
373 | } | ||
367 | return stripped; | 374 | return stripped; |
368 | } | 375 | } |
369 | 376 | ||
diff --git a/linden/indra/newview/llviewermessage.cpp b/linden/indra/newview/llviewermessage.cpp index 9bd11e8..fb1e7cf 100644 --- a/linden/indra/newview/llviewermessage.cpp +++ b/linden/indra/newview/llviewermessage.cpp | |||
@@ -1295,6 +1295,11 @@ void inventory_offer_handler(LLOfferInfo* info, BOOL from_task) | |||
1295 | // Strip any SLURL from the message display. (DEV-2754) | 1295 | // Strip any SLURL from the message display. (DEV-2754) |
1296 | std::string msg = info->mDesc; | 1296 | std::string msg = info->mDesc; |
1297 | int indx = msg.find(" ( http://slurl.com/secondlife/"); | 1297 | int indx = msg.find(" ( http://slurl.com/secondlife/"); |
1298 | if(indx == std::string::npos) | ||
1299 | { | ||
1300 | // try to find new slurl host | ||
1301 | indx = msg.find(" ( http://maps.secondlife.com/secondlife/"); | ||
1302 | } | ||
1298 | if(indx >= 0) | 1303 | if(indx >= 0) |
1299 | { | 1304 | { |
1300 | LLStringUtil::truncate(msg, indx); | 1305 | LLStringUtil::truncate(msg, indx); |