summaryrefslogtreecommitdiff
path: root/indra/newview/llurlhistory.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2013-07-19 22:35:45 -0700
committerMerov Linden <merov@lindenlab.com>2013-07-19 22:35:45 -0700
commiteadb42eb9d202c38ca2761be07ee4376863550ce (patch)
treee3be91baa660a413a02af6d4084d2fb81ad49c77 /indra/newview/llurlhistory.cpp
parent39a2f52b026ee20daf9f55bb40273e573cecfa30 (diff)
ACME-734 : Fix : Feed browsing history but without the query part
Diffstat (limited to 'indra/newview/llurlhistory.cpp')
-rwxr-xr-xindra/newview/llurlhistory.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/newview/llurlhistory.cpp b/indra/newview/llurlhistory.cpp
index dd17068be5..a80b9da13c 100755
--- a/indra/newview/llurlhistory.cpp
+++ b/indra/newview/llurlhistory.cpp
@@ -103,22 +103,29 @@ LLSD LLURLHistory::getURLHistory(const std::string& collection)
// static
void LLURLHistory::addURL(const std::string& collection, const std::string& url)
{
- if(! url.empty())
+ if(!url.empty())
{
- sHistorySD[collection].insert(0, url);
+ LLURI u(url);
+ std::string simplified_url = u.scheme() + "://" + u.authority() + u.path();
+ sHistorySD[collection].insert(0, simplified_url);
LLURLHistory::limitSize(collection);
}
}
// static
void LLURLHistory::removeURL(const std::string& collection, const std::string& url)
{
- for(int index = 0; index < sHistorySD[collection].size(); index++)
+ if(!url.empty())
{
- if(sHistorySD[collection].get(index).asString() == url)
- {
- sHistorySD[collection].erase(index);
- }
- }
+ LLURI u(url);
+ std::string simplified_url = u.scheme() + "://" + u.authority() + u.path();
+ for(int index = 0; index < sHistorySD[collection].size(); index++)
+ {
+ if(sHistorySD[collection].get(index).asString() == simplified_url)
+ {
+ sHistorySD[collection].erase(index);
+ }
+ }
+ }
}
// static