diff options
author | simon <none@none> | 2013-10-24 16:45:38 -0700 |
---|---|---|
committer | simon <none@none> | 2013-10-24 16:45:38 -0700 |
commit | 26de32910f99e2522b8e10cf41415b1af2586d5b (patch) | |
tree | 57394ecbec4b9d7bc802e0a68c790f00f2b97887 /indra/newview/llurlhistory.cpp | |
parent | 93b3f1297ea5377257d14c5214790607e0b1af96 (diff) | |
parent | ea1e1b0925b386cf83178539b8eae9e25c573548 (diff) |
Pull in viewer-release with fbc / snowstorm
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 |