aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/hippoGridManager.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-11 05:57:33 -0700
committerMcCabe Maxsted2010-08-11 05:57:33 -0700
commita5ea09a4b5d53edef7a281ee610e921101db9b09 (patch)
tree48fb17509eb27f4baf48822300474a96003bf454 /linden/indra/newview/hippoGridManager.cpp
parentApplied patch by Altair Memo for VWR-19947: Nvidia gpu_table.txt updated (diff)
downloadmeta-impy-a5ea09a4b5d53edef7a281ee610e921101db9b09.zip
meta-impy-a5ea09a4b5d53edef7a281ee610e921101db9b09.tar.gz
meta-impy-a5ea09a4b5d53edef7a281ee610e921101db9b09.tar.bz2
meta-impy-a5ea09a4b5d53edef7a281ee610e921101db9b09.tar.xz
Re-enabled search url fetching in the grid manager and fixed up web search to support them (fetched urls are equivalent to SearchURLDefault and searches follow the SL web search formatting)
Diffstat (limited to 'linden/indra/newview/hippoGridManager.cpp')
-rw-r--r--linden/indra/newview/hippoGridManager.cpp33
1 files changed, 27 insertions, 6 deletions
diff --git a/linden/indra/newview/hippoGridManager.cpp b/linden/indra/newview/hippoGridManager.cpp
index ccf63f5..5a229fd 100644
--- a/linden/indra/newview/hippoGridManager.cpp
+++ b/linden/indra/newview/hippoGridManager.cpp
@@ -314,6 +314,27 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
314 return ""; 314 return "";
315 } 315 }
316 } 316 }
317 else if (!mSearchUrl.empty())
318 {
319 // Search url sent to us in the login response
320 if (ty == SEARCH_ALL_EMPTY)
321 {
322 return (mSearchUrl);
323 }
324 else if (ty == SEARCH_ALL_QUERY)
325 {
326 return (mSearchUrl + "q=[QUERY]&s=[COLLECTION]&");
327 }
328 else if (ty == SEARCH_ALL_TEMPLATE)
329 {
330 return "lang=[LANG]&mat=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]";
331 }
332 else
333 {
334 llinfos << "Illegal search URL type " << ty << llendl;
335 return "";
336 }
337 }
317 else 338 else
318 { 339 {
319 // OpenSim and other web search defaults 340 // OpenSim and other web search defaults
@@ -349,7 +370,7 @@ std::string HippoGridInfo::getSearchUrl(SearchType ty, bool is_web) const
349 } 370 }
350 else if (ty == SEARCH_ALL_TEMPLATE) 371 else if (ty == SEARCH_ALL_TEMPLATE)
351 { 372 {
352 return "lang=[LANG]&m=[MATURE]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]"; 373 return "lang=[LANG]&m=[MATURITY]&t=[TEEN]&region=[REGION]&x=[X]&y=[Y]&z=[Z]&session=[SESSION]";
353 } 374 }
354 else 375 else
355 { 376 {
@@ -384,8 +405,8 @@ void HippoGridInfo::onXmlElementStart(void* userData, const XML_Char* name, cons
384 self->mXmlState = XML_REGISTER; 405 self->mXmlState = XML_REGISTER;
385 else if (strcasecmp(name, "password") == 0) 406 else if (strcasecmp(name, "password") == 0)
386 self->mXmlState = XML_PASSWORD; 407 self->mXmlState = XML_PASSWORD;
387 //else if (strcasecmp(name, "search") == 0) 408 else if (strcasecmp(name, "search") == 0)
388 //self->mXmlState = XML_SEARCH; 409 self->mXmlState = XML_SEARCH;
389} 410}
390 411
391//static 412//static
@@ -431,7 +452,7 @@ void HippoGridInfo::onXmlCharacterData(void* userData, const XML_Char* s, int le
431 452
432 case XML_SEARCH: 453 case XML_SEARCH:
433 { 454 {
434 //self->mSearchUrl.assign(s, len); 455 self->mSearchUrl.assign(s, len);
435 //sanitizeQueryUrl(mSearchUrl); 456 //sanitizeQueryUrl(mSearchUrl);
436 break; 457 break;
437 } 458 }
@@ -888,7 +909,7 @@ void HippoGridManager::parseData(LLSD &gridInfo, bool mergeIfNewer)
888 if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]); 909 if (gridMap.has("support")) grid->setSupportUrl(gridMap["support"]);
889 if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]); 910 if (gridMap.has("register")) grid->setRegisterUrl(gridMap["register"]);
890 if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]); 911 if (gridMap.has("password")) grid->setPasswordUrl(gridMap["password"]);
891 //if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]); 912 if (gridMap.has("search")) grid->setSearchUrl(gridMap["search"]);
892 if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]); 913 if (gridMap.has("render_compat")) grid->setRenderCompat(gridMap["render_compat"]);
893 // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]); 914 // if (gridMap.has("firstname")) grid->setFirstName(gridMap["firstname"]);
894 // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]); 915 // if (gridMap.has("lastname")) grid->setLastName(gridMap["lastname"]);
@@ -928,7 +949,7 @@ void HippoGridManager::saveFile()
928 // gridInfo[i]["lastname"] = grid->getLastName(); 949 // gridInfo[i]["lastname"] = grid->getLastName();
929 // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword(); 950 // gridInfo[i]["avatarpassword"] = grid->getAvatarPassword();
930 951
931 //gridInfo[i]["search"] = grid->getSearchUrl(); 952 gridInfo[i]["search"] = grid->getSearchUrl();
932 gridInfo[i]["render_compat"] = grid->isRenderCompat(); 953 gridInfo[i]["render_compat"] = grid->isRenderCompat();
933 } 954 }
934 955