summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterexperienceprofile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterexperienceprofile.cpp')
-rw-r--r--indra/newview/llfloaterexperienceprofile.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/indra/newview/llfloaterexperienceprofile.cpp b/indra/newview/llfloaterexperienceprofile.cpp
index e5574be4f0..1c01a4bb9f 100644
--- a/indra/newview/llfloaterexperienceprofile.cpp
+++ b/indra/newview/llfloaterexperienceprofile.cpp
@@ -49,6 +49,7 @@
#include "llviewerregion.h"
#include "llevents.h"
#include "llfloatergroups.h"
+#include "llnotifications.h"
#define XML_PANEL_EXPERIENCE_PROFILE "floater_experienceprofile.xml"
#define TF_NAME "experience_title"
@@ -85,7 +86,6 @@
#define BTN_SET_GROUP "Group_btn"
-
class LLExperienceHandler : public LLCommandHandler
{
public:
@@ -722,6 +722,10 @@ void LLFloaterExperienceProfile::doSave( int success_action )
std::string url=region->getCapability("UpdateExperience");
if(url.empty())
return;
+
+ mPackage.erase(LLExperienceCache::QUOTA);
+ mPackage.erase(LLExperienceCache::EXPIRES);
+ mPackage.erase(LLExperienceCache::AGENT_ID);
LLHTTPClient::post(url, mPackage, new ExperienceUpdateResponder(getDerivedHandle<LLFloaterExperienceProfile>()));
}
@@ -730,6 +734,35 @@ void LLFloaterExperienceProfile::onSaveComplete( const LLSD& content )
{
LLUUID id = getExperienceId();
+ if(content.has("removed"))
+ {
+ const LLSD& removed = content["removed"];
+ LLSD::map_const_iterator it = removed.beginMap();
+ for(/**/; it != removed.endMap(); ++it)
+ {
+ const std::string& field = it->first;
+ if(field == LLExperienceCache::EXPERIENCE_ID)
+ {
+ //this message should be removed by the experience api
+ continue;
+ }
+ const LLSD& data = it->second;
+ std::string error_tag = data["error_tag"].asString()+ "ExperienceProfileMessage";
+ LLSD fields;
+ if( LLNotifications::instance().getTemplate(error_tag))
+ {
+ fields["field"] = field;
+ fields["extra_info"] = data["extra_info"];
+ LLNotificationsUtil::add(error_tag, fields);
+ }
+ else
+ {
+ fields["MESSAGE"]=data["en"];
+ LLNotificationsUtil::add("GenericAlert", fields);
+ }
+ }
+ }
+
if(!content.has("experience_keys"))
{
llwarns << "LLFloaterExperienceProfile::onSaveComplete called with bad content" << llendl;