aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldirfind.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpaneldirfind.cpp12
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 }