diff options
author | Merov Linden <merov@lindenlab.com> | 2013-11-18 16:07:55 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2013-11-18 16:07:55 -0800 |
commit | ce5baf14ac62ecd3bf471e1b49a4e166310ebe1a (patch) | |
tree | 110869149fbc439487bb7ae0c49c24b938570b09 /indra/newview/llurlhistory.cpp | |
parent | 125f3f071a30f4c47feb664b21f3e380ee4e7e49 (diff) | |
parent | ebc9bcbf69f7a519677a6522979a6bf6cbb04bb8 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llurlhistory.cpp')
-rwxr-xr-x | indra/newview/llurlhistory.cpp | 23 |
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 |