diff options
author | Jacek Antonelli | 2008-08-15 23:45:54 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:54 -0500 |
commit | d0b03a62fd799317d5da0bd56615739ce3b5b052 (patch) | |
tree | 8bc79bbbb52e18294f62810d9fa66ce136f90e2d /linden/indra/newview/llpaneldirfind.cpp | |
parent | Second Life viewer sources 1.20.8 (diff) | |
download | meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.zip meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.gz meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.bz2 meta-impy-d0b03a62fd799317d5da0bd56615739ce3b5b052.tar.xz |
Second Life viewer sources 1.20.9
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llpaneldirfind.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/linden/indra/newview/llpaneldirfind.cpp b/linden/indra/newview/llpaneldirfind.cpp index 9bf71d9..92964ba 100644 --- a/linden/indra/newview/llpaneldirfind.cpp +++ b/linden/indra/newview/llpaneldirfind.cpp | |||
@@ -236,12 +236,20 @@ std::string LLPanelDirFind::buildSearchURL(const std::string& search_text, const | |||
236 | 236 | ||
237 | url = gSavedSettings.getString("SearchURLQuery"); | 237 | url = gSavedSettings.getString("SearchURLQuery"); |
238 | std::string substring = "[QUERY]"; | 238 | std::string substring = "[QUERY]"; |
239 | url.replace(url.find(substring), substring.length(), query); | 239 | std::string::size_type where = url.find(substring); |
240 | if (where != std::string::npos) | ||
241 | { | ||
242 | url.replace(where, substring.length(), query); | ||
243 | } | ||
240 | 244 | ||
241 | // replace the collection name with the one selected from the combo box | 245 | // replace the collection name with the one selected from the combo box |
242 | // std::string selected_collection = childGetValue( "Category" ).asString(); | 246 | // std::string selected_collection = childGetValue( "Category" ).asString(); |
243 | substring = "[COLLECTION]"; | 247 | substring = "[COLLECTION]"; |
244 | url.replace(url.find(substring), substring.length(), collection); | 248 | where = url.find(substring); |
249 | if (where != std::string::npos) | ||
250 | { | ||
251 | url.replace(where, substring.length(), collection); | ||
252 | } | ||
245 | 253 | ||
246 | llinfos << "url " << url << llendl; | 254 | llinfos << "url " << url << llendl; |
247 | } | 255 | } |