summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-10-18 18:11:29 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-10-18 18:11:29 -0400
commit5ef8545f63221db002d14cdcd1c7bac2e96a5e0a (patch)
tree1d4277a0c22de145d1b4d9936718758005e5067d /indra
parent993136fe347075b71f649ec70ce1a463afb073f8 (diff)
consolidate generating profile URL, force to lower case
Diffstat (limited to 'indra')
-rwxr-xr-x[-rw-r--r--]indra/newview/llavataractions.cpp9
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelprofile.cpp15
-rwxr-xr-x[-rw-r--r--]indra/newview/llpanelprofile.h2
3 files changed, 17 insertions, 9 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index 42701bcff9..219fca66bd 100644..100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -56,6 +56,7 @@
#include "llmutelist.h"
#include "llnotificationsutil.h" // for LLNotificationsUtil
#include "llpaneloutfitedit.h"
+#include "llpanelprofile.h"
#include "llrecentpeople.h"
#include "llsidetray.h"
#include "lltrans.h"
@@ -319,11 +320,9 @@ void LLAvatarActions::showProfile(const LLUUID& id)
std::string first_name,last_name;
if (gCacheName->getName(id,first_name,last_name))
{
- llinfos << "opening web profile for " << first_name << "." << last_name << llendl;
- std::string url = gSavedSettings.getString("WebProfileURL");
- LLSD subs;
- subs["AGENT_NAME"] = first_name + "." + last_name;
- url = LLWeb::expandURLSubstitutions(url,subs);
+ std::string agent_name = first_name + "." + last_name;
+ llinfos << "opening web profile for " << agent_name << llendl;
+ std::string url = getProfileURL(agent_name);
LLWeb::loadURL(url);
}
else
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 00191b17bd..38683ab5f7 100644..100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -38,6 +38,16 @@
static const std::string PANEL_PICKS = "panel_picks";
static const std::string PANEL_PROFILE = "panel_profile";
+std::string getProfileURL(const std::string& agent_name)
+{
+ std::string url = gSavedSettings.getString("WebProfileURL");
+ LLSD subs;
+ subs["AGENT_NAME"] = agent_name;
+ url = LLWeb::expandURLSubstitutions(url,subs);
+ LLStringUtil::toLower(url);
+ return url;
+}
+
class LLProfileHandler : public LLCommandHandler
{
public:
@@ -50,10 +60,7 @@ public:
if (params.size() < 1) return false;
std::string agent_name = params[0];
llinfos << "Profile, agent_name " << agent_name << llendl;
- std::string url = gSavedSettings.getString("WebProfileURL");
- LLSD subs;
- subs["AGENT_NAME"] = agent_name;
- url = LLWeb::expandURLSubstitutions(url,subs);
+ std::string url = getProfileURL(agent_name);
LLWeb::loadURL(url);
return true;
diff --git a/indra/newview/llpanelprofile.h b/indra/newview/llpanelprofile.h
index 0546c18583..c330a15939 100644..100755
--- a/indra/newview/llpanelprofile.h
+++ b/indra/newview/llpanelprofile.h
@@ -33,6 +33,8 @@
class LLTabContainer;
+std::string getProfileURL(const std::string& agent_name);
+
/**
* Base class for Profile View and My Profile.
*/